FieldData.cpp
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 
24 // -- END LICENSE BLOCK ------------------------------------------------
25 
26 //----------------------------------------------------------------------
33 //----------------------------------------------------------------------
34 
36 
37 namespace sick {
38 namespace datastructure {
39 
41 
43 {
44  return m_is_valid;
45 }
46 
47 void FieldData::setIsValid(bool is_valid)
48 {
49  m_is_valid = is_valid;
50 }
51 
52 std::string FieldData::getVersionCVersion() const
53 {
54  return m_version_c_version;
55 }
56 
57 void FieldData::setVersionCVersion(const std::string& version_c_version)
58 {
59  m_version_c_version = version_c_version;
60 }
61 
63 {
65 }
66 
67 void FieldData::setVersionMajorVersionNumber(const uint8_t& version_major_version_number)
68 {
69  m_version_major_version_number = version_major_version_number;
70 }
71 
73 {
75 }
76 
77 void FieldData::setVersionMinorVersionNumber(const uint8_t& version_minor_version_number)
78 {
79  m_version_minor_version_number = version_minor_version_number;
80 }
81 
83 {
85 }
86 
87 void FieldData::setVersionReleaseNumber(const uint8_t& version_release_number)
88 {
89  m_version_release_number = version_release_number;
90 }
91 
93 {
94  return m_is_defined;
95 }
96 
97 void FieldData::setIsDefined(bool is_defined)
98 {
99  m_is_defined = is_defined;
100 }
101 
103 {
104  return m_eval_method;
105 }
106 
107 void FieldData::setEvalMethod(const uint8_t& eval_method)
108 {
109  m_eval_method = eval_method;
110 }
111 
113 {
114  return m_multi_sampling;
115 }
116 
117 void FieldData::setMultiSampling(const uint16_t& multi_sampling)
118 {
119  m_multi_sampling = multi_sampling;
120 }
121 
123 {
124  return m_object_resolution;
125 }
126 
127 void FieldData::setObjectResolution(const uint16_t& object_resolution)
128 {
129  m_object_resolution = object_resolution;
130 }
131 
133 {
134  return m_field_set_index;
135 }
136 
137 void FieldData::setFieldSetIndex(const uint16_t& field_set_index)
138 {
139  m_field_set_index = field_set_index;
140 }
141 
142 uint32_t FieldData::getNameLength() const
143 {
144  return m_name_length;
145 }
146 
147 void FieldData::setNameLength(const uint32_t& name_length)
148 {
149  m_name_length = name_length;
150 }
151 
152 std::string FieldData::getFieldName() const
153 {
154  return m_field_name;
155 }
156 
157 void FieldData::setFieldName(const std::string& field_name)
158 {
159  m_field_name = field_name;
160 }
161 
162 
164 {
165  return m_is_warning_field;
166 }
167 
168 void FieldData::setIsWarningField(bool is_warning_field)
169 {
170  m_is_warning_field = is_warning_field;
171 }
172 
174 {
175  return m_is_protective_field;
176 }
177 
178 void FieldData::setIsProtectiveField(bool is_protective_field)
179 {
180  m_is_protective_field = is_protective_field;
181 }
182 
183 std::vector<uint16_t> FieldData::getBeamDistances() const
184 {
185  return m_beam_distances;
186 }
187 
188 void FieldData::setBeamDistances(const std::vector<uint16_t>& beam_distances)
189 {
190  m_beam_distances = beam_distances;
191 }
192 
194 {
195  return m_start_angle;
196 }
197 
198 void FieldData::setStartAngle(const int32_t& start_angle)
199 {
200  m_start_angle = (float)start_angle / m_ANGLE_RESOLUTION;
201 }
202 
203 void FieldData::setStartAngleDegrees(const float& start_angle)
204 {
205  m_start_angle = start_angle;
206 }
207 
209 {
210  return m_end_angle;
211 }
212 
213 void FieldData::setEndAngle(const int32_t& end_angle)
214 {
215  m_end_angle = (float)end_angle / m_ANGLE_RESOLUTION;
216 }
217 
218 void FieldData::setEndAngleDegrees(const float& end_angle)
219 {
220  m_end_angle = end_angle;
221 }
222 
224 {
226 }
227 
228 void FieldData::setAngularBeamResolution(const int32_t& angular_beam_resolution)
229 {
230  m_angular_beam_resolution = (float)angular_beam_resolution / m_ANGLE_RESOLUTION;
231 }
232 
233 void FieldData::setAngularBeamResolutionDegrees(const float& angular_beam_resolution)
234 {
235  m_angular_beam_resolution = angular_beam_resolution;
236 }
237 
238 } // namespace datastructure
239 } // namespace sick
FieldData()
The constructor of the field data.
Definition: FieldData.cpp:40
void setNameLength(const uint32_t &name_length)
Sets the length of the field name.
Definition: FieldData.cpp:147
void setMultiSampling(const uint16_t &multi_sampling)
Sets the configured multiple sampling of the field.
Definition: FieldData.cpp:117
float getStartAngle() const
Get the start angle of the scan.
Definition: FieldData.cpp:193
uint16_t getFieldSetIndex() const
Returns the index of the field set the field belongs to.
Definition: FieldData.cpp:132
void setEvalMethod(const uint8_t &eval_method)
Sets the configured eval method.
Definition: FieldData.cpp:107
void setVersionReleaseNumber(const uint8_t &version_release_number)
Sets the version release number for the scanner.
Definition: FieldData.cpp:87
void setIsValid(bool is_valid)
Sets if the field data is valid.
Definition: FieldData.cpp:47
bool getIsProtectiveField() const
Returns if a field is a protective field.
Definition: FieldData.cpp:173
void setIsDefined(bool is_defined)
Sets if the field data is defined.
Definition: FieldData.cpp:97
void setStartAngleDegrees(const float &start_angle)
Set the start angle of the scan from degrees.
Definition: FieldData.cpp:203
std::vector< uint16_t > getBeamDistances() const
Returns vector with beam distances.
Definition: FieldData.cpp:183
void setVersionCVersion(const std::string &version_c_version)
Sets the version indicator for the scanner.
Definition: FieldData.cpp:57
float getEndAngle() const
Get the end angle of the scan.
Definition: FieldData.cpp:208
void setIsProtectiveField(bool is_protective_field)
Set if a field is protective field.
Definition: FieldData.cpp:178
std::string getVersionCVersion() const
Gets the version indicator for the scanner.
Definition: FieldData.cpp:52
void setEndAngle(const int32_t &end_angle)
Set the end angle of the scan.
Definition: FieldData.cpp:213
const double m_ANGLE_RESOLUTION
Defined angle resolution to convert sensor input to the right frame.
Definition: FieldData.h:318
uint8_t getVersionReleaseNumber() const
Gets the version release number for the scanner.
Definition: FieldData.cpp:82
uint16_t getMultiSampling() const
Returns the multiple sampling of the field.
Definition: FieldData.cpp:112
void setAngularBeamResolutionDegrees(const float &angular_beam_resolution)
Set the angular resolution between beams from degrees.
Definition: FieldData.cpp:233
std::vector< uint16_t > m_beam_distances
Definition: FieldData.h:334
uint8_t getEvalMethod() const
Returns the configured eval method.
Definition: FieldData.cpp:102
void setBeamDistances(const std::vector< uint16_t > &beam_distances)
Sets vector with beam distances for field.
Definition: FieldData.cpp:188
bool getIsDefined() const
Returns if the received field data is defined.
Definition: FieldData.cpp:92
void setObjectResolution(const uint16_t &object_resolution)
Sets the configured object resolution.
Definition: FieldData.cpp:127
uint16_t getObjectResolution() const
Returns the configured object resolution.
Definition: FieldData.cpp:122
void setIsWarningField(bool is_warning_field)
Set if a field is a warning field.
Definition: FieldData.cpp:168
std::string getFieldName() const
Gets the current field name.
Definition: FieldData.cpp:152
uint8_t getVersionMinorVersionNumber() const
Gets the minor version number for the scanner.
Definition: FieldData.cpp:72
void setEndAngleDegrees(const float &end_angle)
Set the end angle of the scan from degrees.
Definition: FieldData.cpp:218
bool getIsValid() const
Returns if the received field data is valid.
Definition: FieldData.cpp:42
void setAngularBeamResolution(const int32_t &angular_beam_resolution)
Set the angular resolution between beams.
Definition: FieldData.cpp:228
void setFieldName(const std::string &field_name)
Sets the field name.
Definition: FieldData.cpp:157
void setFieldSetIndex(const uint16_t &field_set_index)
Sets the index of the field set where the field belongs to.
Definition: FieldData.cpp:137
uint8_t getVersionMajorVersionNumber() const
Gets the major version number for the scanner.
Definition: FieldData.cpp:62
void setVersionMinorVersionNumber(const uint8_t &version_minor_version_number)
Sets the minor version number for the scanner.
Definition: FieldData.cpp:77
bool getIsWarningField() const
Returns if a field is warning field.
Definition: FieldData.cpp:163
void setStartAngle(const int32_t &start_angle)
Set the start angle of the scan.
Definition: FieldData.cpp:198
float getAngularBeamResolution() const
Returns the angular resolution between the beams.
Definition: FieldData.cpp:223
void setVersionMajorVersionNumber(const uint8_t &version_major_version_number)
Sets the major version number for the scanner.
Definition: FieldData.cpp:67
uint32_t getNameLength() const
Gets the length of the field name.
Definition: FieldData.cpp:142


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Fri Apr 2 2021 02:45:41