ConfigData.h
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 
35 #ifndef SICK_SAFETYSCANNERS_DATASTRUCTURE_CONFIGDATA_H
36 #define SICK_SAFETYSCANNERS_DATASTRUCTURE_CONFIGDATA_H
37 
38 #include <boost/asio/ip/address_v4.hpp>
39 #include <iostream>
41 #include <vector>
42 
43 namespace sick {
44 namespace datastructure {
45 
46 
51 {
52 public:
56  ConfigData();
62  std::string getVersionCVersion() const;
68  void setVersionCVersion(const std::string& version_c_version);
69 
75  uint8_t getVersionMajorVersionNumber() const;
81  void setVersionMajorVersionNumber(const uint8_t& version_major_version_number);
82 
88  uint8_t getVersionMinorVersionNumber() const;
94  void setVersionMinorVersionNumber(const uint8_t& version_minor_version_number);
95 
101  uint8_t getVersionReleaseNumber() const;
107  void setVersionReleaseNumber(const uint8_t& version_release_number);
108 
114  boost::asio::ip::address_v4 getHostIp() const;
120  void setHostIp(const boost::asio::ip::address_v4& host_ip);
126  void setHostIp(const std::string& host_ip);
127 
133  uint16_t getHostUdpPort() const;
139  void setHostUdpPort(const uint16_t& host_udp_port);
140 
146  uint8_t getChannel() const;
152  void setChannel(const uint8_t& channel);
153 
159  bool getEnabled() const;
165  void setEnabled(bool enabled);
166 
172  uint8_t getEInterfaceType() const;
178  void setEInterfaceType(const uint8_t& e_interface_type);
179 
185  uint16_t getPublishingFrequency() const;
191  void setPublishingFrequency(const uint16_t& publishing_frequency);
192 
198  float getStartAngle() const;
204  void setStartAngle(const int32_t& start_angle);
205 
210  void setStartAngleDegrees(const float& start_angle);
211 
217  float getEndAngle() const;
223  void setEndAngle(const int32_t& end_angle);
228  void setEndAngleDegrees(const float& end_angle);
229 
235  uint16_t getFeatures() const;
241  void setFeatures(const uint16_t& features);
251  void setFeatures(bool general_system_state,
252  bool derived_settings,
253  bool measurement_data,
254  bool intrusion_data,
255  bool application_data);
256 
263  uint16_t getDerivedMultiplicationFactor() const;
264 
269  void setDerivedMultiplicationFactor(const uint16_t& multiplication_factor);
270 
275  uint16_t getDerivedNumberOfBeams() const;
276 
281  void setDerivedNumberOfBeams(const uint16_t& number_of_beams);
282 
287  uint16_t getDerivedScanTime() const;
288 
293  void setDerivedScanTime(const uint16_t& scan_time);
294 
299  float getDerivedStartAngle() const;
300 
305  void setDerivedStartAngle(const int32_t& start_angle);
306 
311  float getDerivedAngularBeamResolution() const;
312 
317  void setDerivedAngularBeamResolution(const int32_t& angular_beam_resolution);
318 
323  void setDerivedAngularBeamResolutionDegrees(const float& angular_beam_resolution);
324 
329  uint32_t getDerivedInterbeamPeriod() const;
330 
335  void setDerivedInterbeamPeriod(const uint32_t& interbeam_period);
336 
337 private:
341  const double m_ANGLE_RESOLUTION = 4194304.0;
342 
343  // TODO cleanup and refactor in different subclasses
344 
345  std::string m_version_c_version;
349  boost::asio::ip::address_v4 m_host_ip;
350  uint16_t m_host_udp_port;
351  uint8_t m_channel;
352  bool m_enabled;
356  float m_end_angle;
357  uint16_t m_features;
362  float m_derived_angular_beam_resolution; // TODO move into derived values
364 };
365 
366 
367 } // namespace datastructure
368 } // namespace sick
369 
370 #endif // SICK_SAFETYSCANNERS_DATASTRUCTURE_CONFIGDATA_H
sick::datastructure::ConfigData::setDerivedNumberOfBeams
void setDerivedNumberOfBeams(const uint16_t &number_of_beams)
Sets the number of beams for the current scan.
Definition: ConfigData.cpp:232
DerivedValues.h
sick::datastructure::ConfigData::m_derived_start_angle
float m_derived_start_angle
Definition: ConfigData.h:361
sick::datastructure::ConfigData::getStartAngle
float getStartAngle() const
Gets the start angle of the scan.
Definition: ConfigData.cpp:171
sick::datastructure::ConfigData::setEnabled
void setEnabled(bool enabled)
Sets if the channel is enabled.
Definition: ConfigData.cpp:122
sick::datastructure::ConfigData::setEndAngleDegrees
void setEndAngleDegrees(const float &end_angle)
Set the end angle of the configuration from degrees.
Definition: ConfigData.cpp:196
sick::datastructure::ConfigData::m_version_minor_version_number
uint8_t m_version_minor_version_number
Definition: ConfigData.h:347
sick::datastructure::ConfigData::getVersionReleaseNumber
uint8_t getVersionReleaseNumber() const
Gets the version release number for the scanner.
Definition: ConfigData.cpp:72
sick::datastructure::ConfigData::getDerivedAngularBeamResolution
float getDerivedAngularBeamResolution() const
Returns the angular resolution between the beams.
Definition: ConfigData.cpp:258
sick::datastructure::ConfigData::getDerivedInterbeamPeriod
uint32_t getDerivedInterbeamPeriod() const
Return the time between consecutive beams.
Definition: ConfigData.cpp:273
sick::datastructure::ConfigData::m_host_udp_port
uint16_t m_host_udp_port
Definition: ConfigData.h:350
sick::datastructure::ConfigData::m_version_major_version_number
uint8_t m_version_major_version_number
Definition: ConfigData.h:346
sick
Definition: ApplicationNameVariableCommand.h:43
sick::datastructure::ConfigData::getEnabled
bool getEnabled() const
Gets if the channel is enabled.
Definition: ConfigData.cpp:117
sick::datastructure::ConfigData::getPublishingFrequency
uint16_t getPublishingFrequency() const
Gets the publishing frequency.
Definition: ConfigData.cpp:137
sick::datastructure::ConfigData::setHostUdpPort
void setHostUdpPort(const uint16_t &host_udp_port)
Sets the host udp port.
Definition: ConfigData.cpp:102
sick::datastructure::ConfigData::setFeatures
void setFeatures(const uint16_t &features)
Set the enabled features.
Definition: ConfigData.cpp:152
sick::datastructure::ConfigData::getHostUdpPort
uint16_t getHostUdpPort() const
Gets the host udp port.
Definition: ConfigData.cpp:97
sick::datastructure::ConfigData::m_derived_interbeam_period
uint16_t m_derived_interbeam_period
Definition: ConfigData.h:363
sick::datastructure::ConfigData::m_derived_angular_beam_resolution
float m_derived_angular_beam_resolution
Definition: ConfigData.h:362
sick::datastructure::ConfigData::getDerivedScanTime
uint16_t getDerivedScanTime() const
Return the time of the scan.
Definition: ConfigData.cpp:237
sick::datastructure::ConfigData::setDerivedMultiplicationFactor
void setDerivedMultiplicationFactor(const uint16_t &multiplication_factor)
Sets the multiplication factor.
Definition: ConfigData.cpp:222
sick::datastructure::e_interface_type
e_interface_type
Definition: TypeCode.h:44
sick::datastructure::ConfigData::setDerivedInterbeamPeriod
void setDerivedInterbeamPeriod(const uint32_t &interbeam_period)
Set the time between two consecutive beams.
Definition: ConfigData.cpp:278
sick::datastructure::ConfigData::getDerivedStartAngle
float getDerivedStartAngle() const
Get the start angle of the scan.
Definition: ConfigData.cpp:248
sick::datastructure::ConfigData::setStartAngleDegrees
void setStartAngleDegrees(const float &start_angle)
Set the start angle of the configuration from degrees.
Definition: ConfigData.cpp:181
sick::datastructure::ConfigData::getDerivedMultiplicationFactor
uint16_t getDerivedMultiplicationFactor() const
Return the multiplication factor. Multiplication factor to be applied to the beam distance values to ...
Definition: ConfigData.cpp:217
sick::datastructure::ConfigData::m_publishing_frequency
uint16_t m_publishing_frequency
Definition: ConfigData.h:354
sick::datastructure::ConfigData::m_derived_number_of_beams
uint16_t m_derived_number_of_beams
Definition: ConfigData.h:359
sick::datastructure::ConfigData::getEndAngle
float getEndAngle() const
Gets the end angle of the scan.
Definition: ConfigData.cpp:186
sick::datastructure::ConfigData::m_channel
uint8_t m_channel
Definition: ConfigData.h:351
sick::datastructure::ConfigData::setVersionReleaseNumber
void setVersionReleaseNumber(const uint8_t &version_release_number)
Sets the version release number for the scanner.
Definition: ConfigData.cpp:77
sick::datastructure::ConfigData::m_features
uint16_t m_features
Definition: ConfigData.h:357
sick::datastructure::ConfigData::m_enabled
bool m_enabled
Definition: ConfigData.h:352
sick::datastructure::ConfigData::setDerivedAngularBeamResolutionDegrees
void setDerivedAngularBeamResolutionDegrees(const float &angular_beam_resolution)
Set the angular resolution between beams from degrees.
Definition: ConfigData.cpp:268
sick::datastructure::ConfigData::getEInterfaceType
uint8_t getEInterfaceType() const
Gets the eInterface type.
Definition: ConfigData.cpp:127
sick::datastructure::ConfigData::m_ANGLE_RESOLUTION
const double m_ANGLE_RESOLUTION
Defined angle resolution to convert sensor input to the right frame.
Definition: ConfigData.h:341
sick::datastructure::ConfigData::ConfigData
ConfigData()
The constructor of the config data.
Definition: ConfigData.cpp:40
sick::datastructure::ConfigData::setEInterfaceType
void setEInterfaceType(const uint8_t &e_interface_type)
Sets the eInterface type.
Definition: ConfigData.cpp:132
sick::datastructure::ConfigData::m_derived_scan_time
uint16_t m_derived_scan_time
Definition: ConfigData.h:360
sick::datastructure::ConfigData::setVersionMajorVersionNumber
void setVersionMajorVersionNumber(const uint8_t &version_major_version_number)
Sets the major version number for the scanner.
Definition: ConfigData.cpp:57
sick::datastructure::ConfigData::getDerivedNumberOfBeams
uint16_t getDerivedNumberOfBeams() const
Returns the number of beams of the current scan.
Definition: ConfigData.cpp:227
sick::datastructure::ConfigData::setPublishingFrequency
void setPublishingFrequency(const uint16_t &publishing_frequency)
Sets the publishing frequency.
Definition: ConfigData.cpp:142
sick::datastructure::ConfigData::m_end_angle
float m_end_angle
Definition: ConfigData.h:356
sick::datastructure::ConfigData::setDerivedStartAngle
void setDerivedStartAngle(const int32_t &start_angle)
Set the start angle of the scan.
Definition: ConfigData.cpp:253
sick::datastructure::ConfigData::m_version_c_version
std::string m_version_c_version
Definition: ConfigData.h:345
sick::datastructure::ConfigData::getHostIp
boost::asio::ip::address_v4 getHostIp() const
Gets the IP-address of the host.
Definition: ConfigData.cpp:82
sick::datastructure::ConfigData::m_version_release_number
uint8_t m_version_release_number
Definition: ConfigData.h:348
sick::datastructure::ConfigData::m_e_interface_type
uint8_t m_e_interface_type
Definition: ConfigData.h:353
sick::datastructure::ConfigData::getVersionMinorVersionNumber
uint8_t getVersionMinorVersionNumber() const
Gets the minor version number for the scanner.
Definition: ConfigData.cpp:62
sick::datastructure::ConfigData::setDerivedAngularBeamResolution
void setDerivedAngularBeamResolution(const int32_t &angular_beam_resolution)
Set the angular resolution between beams.
Definition: ConfigData.cpp:263
sick::datastructure::ConfigData::setStartAngle
void setStartAngle(const int32_t &start_angle)
Sets the start angle of the scan.
Definition: ConfigData.cpp:176
sick::datastructure::ConfigData::m_start_angle
float m_start_angle
Definition: ConfigData.h:355
sick::datastructure::ConfigData::setVersionMinorVersionNumber
void setVersionMinorVersionNumber(const uint8_t &version_minor_version_number)
Sets the minor version number for the scanner.
Definition: ConfigData.cpp:67
sick::datastructure::ConfigData::setDerivedScanTime
void setDerivedScanTime(const uint16_t &scan_time)
Sets the time of the scan.
Definition: ConfigData.cpp:242
sick::datastructure::ConfigData
Config data for current and persistent sensor config.
Definition: ConfigData.h:50
sick::datastructure::ConfigData::setEndAngle
void setEndAngle(const int32_t &end_angle)
Sets the end angle of the scan.
Definition: ConfigData.cpp:191
sick::datastructure::ConfigData::getVersionMajorVersionNumber
uint8_t getVersionMajorVersionNumber() const
Gets the major version number for the scanner.
Definition: ConfigData.cpp:52
sick::datastructure::ConfigData::m_host_ip
boost::asio::ip::address_v4 m_host_ip
Definition: ConfigData.h:349
sick::datastructure::ConfigData::setChannel
void setChannel(const uint8_t &channel)
Sets the channel of the data.
Definition: ConfigData.cpp:112
sick::datastructure::ConfigData::getChannel
uint8_t getChannel() const
Gets the channel of the data.
Definition: ConfigData.cpp:107
sick::datastructure::ConfigData::getVersionCVersion
std::string getVersionCVersion() const
Gets the version indicator for the scanner.
Definition: ConfigData.cpp:42
sick::datastructure::ConfigData::setHostIp
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
sick::datastructure::ConfigData::getFeatures
uint16_t getFeatures() const
Gets the enabled features.
Definition: ConfigData.cpp:147
sick::datastructure::ConfigData::setVersionCVersion
void setVersionCVersion(const std::string &version_c_version)
Sets the version indicator for the scanner.
Definition: ConfigData.cpp:47
sick::datastructure::ConfigData::m_derived_multiplication_factor
uint16_t m_derived_multiplication_factor
Definition: ConfigData.h:358


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Fri Jun 21 2024 02:40:51