ConfigData.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 
42 std::string ConfigData::getVersionCVersion() const
43 {
44  return m_version_c_version;
45 }
46 
47 void ConfigData::setVersionCVersion(const std::string& version_c_version)
48 {
49  m_version_c_version = version_c_version;
50 }
51 
53 {
55 }
56 
57 void ConfigData::setVersionMajorVersionNumber(const uint8_t& version_major_version_number)
58 {
59  m_version_major_version_number = version_major_version_number;
60 }
61 
63 {
65 }
66 
67 void ConfigData::setVersionMinorVersionNumber(const uint8_t& version_minor_version_number)
68 {
69  m_version_minor_version_number = version_minor_version_number;
70 }
71 
73 {
75 }
76 
77 void ConfigData::setVersionReleaseNumber(const uint8_t& version_release_number)
78 {
79  m_version_release_number = version_release_number;
80 }
81 
82 boost::asio::ip::address_v4 ConfigData::getHostIp() const
83 {
84  return m_host_ip;
85 }
86 
87 void ConfigData::setHostIp(const boost::asio::ip::address_v4& host_ip)
88 {
89  m_host_ip = host_ip;
90 }
91 
92 void ConfigData::setHostIp(const std::string& host_ip)
93 {
94  m_host_ip = boost::asio::ip::address_v4::from_string(host_ip);
95 }
96 
98 {
99  return m_host_udp_port;
100 }
101 
102 void ConfigData::setHostUdpPort(const uint16_t& host_udp_port)
103 {
104  m_host_udp_port = host_udp_port;
105 }
106 
107 uint8_t ConfigData::getChannel() const
108 {
109  return m_channel;
110 }
111 
112 void ConfigData::setChannel(const uint8_t& channel)
113 {
114  m_channel = channel;
115 }
116 
118 {
119  return m_enabled;
120 }
121 
122 void ConfigData::setEnabled(bool enabled)
123 {
124  m_enabled = enabled;
125 }
126 
128 {
129  return m_e_interface_type;
130 }
131 
133 {
135 }
136 
138 {
139  return m_publishing_frequency;
140 }
141 
142 void ConfigData::setPublishingFrequency(const uint16_t& publishing_frequency)
143 {
144  m_publishing_frequency = publishing_frequency;
145 }
146 
147 uint16_t ConfigData::getFeatures() const
148 {
149  return m_features;
150 }
151 
152 void ConfigData::setFeatures(const uint16_t& features)
153 {
154  m_features = features;
155 }
156 
157 void ConfigData::setFeatures(bool general_system_state,
158  bool derived_settings,
159  bool measurement_data,
160  bool intrusion_data,
161  bool application_data)
162 {
163  m_features = 0;
164  m_features += (static_cast<int>(general_system_state) << 0);
165  m_features += (static_cast<int>(derived_settings) << 1);
166  m_features += (static_cast<int>(measurement_data) << 2);
167  m_features += (static_cast<int>(intrusion_data) << 3);
168  m_features += (static_cast<int>(application_data) << 4);
169 }
170 
172 {
173  return m_start_angle;
174 }
175 
176 void ConfigData::setStartAngle(const int32_t& start_angle)
177 {
178  m_start_angle = (float)start_angle / m_ANGLE_RESOLUTION;
179 }
180 
181 void ConfigData::setStartAngleDegrees(const float& start_angle)
182 {
183  m_start_angle = start_angle;
184 }
185 
187 {
188  return m_end_angle;
189 }
190 
191 void ConfigData::setEndAngle(const int32_t& end_angle)
192 {
193  m_end_angle = (float)end_angle / m_ANGLE_RESOLUTION;
194 }
195 
196 void ConfigData::setEndAngleDegrees(const float& end_angle)
197 {
198  m_end_angle = end_angle;
199 }
200 
201 /*float ConfigData::getAngularBeamResolution() const
202 {
203  return m_angular_beam_resolution;
204 }
205 
206 void ConfigData::setAngularBeamResolution(const int32_t& angular_beam_resolution)
207 {
208  m_angular_beam_resolution = (float)angular_beam_resolution / m_ANGLE_RESOLUTION;
209 }
210 
211 void ConfigData::setAngularBeamResolutionDegrees(const float& angular_beam_resolution)
212 {
213  m_angular_beam_resolution = angular_beam_resolution;
214 }*/
215 
216 
218 {
220 }
221 
222 void ConfigData::setDerivedMultiplicationFactor(const uint16_t& multiplication_factor)
223 {
224  m_derived_multiplication_factor = multiplication_factor;
225 }
226 
228 {
230 }
231 
232 void ConfigData::setDerivedNumberOfBeams(const uint16_t& number_of_beams)
233 {
234  m_derived_number_of_beams = number_of_beams;
235 }
236 
238 {
239  return m_derived_scan_time;
240 }
241 
242 void ConfigData::setDerivedScanTime(const uint16_t& scan_time)
243 {
244  m_derived_scan_time = scan_time;
245 }
246 
247 
249 {
250  return m_derived_start_angle;
251 }
252 
253 void ConfigData::setDerivedStartAngle(const int32_t& start_angle)
254 {
255  m_derived_start_angle = (float)start_angle / m_ANGLE_RESOLUTION;
256 }
257 
259 {
261 }
262 
263 void ConfigData::setDerivedAngularBeamResolution(const int32_t& angular_beam_resolution)
264 {
265  m_derived_angular_beam_resolution = (float)angular_beam_resolution / m_ANGLE_RESOLUTION;
266 }
267 
268 void ConfigData::setDerivedAngularBeamResolutionDegrees(const float& angular_beam_resolution)
269 {
270  m_derived_angular_beam_resolution = angular_beam_resolution;
271 }
272 
274 {
276 }
277 
278 void ConfigData::setDerivedInterbeamPeriod(const uint32_t& interbeam_period)
279 {
280  m_derived_interbeam_period = interbeam_period;
281 }
282 
283 } // namespace datastructure
284 } // namespace sick
float getStartAngle() const
Gets the start angle of the scan.
Definition: ConfigData.cpp:171
void setDerivedNumberOfBeams(const uint16_t &number_of_beams)
Sets the number of beams for the current scan.
Definition: ConfigData.cpp:232
void setHostIp(const boost::asio::ip::address_v4 &host_ip)
Sets the IP-address of the host from an IP-address.
Definition: ConfigData.cpp:87
void setDerivedMultiplicationFactor(const uint16_t &multiplication_factor)
Sets the multiplication factor.
Definition: ConfigData.cpp:222
uint16_t getHostUdpPort() const
Gets the host udp port.
Definition: ConfigData.cpp:97
uint32_t getDerivedInterbeamPeriod() const
Return the time between consecutive beams.
Definition: ConfigData.cpp:273
uint8_t getEInterfaceType() const
Gets the eInterface type.
Definition: ConfigData.cpp:127
uint8_t getChannel() const
Gets the channel of the data.
Definition: ConfigData.cpp:107
float getDerivedStartAngle() const
Get the start angle of the scan.
Definition: ConfigData.cpp:248
void setVersionReleaseNumber(const uint8_t &version_release_number)
Sets the version release number for the scanner.
Definition: ConfigData.cpp:77
boost::asio::ip::address_v4 getHostIp() const
Gets the IP-address of the host.
Definition: ConfigData.cpp:82
void setHostUdpPort(const uint16_t &host_udp_port)
Sets the host udp port.
Definition: ConfigData.cpp:102
void setEInterfaceType(const uint8_t &e_interface_type)
Sets the eInterface type.
Definition: ConfigData.cpp:132
void setFeatures(const uint16_t &features)
Set the enabled features.
Definition: ConfigData.cpp:152
void setDerivedInterbeamPeriod(const uint32_t &interbeam_period)
Set the time between two consecutive beams.
Definition: ConfigData.cpp:278
void setDerivedAngularBeamResolutionDegrees(const float &angular_beam_resolution)
Set the angular resolution between beams from degrees.
Definition: ConfigData.cpp:268
uint8_t getVersionReleaseNumber() const
Gets the version release number for the scanner.
Definition: ConfigData.cpp:72
void setStartAngleDegrees(const float &start_angle)
Set the start angle of the configuration from degrees.
Definition: ConfigData.cpp:181
const double m_ANGLE_RESOLUTION
Defined angle resolution to convert sensor input to the right frame.
Definition: ConfigData.h:341
void setVersionMajorVersionNumber(const uint8_t &version_major_version_number)
Sets the major version number for the scanner.
Definition: ConfigData.cpp:57
void setPublishingFrequency(const uint16_t &publishing_frequency)
Sets the publishing frequency.
Definition: ConfigData.cpp:142
ConfigData()
The constructor of the config data.
Definition: ConfigData.cpp:40
bool getEnabled() const
Gets if the channel is enabled.
Definition: ConfigData.cpp:117
uint16_t getDerivedNumberOfBeams() const
Returns the number of beams of the current scan.
Definition: ConfigData.cpp:227
void setVersionMinorVersionNumber(const uint8_t &version_minor_version_number)
Sets the minor version number for the scanner.
Definition: ConfigData.cpp:67
void setChannel(const uint8_t &channel)
Sets the channel of the data.
Definition: ConfigData.cpp:112
void setStartAngle(const int32_t &start_angle)
Sets the start angle of the scan.
Definition: ConfigData.cpp:176
uint16_t getPublishingFrequency() const
Gets the publishing frequency.
Definition: ConfigData.cpp:137
void setDerivedStartAngle(const int32_t &start_angle)
Set the start angle of the scan.
Definition: ConfigData.cpp:253
void setDerivedAngularBeamResolution(const int32_t &angular_beam_resolution)
Set the angular resolution between beams.
Definition: ConfigData.cpp:263
uint8_t getVersionMajorVersionNumber() const
Gets the major version number for the scanner.
Definition: ConfigData.cpp:52
uint8_t getVersionMinorVersionNumber() const
Gets the minor version number for the scanner.
Definition: ConfigData.cpp:62
float getDerivedAngularBeamResolution() const
Returns the angular resolution between the beams.
Definition: ConfigData.cpp:258
uint16_t getDerivedMultiplicationFactor() const
Return the multiplication factor. Multiplication factor to be applied to the beam distance values to ...
Definition: ConfigData.cpp:217
float getEndAngle() const
Gets the end angle of the scan.
Definition: ConfigData.cpp:186
void setEndAngleDegrees(const float &end_angle)
Set the end angle of the configuration from degrees.
Definition: ConfigData.cpp:196
void setVersionCVersion(const std::string &version_c_version)
Sets the version indicator for the scanner.
Definition: ConfigData.cpp:47
uint16_t getFeatures() const
Gets the enabled features.
Definition: ConfigData.cpp:147
std::string getVersionCVersion() const
Gets the version indicator for the scanner.
Definition: ConfigData.cpp:42
uint16_t getDerivedScanTime() const
Return the time of the scan.
Definition: ConfigData.cpp:237
void setDerivedScanTime(const uint16_t &scan_time)
Sets the time of the scan.
Definition: ConfigData.cpp:242
void setEndAngle(const int32_t &end_angle)
Sets the end angle of the scan.
Definition: ConfigData.cpp:191
boost::asio::ip::address_v4 m_host_ip
Definition: ConfigData.h:349
void setEnabled(bool enabled)
Sets if the channel is enabled.
Definition: ConfigData.cpp:122


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