yarp-devices
Public Member Functions | Private Attributes | List of all members
roboticslab::YarpCanSenderDelegate Class Reference

A sender delegate that adheres to standard YARP interfaces for CAN.

#include <YarpCanSenderDelegate.hpp>

Inheritance diagram for roboticslab::YarpCanSenderDelegate:
roboticslab::ICanSenderDelegate

Public Member Functions

 YarpCanSenderDelegate (yarp::dev::CanBuffer &_buffer, std::mutex &_bufferMutex, unsigned int &n, unsigned int size)
 Constructor, takes a reference to an existing CAN message buffer.
 
bool prepareMessage (const can_message &msg) override
 Register CAN message for write.
 
void reportAvailability (bool available, unsigned int id) override
 Report availability of CAN node.
 
- Public Member Functions inherited from roboticslab::ICanSenderDelegate
virtual ~ICanSenderDelegate ()=default
 Virtual destructor.
 

Private Attributes

yarp::dev::CanBuffer & buffer
 
std::mutex & bufferMutex
 
unsigned int & preparedMessages
 
unsigned int maxSize
 
std::atomic_bool isActive
 
std::unordered_map< unsigned int, bool > nodeAvailability
 

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