CARMA C++
carma::canbus::CanIo Class Referenceabstract

CanIo interface. More...

#include <carma/canbus/CanIo.h>

Inheritance diagram for carma::canbus::CanIo:
carma::canbus::CanOutput carma::canbus::CanDio carma::canbus::DirectCan carma::canbus::InetCan carma::canbus::JanzCanIo carma::canbus::SocketCan carma::canbus::Master carma::antenna::bima::IFCanMaster carma::antenna::ovro::OvroMaster carma::canbus::MasterOfNone carma::clock::ClockMaster carma::downconverter::SldcMaster carma::downconverter::WbdcMaster carma::loberotator::LoberotatorMaster

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...
 
- Public Member Functions inherited from carma::canbus::CanOutput
virtual void postMessage (const carma::canbus::Message &msg, carma::canbus::txPriorityType prio=carma::canbus::NORMAL)=0
 Post a CAN message. More...
 

Detailed Description

CanIo interface.

Abstract base class to define core CANbus communication.

Definition at line 22 of file CanIo.h.

Constructor & Destructor Documentation

virtual carma::canbus::CanIo::~CanIo ( )
virtual

Virtual destructor.

Assures that a call to destroy CanIo memory will actually destroy the inherited class it came from.

Member Function Documentation

virtual void carma::canbus::CanIo::clearReadQueue ( )
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 void carma::canbus::CanIo::echoAll ( bool  enable)
virtual

Enable or disable echoing sent messages back through the read interface.

The default implementation is a no-op.

Parameters
enableEcho CAN messages if true, don't if false.

Reimplemented in carma::canbus::JanzCanIo, carma::canbus::CanDio, and carma::canbus::SocketCan.

virtual BusStatusMap carma::canbus::CanIo::getBusStatus ( ) const
virtual

Retrieve bus statistics.

The default implementation returns an empty BusStatusMap.

Returns
carma::canbus::BusStatusMap

Reimplemented in carma::canbus::JanzCanIo, and carma::canbus::SocketCan.

virtual carma::canbus::Message carma::canbus::CanIo::getMessage ( )
pure virtual

Retrieve a CAN message.

This routine should block until a message is available.

Returns
carma::canbus::Message object.

Implemented in carma::canbus::JanzCanIo, carma::canbus::CanDio, carma::canbus::DirectCan, carma::canbus::InetCan, and carma::canbus::SocketCan.

virtual void carma::canbus::CanIo::queueMessage ( const Message msg)
virtual

Queue CAN message to be read for simulation purposes.

By default this method is a no-op.

Parameters
msgMessage object to queue.

Reimplemented in carma::canbus::JanzCanIo, and carma::canbus::CanDio.

virtual void carma::canbus::CanIo::setTimestampEchoLatency ( int  tsLatency,
busIdType  busId 
)
virtual

Set timestamp echo latency.

By default this method is a no-op.

Parameters
tsLatencyTimestamp latency in microseconds.
busIdBus identifier.

Reimplemented in carma::canbus::JanzCanIo, and carma::canbus::CanDio.


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