CommSettings.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_COMMSETTINGS_H
36 #define SICK_SAFETYSCANNERS_DATASTRUCTURE_COMMSETTINGS_H
37 
38 #include <boost/asio/ip/address_v4.hpp>
39 #include <iostream>
40 #include <string>
41 
42 namespace sick {
43 namespace datastructure {
44 
49 {
50 public:
54  CommSettings();
55 
61  boost::asio::ip::address_v4 getHostIp() const;
67  void setHostIp(const boost::asio::ip::address_v4& host_ip);
73  void setHostIp(const std::string& host_ip);
74 
80  uint16_t getHostUdpPort() const;
86  void setHostUdpPort(const uint16_t& host_udp_port);
87 
93  uint8_t getChannel() const;
99  void setChannel(const uint8_t& channel);
100 
106  bool getEnabled() const;
112  void setEnabled(bool enabled);
113 
119  uint8_t getEInterfaceType() const;
125  void setEInterfaceType(const uint8_t& e_interface_type);
126 
132  uint16_t getPublishingFrequency() const;
138  void setPublishingFrequency(const uint16_t& publishing_frequency);
139 
145  uint32_t getStartAngle() const;
151  void setStartAngle(const uint32_t& start_angle);
152 
158  uint32_t getEndAngle() const;
164  void setEndAngle(const uint32_t& end_angle);
165 
171  uint16_t getFeatures() const;
177  void setFeatures(const uint16_t& features);
187  void setFeatures(bool general_system_state,
188  bool derived_settings,
189  bool measurement_data,
190  bool intrusion_data,
191  bool application_data);
192 
198  boost::asio::ip::address_v4 getSensorIp() const;
204  void setSensorIp(const boost::asio::ip::address_v4& sensor_ip);
205 
211  uint16_t getSensorTcpPort() const;
217  void setSensorTcpPort(const uint16_t& sensor_tcp_port);
223  void setSensorIp(const std::string& sensor_ip);
224 
225 private:
226  boost::asio::ip::address_v4 m_sensor_ip;
228  boost::asio::ip::address_v4 m_host_ip;
229  uint16_t m_host_udp_port;
230  uint8_t m_channel;
231  bool m_enabled;
234  uint32_t m_start_angle;
235  uint32_t m_end_angle;
236  uint16_t m_features;
237 };
238 
239 
240 } // namespace datastructure
241 } // namespace sick
242 
243 #endif // SICK_SAFETYSCANNERS_DATASTRUCTURE_COMMSETTINGS_H
boost::asio::ip::address_v4 getHostIp() const
Gets the IP-address of the host.
void setEInterfaceType(const uint8_t &e_interface_type)
Sets the eInterface type.
uint16_t getFeatures() const
Gets the enabled features.
void setFeatures(const uint16_t &features)
Set the enabled features.
void setSensorTcpPort(const uint16_t &sensor_tcp_port)
Sets the sensor tcp port.
uint16_t getPublishingFrequency() const
Gets the publishing frequency.
void setEnabled(bool enabled)
Sets if the channel is enabled.
void setEndAngle(const uint32_t &end_angle)
Sets the end angle of the scan.
uint8_t getEInterfaceType() const
Gets the eInterface type.
void setPublishingFrequency(const uint16_t &publishing_frequency)
Sets the publishing frequency.
Containing the communication settings for the sensor which can be changed on runtime.
Definition: CommSettings.h:48
uint32_t getStartAngle() const
Gets the start angle of the scan.
CommSettings()
Constructor of the communication settings.
void setSensorIp(const boost::asio::ip::address_v4 &sensor_ip)
Sets the sensor IP-address.
uint32_t getEndAngle() const
Gets the end angle of the scan.
bool getEnabled() const
Gets if the channel is enabled.
void setStartAngle(const uint32_t &start_angle)
Sets the start angle of the scan.
uint16_t getSensorTcpPort() const
Gets the sensor tcp port.
boost::asio::ip::address_v4 getSensorIp() const
Gets the sensor IP-address.
uint8_t getChannel() const
Gets the channel of the data.
void setHostUdpPort(const uint16_t &host_udp_port)
Sets the host udp port.
void setChannel(const uint8_t &channel)
Sets the channel of the data.
boost::asio::ip::address_v4 m_host_ip
Definition: CommSettings.h:228
boost::asio::ip::address_v4 m_sensor_ip
Definition: CommSettings.h:226
uint16_t getHostUdpPort() const
Gets the host udp port.
void setHostIp(const boost::asio::ip::address_v4 &host_ip)
Sets the IP-address of the host from an IP-address.


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