3 #ifndef __CAN_BUS_SOCKET_HPP__
4 #define __CAN_BUS_SOCKET_HPP__
7 #include <linux/can/raw.h>
12 #include <yarp/dev/DeviceDriver.h>
13 #include <yarp/dev/CanBusInterface.h>
15 #include "SocketCanMessage.hpp"
28 public yarp::dev::ICanBus,
29 public yarp::dev::ImplementCanBufferFactory<SocketCanMessage, struct can_frame>
36 bool open(yarp::os::Searchable& config)
override;
37 bool close()
override;
40 bool canSetBaudRate(
unsigned int rate)
override;
41 bool canGetBaudRate(
unsigned int * rate)
override;
42 bool canIdAdd(
unsigned int id)
override;
43 bool canIdDelete(
unsigned int id)
override;
44 bool canRead(yarp::dev::CanBuffer & msgs,
unsigned int size,
unsigned int * read,
bool wait =
false)
override;
45 bool canWrite(
const yarp::dev::CanBuffer & msgs,
unsigned int size,
unsigned int * sent,
bool wait =
false)
override;
48 enum io_operation { READ, WRITE };
50 bool waitUntilTimeout(io_operation op,
bool * bufferReady);
51 void interpretErrorFrame(
const struct can_frame * msg);
56 bool filterFunctionCodes;
57 unsigned int bitrate {0};
61 std::vector<struct can_filter> filters;
Definition: CanBusSocket.hpp:30
The main, catch-all namespace for Robotics Lab UC3M.
Definition: groups.dox:6