|
CARMA C++
|
Implements the CanIo interface using the socketcan framework. More...
#include <carma/canbus/SocketCan.h>
Public Member Functions | |
| void | echoAll (bool enable) |
| Echo all CAN messages. More... | |
| BusStatusMap | getBusStatus () const |
| Retrieve bus statistics indexed by bus id. More... | |
| carma::canbus::Message | getMessage () |
| Wait and retrieve a CAN message. More... | |
| void | postMessage (const carma::canbus::Message &msg, carma::canbus::txPriorityType p=carma::canbus::NORMAL) |
| Post a message to a single or multiple CAN busses. More... | |
| SocketCan () | |
| Constructor for use with all busses on the system. More... | |
| SocketCan (const ::std::vector< ::std::string > &canInterfaces) | |
| Constructor for use with specific busses. More... | |
| virtual | ~SocketCan () |
| Destructor. More... | |
Public Member Functions inherited from carma::canbus::CanIo | |
| virtual void | clearReadQueue () |
| Clear any underlying read buffers. More... | |
| virtual void | queueMessage (const Message &msg) |
| Queue CAN message to be read for simulation purposes. More... | |
| virtual void | setTimestampEchoLatency (int tsLatency, busIdType busId) |
| Set timestamp echo latency. More... | |
| virtual | ~CanIo () |
| Virtual destructor. More... | |
Static Public Member Functions | |
| static busIdType | parseBusId (const std::string &canInterfaceName) |
| Parse bus id given an interface name (e.g. More... | |
Implements the CanIo interface using the socketcan framework.
Definition at line 26 of file SocketCan.h.
| carma::canbus::SocketCan::SocketCan | ( | ) |
Constructor for use with all busses on the system.
|
explicit |
Constructor for use with specific busses.
| canInterfaces | Vector of interface names (e.g. ["can0", "can1"]). |
|
virtual |
Destructor.
|
virtual |
Echo all CAN messages.
This method causes sent messages to be echoed back through the read interface.
Reimplemented from carma::canbus::CanIo.
|
virtual |
Retrieve bus statistics indexed by bus id.
Reimplemented from carma::canbus::CanIo.
|
virtual |
Wait and retrieve a CAN message.
This routine is boost::thread interruptable and carma thread quitable.
Implements carma::canbus::CanIo.
|
static |
Parse bus id given an interface name (e.g.
can0).
|
virtual |
Post a message to a single or multiple CAN busses.
Implements carma::canbus::CanOutput.