Public Member Functions | Public Attributes | List of all members
CanDriverMock Class Reference

#include <can.hpp>

Inheritance diagram for CanDriverMock:
Inheritance graph
[legend]

Public Member Functions

 CanDriverMock (unsigned num_ifaces, uavcan::ISystemClock &iclock)
 
virtual uavcan::ICanIfacegetIface (uavcan::uint8_t iface_index)
 
virtual const uavcan::ICanIfacegetIface (uavcan::uint8_t iface_index) const
 
virtual uavcan::uint8_t getNumIfaces () const
 
void pushRxToAllIfaces (const uavcan::CanFrame &can_frame)
 
virtual uavcan::int16_t select (uavcan::CanSelectMasks &inout_masks, const uavcan::CanFrame *(&pending_tx)[uavcan::MaxCanIfaces], uavcan::MonotonicTime deadline)
 
- Public Member Functions inherited from uavcan::ICanDriver
virtual int16_t select (CanSelectMasks &inout_masks, const CanFrame *(&pending_tx)[MaxCanIfaces], MonotonicTime blocking_deadline)=0
 
virtual ~ICanDriver ()
 

Public Attributes

uavcan::ISystemClockiclock
 
std::vector< CanIfaceMockifaces
 
bool select_failure
 

Detailed Description

Definition at line 190 of file libuavcan/libuavcan/test/transport/can/can.hpp.

Constructor & Destructor Documentation

◆ CanDriverMock()

CanDriverMock::CanDriverMock ( unsigned  num_ifaces,
uavcan::ISystemClock iclock 
)
inline

Member Function Documentation

◆ getIface() [1/2]

virtual uavcan::ICanIface* CanDriverMock::getIface ( uavcan::uint8_t  iface_index)
inlinevirtual

Returns an interface by index, or null pointer if the index is out of range.

Implements uavcan::ICanDriver.

Definition at line 272 of file libuavcan/libuavcan/test/transport/can/can.hpp.

◆ getIface() [2/2]

virtual const uavcan::ICanIface* CanDriverMock::getIface ( uavcan::uint8_t  iface_index) const
inlinevirtual

Default implementation of this method calls the non-const overload of getIface(). Can be overriden by the application if necessary.

Reimplemented from uavcan::ICanDriver.

Definition at line 273 of file libuavcan/libuavcan/test/transport/can/can.hpp.

◆ getNumIfaces()

virtual uavcan::uint8_t CanDriverMock::getNumIfaces ( ) const
inlinevirtual

Total number of available CAN interfaces. This value shall not change after initialization.

Implements uavcan::ICanDriver.

Definition at line 274 of file libuavcan/libuavcan/test/transport/can/can.hpp.

◆ pushRxToAllIfaces()

void CanDriverMock::pushRxToAllIfaces ( const uavcan::CanFrame can_frame)
inline

◆ select()

virtual uavcan::int16_t CanDriverMock::select ( uavcan::CanSelectMasks inout_masks,
const uavcan::CanFrame *(&)  pending_tx[uavcan::MaxCanIfaces],
uavcan::MonotonicTime  deadline 
)
inlinevirtual

Member Data Documentation

◆ iclock

uavcan::ISystemClock& CanDriverMock::iclock

◆ ifaces

std::vector<CanIfaceMock> CanDriverMock::ifaces

◆ select_failure

bool CanDriverMock::select_failure

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


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:04