Class AsyncSickSafetyScanner

Inheritance Relationships

Base Type

Class Documentation

class AsyncSickSafetyScanner : public sick::SickSafetyscannersBase

Asynchronous API for SICK safety scanners. The COLA2 API is inherited from its base class.

Public Functions

AsyncSickSafetyScanner() = delete

Deleted default, copy and copy-assignment constructors.

AsyncSickSafetyScanner(const AsyncSickSafetyScanner&) = delete
AsyncSickSafetyScanner &operator=(const AsyncSickSafetyScanner&) = delete
AsyncSickSafetyScanner(sick::types::ip_address_t sensor_ip, sick::types::port_t sensor_tcp_port, CommSettings comm_settings, sick::types::ScanDataCb callback)

Constructor of the AsyncSickSafetyScanner class.

Parameters
  • sensor_ip – The IP4 address of the sensor.

  • sensor_tcp_port – The TCP port of the sensor (COLA2).

  • comm_settings – A CommSettings object containing parameters to be sent to the sensor. The host (client) UDP port, if not available for allocation, might be overwritten by an automatically choosen one.

  • callback – A callback to process incomming sensor data.

AsyncSickSafetyScanner(sick::types::ip_address_t sensor_ip, sick::types::port_t sensor_tcp_port, CommSettings comm_settings, boost::asio::ip::address_v4 interface_ip, sick::types::ScanDataCb callback)

Constructor of the AsyncSickSafetyScanner class.

Parameters
  • sensor_ip – The IP4 address of the sensor.

  • sensor_tcp_port – The TCP port of the sensor (COLA2).

  • comm_settings – A CommSettings object containing parameters to be sent to the sensor. The host (client) UDP port, if not available for allocation, might be overwritten by an automatically choosen one.

  • interface_ip – If multicast IP adresses are used for the host_ip, the corresponding interface of the host has to be defined for the socket to allow joining the multicast group.

  • callback – A callback to process incomming sensor data.

AsyncSickSafetyScanner(sick::types::ip_address_t sensor_ip, sick::types::port_t sensor_tcp_port, CommSettings comm_settings, sick::types::ScanDataCb callback, boost::asio::io_service &io_service)

Constructor of the AsyncSickSafetyScanner class.

find . -regex ‘.*.(cpp|hpp|cc|cxx)’ -exec clang-format -style=file -i {} \;

Parameters
  • sensor_ip – The IP4 address of the sensor.

  • sensor_tcp_port – The TCP port of the sensor (COLA2).

  • comm_settings – A CommSettings object containing parameters to be sent to the sensor. The host (client) UDP port, if not available for allocation, might be overwritten by an automatically choosen one.

  • callback – A callback to process incomming sensor data.

  • io_service – A boost::asio io_service instance used internally to manage sockets and threads. This constructor variant prevents creating an internal io_service and relies on the caller to perform run-calls and keep the io_service alive.

~AsyncSickSafetyScanner()

Destructor of the AsyncSickSafetyScanner object.

void run()

Starts to receive sensor data via UDP and passes the data to the callback as specified in the constructor. This operation yields no timeouts.

void stop()

Stops receiving and processing sensor data.