CARMA C++
|
#include <carma/canbus/CanIo.h>
Public Member Functions | |
virtual void | clearReadQueue () |
Clear any underlying read buffers. More... | |
virtual void | echoAll (bool enable) |
Enable or disable echoing sent messages back through the read interface. More... | |
virtual BusStatusMap | getBusStatus () const |
Retrieve bus statistics. More... | |
virtual carma::canbus::Message | getMessage ()=0 |
Retrieve a CAN message. 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... | |
![]() | |
virtual void | postMessage (const carma::canbus::Message &msg, carma::canbus::txPriorityType prio=carma::canbus::NORMAL)=0 |
Post a CAN message. More... | |
CanIo interface.
Abstract base class to define core CANbus communication.
|
virtual |
Virtual destructor.
Assures that a call to destroy CanIo memory will actually destroy the inherited class it came from.
|
virtual |
Clear any underlying read buffers.
Useful for startup when we want to begin from a known reset state. Default implementation is a no-op.
Reimplemented in carma::canbus::JanzCanIo, and carma::canbus::CanDio.
|
virtual |
Enable or disable echoing sent messages back through the read interface.
The default implementation is a no-op.
enable | Echo CAN messages if true, don't if false. |
Reimplemented in carma::canbus::JanzCanIo, carma::canbus::CanDio, and carma::canbus::SocketCan.
|
virtual |
Retrieve bus statistics.
The default implementation returns an empty BusStatusMap.
Reimplemented in carma::canbus::JanzCanIo, and carma::canbus::SocketCan.
|
pure virtual |
Retrieve a CAN message.
This routine should block until a message is available.
Implemented in carma::canbus::JanzCanIo, carma::canbus::CanDio, carma::canbus::DirectCan, carma::canbus::InetCan, and carma::canbus::SocketCan.
|
virtual |
Queue CAN message to be read for simulation purposes.
By default this method is a no-op.
msg | Message object to queue. |
Reimplemented in carma::canbus::JanzCanIo, and carma::canbus::CanDio.
|
virtual |
Set timestamp echo latency.
By default this method is a no-op.
tsLatency | Timestamp latency in microseconds. |
busId | Bus identifier. |
Reimplemented in carma::canbus::JanzCanIo, and carma::canbus::CanDio.