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 requestDeviceName (const sick::datastructure::CommSettings &settings, std::string &device_name)
 Requests the name of the device from the sensor. More...
 
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 requestMonitoringCases (const sick::datastructure::CommSettings &settings, std::vector< sick::datastructure::MonitoringCaseData > &monitoring_cases)
 Requests the monitoring cases from the sensor. More...
 
void requestPersistentConfig (const datastructure::CommSettings &settings, sick::datastructure::ConfigData &config_data)
 Requests the persistent configuration from the sensor. More...
 
void requestTypeCode (const sick::datastructure::CommSettings &settings, sick::datastructure::TypeCode &type_code)
 Requests the typecode of the sensor. More...
 
bool run ()
 Start the connection to the sensor and enables output. More...
 
 SickSafetyscanners (packetReceivedCallbackFunction newPacketReceivedCallbackFunction, sick::datastructure::CommSettings *settings)
 Constructor of the SickSafetyscanners class. More...
 
virtual ~SickSafetyscanners ()
 Destructor. More...
 

Private Member Functions

void changeCommSettingsInColaSession (const datastructure::CommSettings &settings)
 
void processTCPPacket (const sick::datastructure::PacketBuffer &buffer)
 
void processUDPPacket (const datastructure::PacketBuffer &buffer)
 
void requestDeviceNameInColaSession (std::string &device_name)
 
void requestFieldDataInColaSession (std::vector< sick::datastructure::FieldData > &fields)
 
void requestMonitoringCaseDataInColaSession (std::vector< sick::datastructure::MonitoringCaseData > &monitoring_cases)
 
void requestPersistentConfigInColaSession (sick::datastructure::ConfigData &config_data)
 
void requestTypeCodeInColaSession (sick::datastructure::TypeCode &type_code)
 
void startTCPConnection (const sick::datastructure::CommSettings &settings)
 
void stopTCPConnection ()
 
bool UDPClientThread ()
 

Private Attributes

int m_active_case_number
 
std::shared_ptr< sick::communication::AsyncTCPClientm_async_tcp_client_ptr
 
std::shared_ptr< sick::communication::AsyncUDPClientm_async_udp_client_ptr
 
std::string m_device_name
 
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 72 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 79 of file SickSafetyscanners.h.

Constructor & Destructor Documentation

sick::SickSafetyscanners::SickSafetyscanners ( packetReceivedCallbackFunction  newPacketReceivedCallbackFunction,
sick::datastructure::CommSettings settings 
)

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 58 of file SickSafetyscanners.cpp.

Member Function Documentation

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

Definition at line 165 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 89 of file SickSafetyscanners.cpp.

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

Definition at line 84 of file SickSafetyscanners.cpp.

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

Definition at line 272 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestDeviceName ( const sick::datastructure::CommSettings settings,
std::string &  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 129 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::requestDeviceNameInColaSession ( std::string &  device_name)
private

Definition at line 240 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 108 of file SickSafetyscanners.cpp.

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

Definition at line 173 of file SickSafetyscanners.cpp.

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

Definition at line 218 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 118 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 139 of file SickSafetyscanners.cpp.

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

Definition at line 256 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 98 of file SickSafetyscanners.cpp.

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

Definition at line 249 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 65 of file SickSafetyscanners.cpp.

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

Definition at line 149 of file SickSafetyscanners.cpp.

void sick::SickSafetyscanners::stopTCPConnection ( )
private

Definition at line 265 of file SickSafetyscanners.cpp.

bool sick::SickSafetyscanners::UDPClientThread ( )
private

Definition at line 74 of file SickSafetyscanners.cpp.

Member Data Documentation

int sick::SickSafetyscanners::m_active_case_number
private

Definition at line 166 of file SickSafetyscanners.h.

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

Definition at line 158 of file SickSafetyscanners.h.

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

Definition at line 157 of file SickSafetyscanners.h.

std::string sick::SickSafetyscanners::m_device_name
private

Definition at line 165 of file SickSafetyscanners.h.

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

Definition at line 155 of file SickSafetyscanners.h.

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

Definition at line 156 of file SickSafetyscanners.h.

packetReceivedCallbackFunction sick::SickSafetyscanners::m_newPacketReceivedCallbackFunction
private

Definition at line 153 of file SickSafetyscanners.h.

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

Definition at line 163 of file SickSafetyscanners.h.

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

Definition at line 161 of file SickSafetyscanners.h.

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

Definition at line 159 of file SickSafetyscanners.h.


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


sick_safetyscanners
Author(s): Lennart Puck
autogenerated on Thu May 9 2019 02:41:08