A thread that attends CAN writes.
More...
#include <CanRxTxThreads.hpp>
|
| CanWriterThread (const std::string &id, double delay, unsigned int bufferSize) |
| Constructor.
|
|
| ~CanWriterThread () override |
| Destructor.
|
|
ICanSenderDelegate * | getDelegate () |
| Retrieve a handle to the CAN sender delegate.
|
|
void | flush () |
| Send awaiting messages and clear the queue.
|
|
void | run () override |
|
| CanReaderWriterThread (const std::string &type, const std::string &id, double delay, unsigned int bufferSize) |
| Constructor.
|
|
| ~CanReaderWriterThread () override=default |
| Virtual destructor.
|
|
bool | threadInit () override |
| Invoked by the thread right before it is started.
|
|
void | threadRelease () override |
| Invoked by the thread right after it is started.
|
|
void | beforeStart () override |
| Invoked by the caller right before the thread is started.
|
|
void | afterStart (bool success) override |
| Invoked by the caller right before the thread is joined.
|
|
void | onStop () override |
| Callback on thread stop.
|
|
void | setCanHandles (yarp::dev::ICanBus *iCanBus, yarp::dev::ICanBufferFactory *iCanBufferFactory) |
| Configure CAN interface handles.
|
|
void | attachDumpWriter (yarp::os::Contactable *dumpPort, yarp::os::PortWriterBuffer< yarp::os::Bottle > *dumpWriter, std::mutex *dumpMutex) |
| Attach YARP port writer for CAN message dumping.
|
|
void | attachBusLoadMonitor (ICanMessageNotifier *busLoadMonitor) |
| Attach CAN bus load monitor.
|
|
|
void | handlePartialWrite (unsigned int sent) |
| In case a write did not succeed, rearrange the CAN message buffer.
|
|
|
static void | dumpMessage (const can_message &msg, yarp::os::Bottle &b) |
| Dump a CAN message to a YARP bottle.
|
|
yarp::dev::ICanBus * | iCanBus |
|
yarp::dev::ICanBufferFactory * | iCanBufferFactory |
|
yarp::dev::CanBuffer | canBuffer |
|
yarp::os::Contactable * | dumpPort |
|
yarp::os::PortWriterBuffer< yarp::os::Bottle > * | dumpWriter |
|
std::mutex * | dumpMutex |
|
yarp::os::Stamp | lastStamp |
|
ICanMessageNotifier * | busLoadMonitor |
|
unsigned int | bufferSize |
|
double | delay |
|
Uses YarpCanSenderDelegate to let raw subdevices register outgoing CAN messages. Those are written to the CAN network in FIFO batches on each step.
The documentation for this class was generated from the following files:
- libraries/YarpPlugins/CanBusBroker/CanRxTxThreads.hpp
- libraries/YarpPlugins/CanBusBroker/CanRxTxThreads.cpp