Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
sick::SickSafetyscanners Class Reference

Class managing the algorithmic part of the package. More...

#include <SickSafetyscanners.h>

Public Types

typedef boost::function< void(const sick::datastructure::Data &)> packetReceivedCallbackFunction
 

Public Member Functions

void changeSensorSettings (const sick::datastructure::CommSettings &settings)
 Changes the internal settings of the sensor. More...
 
void FindSensor (const datastructure::CommSettings &settings, uint16_t blink_time)
 
void requestApplicationName (const sick::datastructure::CommSettings &settings, sick::datastructure::ApplicationName &application_name)
 
void requestConfigMetadata (const datastructure::CommSettings &settings, datastructure::ConfigMetadata &config_metadata)
 
void requestDeviceName (const sick::datastructure::CommSettings &settings, datastructure::DeviceName &device_name)
 Requests the name of the device from the sensor. More...
 
void requestDeviceStatus (const datastructure::CommSettings &settings, datastructure::DeviceStatus &device_status)
 
void requestFieldData (const sick::datastructure::CommSettings &settings, std::vector< sick::datastructure::FieldData > &field_data)
 Requests data of the protective and warning fields from the sensor. More...
 
void requestFirmwareVersion (const sick::datastructure::CommSettings &settings, sick::datastructure::FirmwareVersion &firmware_version)
 
void requestMonitoringCases (const sick::datastructure::CommSettings &settings, std::vector< sick::datastructure::MonitoringCaseData > &monitoring_cases)
 Requests the monitoring cases from the sensor. More...
 
void requestOrderNumber (const datastructure::CommSettings &settings, datastructure::OrderNumber &order_number)
 
void requestPersistentConfig (const datastructure::CommSettings &settings, sick::datastructure::ConfigData &config_data)
 Requests the persistent configuration from the sensor. More...
 
void requestProjectName (const datastructure::CommSettings &settings, datastructure::ProjectName &project_name)
 
void requestRequiredUserAction (const datastructure::CommSettings &settings, datastructure::RequiredUserAction &required_user_action)
 
void requestSerialNumber (const sick::datastructure::CommSettings &settings, sick::datastructure::SerialNumber &serial_number)
 
void requestStatusOverview (const datastructure::CommSettings &settings, datastructure::StatusOverview &status_overview)
 
void requestTypeCode (const sick::datastructure::CommSettings &settings, sick::datastructure::TypeCode &type_code)
 Requests the typecode of the sensor. More...
 
void requestUserName (const datastructure::CommSettings &settings, datastructure::UserName &user_name)
 
bool run ()
 Start the connection to the sensor and enables output. More...
 
 SickSafetyscanners (const packetReceivedCallbackFunction &newPacketReceivedCallbackFunction, sick::datastructure::CommSettings *settings, boost::asio::ip::address_v4 interface_ip)
 Constructor of the SickSafetyscanners class. More...
 
virtual ~SickSafetyscanners ()
 Destructor. More...
 

Private Member Functions

void changeCommSettingsInColaSession (const datastructure::CommSettings &settings)
 
void FindSensorInColaSession (uint16_t blink_time)
 
void processTCPPacket (const sick::datastructure::PacketBuffer &buffer)
 
void processUDPPacket (const sick::datastructure::PacketBuffer &buffer)
 
void requestApplicationNameInColaSession (sick::datastructure::ApplicationName &application_name)
 
void requestConfigMetadataInColaSession (sick::datastructure::ConfigMetadata &config_metadata)
 
void requestDeviceNameInColaSession (datastructure::DeviceName &device_name)
 
void requestDeviceStatusInColaSession (sick::datastructure::DeviceStatus &device_status)
 
void requestFieldDataInColaSession (std::vector< sick::datastructure::FieldData > &fields)
 
void requestFirmwareVersionInColaSession (sick::datastructure::FirmwareVersion &firmware_version)
 
void requestMonitoringCaseDataInColaSession (std::vector< sick::datastructure::MonitoringCaseData > &monitoring_cases)
 
void requestOrderNumberInColaSession (sick::datastructure::OrderNumber &order_number)
 
void requestPersistentConfigInColaSession (sick::datastructure::ConfigData &config_data)
 
void requestProjectNameInColaSession (sick::datastructure::ProjectName &project_name)
 
void requestRequiredUserActionInColaSession (sick::datastructure::RequiredUserAction &required_user_action)
 
void requestSerialNumberInColaSession (sick::datastructure::SerialNumber &serial_number)
 
void requestStatusOverviewInColaSession (sick::datastructure::StatusOverview &status_overview)
 
void requestTypeCodeInColaSession (sick::datastructure::TypeCode &type_code)
 
