Go to the documentation of this file.
40 #ifndef DRIVER_SVH_SVH_RECEIVE_THREAD_H_INCLUDED
41 #define DRIVER_SVH_SVH_RECEIVE_THREAD_H_INCLUDED
77 std::shared_ptr<Serial> device,
uint8_t m_checksum1
Checksum of packet.
uint16_t m_length
length of received serial data
The SerialPacket holds the (non generated) header and data of one message to the SVH-Hardware.
unsigned int receivedPacketCount()
return the count of received packets
unsigned int m_skipped_bytes
counter for skipped bytes in case no packet is detected
bool receiveData()
state machine processing received data
~SVHReceiveThread()
Default DTOR.
ReceivedPacketCallback m_received_callback
function callback for received packages
tState m_received_state
current state of the state machine
void resetReceivedPackageCount()
resetReceivedPackageCount Resets the received package count to zero. This can be usefull to set all c...
std::vector< uint8_t > m_data
length of received serial data
driver_svh::ArrayBuilder m_ab
pointer to array builder object for packet receive
void run()
run method of the thread, executes the main program in an infinite loop
std::atomic< unsigned int > m_packets_received
packets counter
std::function< void(const SVHSerialPacket &packet, unsigned int packet_count)> ReceivedPacketCallback
definition of function callback for received packages
Contains a class that enables access to serial devices.
Enables acces to serial devices.
std::atomic< bool > m_continue
Flag to end the run() method from external callers.
Class for receiving messages from the serial device.
std::shared_ptr< Serial > m_serial_device
pointer to serial device object
SVHReceiveThread(const std::chrono::microseconds &idle_sleep, std::shared_ptr< Serial > device, ReceivedPacketCallback const &received_callback)
SVHReceiveThread Constructs a new Receivethread.
tState
enum for receive packet state machine states
void stop()
stop the run() method
std::chrono::microseconds m_idle_sleep
sleep time during run() if idle
schunk_svh_library
Author(s): Georg Heppner, Lars Pfotzer, Felix Exner, Johannes Mangler, Stefan Scherzinger, Pascal Becker
autogenerated on Fri Apr 14 2023 02:53:52