3 #ifndef __YARP_CAN_SENDER_DELEGATE_HPP__
4 #define __YARP_CAN_SENDER_DELEGATE_HPP__
8 #include <unordered_map>
10 #include <yarp/dev/CanBusInterface.h>
12 #include "ICanSenderDelegate.hpp"
26 unsigned int & n,
unsigned int size)
28 bufferMutex(_bufferMutex),
38 yarp::dev::CanBuffer & buffer;
39 std::mutex & bufferMutex;
40 unsigned int & preparedMessages;
42 std::atomic_bool isActive;
43 std::unordered_map<unsigned int, bool> nodeAvailability;
Implementation-agnostic consumer for TX CAN transfers.
Definition: ICanSenderDelegate.hpp:22
A sender delegate that adheres to standard YARP interfaces for CAN.
Definition: YarpCanSenderDelegate.hpp:22
void reportAvailability(bool available, unsigned int id) override
Report availability of CAN node.
Definition: YarpCanSenderDelegate.cpp:38
YarpCanSenderDelegate(yarp::dev::CanBuffer &_buffer, std::mutex &_bufferMutex, unsigned int &n, unsigned int size)
Constructor, takes a reference to an existing CAN message buffer.
Definition: YarpCanSenderDelegate.hpp:25
bool prepareMessage(const can_message &msg) override
Register CAN message for write.
Definition: YarpCanSenderDelegate.cpp:11
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:6
Proxy CAN message structure.
Definition: CanMessage.hpp:20