void requestUserNameInColaSession (sick::datastructure::UserName &user_name)
 
void startTCPConnection (const sick::datastructure::CommSettings &settings)
 
void stopTCPConnection ()
 
bool udpClientThread ()
 

Private Attributes

std::shared_ptr< sick::communication::AsyncTCPClientm_async_tcp_client_ptr
 
std::shared_ptr< sick::communication::AsyncUDPClientm_async_udp_client_ptr
 
std::shared_ptr< boost::asio::io_service > m_io_service_ptr
 
std::shared_ptr< boost::asio::io_service::work > m_io_work_ptr
 
packetReceivedCallbackFunction m_newPacketReceivedCallbackFunction
 
std::shared_ptr< sick::data_processing::UDPPacketMergerm_packet_merger_ptr
 
std::shared_ptr< sick::cola2::Cola2Sessionm_session_ptr
 
boost::scoped_ptr< boost::thread > m_udp_client_thread_ptr
 

Detailed Description

Class managing the algorithmic part of the package.

Definition at line 83 of file SickSafetyscanners.h.

Member Typedef Documentation

Typedef for function which has to be passed to this class. This enables the use of functions from the calling class.

Definition at line 90 of file SickSafetyscanners.h.

Constructor & Destructor Documentation

sick::SickSafetyscanners::SickSafetyscanners ( const packetReceivedCallbackFunction newPacketReceivedCallbackFunction,
sick::datastructure::CommSettings settings,
boost::asio::ip::address_v4  interface_ip 
)

Constructor of the SickSafetyscanners class.

Parameters
newPacketReceivedCallbackFunctionFunction from the calling class, which will be called when a new packet is received.
settingsCurrent settings for the sensor.

Definition at line 40 of file SickSafetyscanners.cpp.

sick::SickSafetyscanners::~SickSafetyscanners ( )
virtual

Destructor.

Definition at line 73 of file SickSafetyscanners.cpp.

Member Function Documentation

void sick::SickSafetyscanners::changeCommSettingsInColaSession ( const datastructure::CommSettings settings)
private

Definition at line 256 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::changeSensorSettings ( const sick::datastructure::CommSettings settings)

Changes the internal settings of the sensor.

Parameters
settingsNew set of settings to pass to the sensor.

Definition at line 104 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::FindSensor ( const datastructure::CommSettings settings,
uint16_t  blink_time 
)

Definition at line 111 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::FindSensorInColaSession ( uint16_t  blink_time)
private

Definition at line 314 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::processTCPPacket ( const sick::datastructure::PacketBuffer buffer)
private

Definition at line 99 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::processUDPPacket ( const sick::datastructure::PacketBuffer buffer)
private

Definition at line 449 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestApplicationName ( const sick::datastructure::CommSettings settings,
sick::datastructure::ApplicationName application_name 
)

Definition at line 127 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestApplicationNameInColaSession ( sick::datastructure::ApplicationName application_name)
private

Definition at line 331 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestConfigMetadata ( const datastructure::CommSettings settings,
datastructure::ConfigMetadata config_metadata 
)

Definition at line 207 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestConfigMetadataInColaSession ( sick::datastructure::ConfigMetadata config_metadata)
private

Definition at line 397 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestDeviceName ( const sick::datastructure::CommSettings settings,
datastructure::DeviceName device_name 
)

Requests the name of the device from the sensor.

Parameters
settingsSettings containing information to establish a connection to the sensor.
device_nameReturned device name.

Definition at line 152 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestDeviceNameInColaSession ( datastructure::DeviceName device_name)
private

Definition at line 321 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestDeviceStatus ( const datastructure::CommSettings settings,
datastructure::DeviceStatus device_status 
)

Definition at line 223 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestDeviceStatusInColaSession ( sick::datastructure::DeviceStatus device_status)
private

Definition at line 415 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestFieldData ( const sick::datastructure::CommSettings settings,
std::vector< sick::datastructure::FieldData > &  field_data 
)

Requests data of the protective and warning fields from the sensor.

Parameters
settingsSettings containing information to establish a connection to the sensor.
field_dataReturned field data.

Definition at line 135 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestFieldDataInColaSession ( std::vector< sick::datastructure::FieldData > &  fields)
private

Definition at line 264 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestFirmwareVersion ( const sick::datastructure::CommSettings settings,
sick::datastructure::FirmwareVersion firmware_version 
)

Definition at line 191 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestFirmwareVersionInColaSession ( sick::datastructure::FirmwareVersion firmware_version)
private

Definition at line 351 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestMonitoringCaseDataInColaSession ( std::vector< sick::datastructure::MonitoringCaseData > &  monitoring_cases)
private

