Public Member Functions | Private Member Functions | Private Attributes
icl_hardware::canopen_schunk::CanOpenReceiveThread Class Reference

The CanOpenReceiveThread class handles incoming canOpen messages. More...

#include <CanOpenReceiveThread.h>

List of all members.

Public Member Functions

 CanOpenReceiveThread (const icl_core::TimeSpan &period, const boost::shared_ptr< icl_hardware::can::tCanDevice > &can_device, const ReceivedPacketCallback &received_callback)
 CanOpenReceiveThread constructor.
void stop ()
 stops thread execution
virtual ~CanOpenReceiveThread ()
 ~CanOpenReceiveThread Destructor

Private Member Functions

int32_t receiveData ()
 receiveData Reads Data from the can driver and calls the data receivec callback if it was valid
void workerFunction ()
 state machine processing received data

Private Attributes

boost::shared_ptr
< icl_hardware::can::tCanDevice
m_can_device
 Can handle for message receiving.
icl_hardware::can::tCanMessage m_can_msg
 Can message for storing and transmission of received data.
int32_t m_period_time_ms
 Cycle period of the receive thread.
ReceivedPacketCallback m_received_callback
 Callback for parsing of correctly received can messages (protocoll will be evaluated there)
boost::thread m_thread
 Feedback thread handle.

Detailed Description

The CanOpenReceiveThread class handles incoming canOpen messages.

The CanOpenReceiveThread uses the can device to listen for new messages. Once received it processes the general message to ensure that it is a valid can message without errors. If so the actual parsing of the message is handled by the CanOpenController class which is called via callback.

Definition at line 49 of file CanOpenReceiveThread.h.


Constructor & Destructor Documentation

icl_hardware::canopen_schunk::CanOpenReceiveThread::CanOpenReceiveThread ( const icl_core::TimeSpan period,
const boost::shared_ptr< icl_hardware::can::tCanDevice > &  can_device,
const ReceivedPacketCallback received_callback 
)

CanOpenReceiveThread constructor.

Parameters:
periodTime periods between two can readings
can_deviceshared pointer to a can device
received_callbackHandle to a callback function that processes the can messages

Definition at line 32 of file CanOpenReceiveThread.cpp.

~CanOpenReceiveThread Destructor

Definition at line 42 of file CanOpenReceiveThread.cpp.


Member Function Documentation

receiveData Reads Data from the can driver and calls the data receivec callback if it was valid

Returns:
0 on succes, a value <0 if an error eccoured

Definition at line 91 of file CanOpenReceiveThread.cpp.

stops thread execution

Definition at line 86 of file CanOpenReceiveThread.cpp.

state machine processing received data

Definition at line 49 of file CanOpenReceiveThread.cpp.


Member Data Documentation

Can handle for message receiving.

Definition at line 84 of file CanOpenReceiveThread.h.

Can message for storing and transmission of received data.

Definition at line 93 of file CanOpenReceiveThread.h.

Cycle period of the receive thread.

Definition at line 81 of file CanOpenReceiveThread.h.

Callback for parsing of correctly received can messages (protocoll will be evaluated there)

Definition at line 87 of file CanOpenReceiveThread.h.

Feedback thread handle.

Definition at line 90 of file CanOpenReceiveThread.h.


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


schunk_canopen_driver
Author(s): Felix Mauch , Georg Heppner
autogenerated on Sun May 22 2016 03:30:56