Definition at line 292 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestMonitoringCases ( const sick::datastructure::CommSettings settings,
std::vector< sick::datastructure::MonitoringCaseData > &  monitoring_cases 
)

Requests the monitoring cases from the sensor.

Parameters
settingsSettings containing information to establish a connection to the sensor.
monitoring_casesReturned monitoring cases.

Definition at line 143 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestOrderNumber ( const datastructure::CommSettings settings,
datastructure::OrderNumber order_number 
)

Definition at line 168 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestOrderNumberInColaSession ( sick::datastructure::OrderNumber order_number)
private

Definition at line 369 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestPersistentConfig ( const datastructure::CommSettings settings,
sick::datastructure::ConfigData config_data 
)

Requests the persistent configuration from the sensor.

Parameters
settingsSettings containing information to establish a connection to the sensor.
config_dataReturned persistent configuration data.

Definition at line 199 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestPersistentConfigInColaSession ( sick::datastructure::ConfigData config_data)
private

Definition at line 433 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestProjectName ( const datastructure::CommSettings settings,
datastructure::ProjectName project_name 
)

Definition at line 176 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestProjectNameInColaSession ( sick::datastructure::ProjectName project_name)
private

Definition at line 379 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestRequiredUserAction ( const datastructure::CommSettings settings,
datastructure::RequiredUserAction required_user_action 
)

Definition at line 231 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestRequiredUserActionInColaSession ( sick::datastructure::RequiredUserAction required_user_action)
private

Definition at line 424 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestSerialNumber ( const sick::datastructure::CommSettings settings,
sick::datastructure::SerialNumber serial_number 
)

Definition at line 160 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestSerialNumberInColaSession ( sick::datastructure::SerialNumber serial_number)
private

Definition at line 341 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestStatusOverview ( const datastructure::CommSettings settings,
datastructure::StatusOverview status_overview 
)

Definition at line 215 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestStatusOverviewInColaSession ( sick::datastructure::StatusOverview status_overview)
private

Definition at line 406 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestTypeCode ( const sick::datastructure::CommSettings settings,
sick::datastructure::TypeCode type_code 
)

Requests the typecode of the sensor.

Parameters
settingsSettings containing information to establish a connection to the sensor.
type_codeReturned typecode.

Definition at line 119 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestTypeCodeInColaSession ( sick::datastructure::TypeCode type_code)
private

Definition at line 361 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestUserName ( const datastructure::CommSettings settings,
datastructure::UserName user_name 
)

Definition at line 184 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestUserNameInColaSession ( sick::datastructure::UserName user_name)
private

Definition at line 389 of file SickSafetyscanners.cpp.

bool sick::SickSafetyscanners::run ( )

Start the connection to the sensor and enables output.

Returns
If the setup was correct.

Definition at line 80 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::startTCPConnection ( const sick::datastructure::CommSettings settings)
private

Definition at line 240 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::stopTCPConnection ( )
private

Definition at line 442 of file SickSafetyscanners.cpp.

bool sick::SickSafetyscanners::udpClientThread ( )
private

Definition at line 89 of file SickSafetyscanners.cpp.

Member Data Documentation

std::shared_ptr<sick::communication::AsyncTCPClient> sick::SickSafetyscanners::m_async_tcp_client_ptr
private

Definition at line 191 of file SickSafetyscanners.h.

std::shared_ptr<sick::communication::AsyncUDPClient> sick::SickSafetyscanners::m_async_udp_client_ptr
private

Definition at line 190 of file SickSafetyscanners.h.

std::shared_ptr<boost::asio::io_service> sick::SickSafetyscanners::m_io_service_ptr
private

Definition at line 188 of file SickSafetyscanners.h.

std::shared_ptr<boost::asio::io_service::work> sick::SickSafetyscanners::m_io_work_ptr
private

Definition at line 189 of file SickSafetyscanners.h.

packetReceivedCallbackFunction sick::SickSafetyscanners::m_newPacketReceivedCallbackFunction
private

Definition at line 186 of file SickSafetyscanners.h.

std::shared_ptr<sick::data_processing::UDPPacketMerger> sick::SickSafetyscanners::m_packet_merger_ptr
private

Definition at line 196 of file SickSafetyscanners.h.

std::shared_ptr<sick::cola2::Cola2Session> sick::SickSafetyscanners::m_session_ptr
private

Definition at line 194 of file SickSafetyscanners.h.

boost::scoped_ptr<boost::thread> sick::SickSafetyscanners::m_udp_client_thread_ptr
private

Definition at line 192 of file SickSafetyscanners.h.


The documentation for this class was generated from the following files:


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