Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
uavcan_stm32::CanDriver Class Reference

#include <can.hpp>

Inheritance diagram for uavcan_stm32::CanDriver:
Inheritance graph
[legend]

Public Member Functions

template<unsigned RxQueueCapacity>
 CanDriver (CanRxItem(&rx_queue_storage)[UAVCAN_STM32_NUM_IFACES][RxQueueCapacity])
 
virtual CanIfacegetIface (uavcan::uint8_t iface_index)
 
virtual uavcan::uint8_t getNumIfaces () const
 
bool hadActivity ()
 
bool hasReadableInterfaces () const
 
int init (const uavcan::uint32_t bitrate, const CanIface::OperatingMode mode)
 
uavcan::CanSelectMasks makeSelectMasks (const uavcan::CanFrame *(&pending_tx)[uavcan::MaxCanIfaces]) const
 
- Public Member Functions inherited from uavcan::ICanDriver
virtual const ICanIfacegetIface (uint8_t iface_index) const
 
virtual int16_t select (CanSelectMasks &inout_masks, const CanFrame *(&pending_tx)[MaxCanIfaces], MonotonicTime blocking_deadline)=0
 
virtual ~ICanDriver ()
 

Private Member Functions

virtual uavcan::int16_t select (uavcan::CanSelectMasks &inout_masks, const uavcan::CanFrame *(&pending_tx)[uavcan::MaxCanIfaces], uavcan::MonotonicTime blocking_deadline)
 
- Private Member Functions inherited from uavcan::Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 

Static Private Member Functions

static void initOnce ()
 

Private Attributes

CanIface if0_
 
BusEvent update_event_
 

Detailed Description

CAN driver, incorporates all available CAN ifaces. Please avoid direct use, prefer CanInitHelper instead.

Definition at line 234 of file platform_specific_components/stm32/libuavcan/driver/include/uavcan_stm32/can.hpp.

Constructor & Destructor Documentation

◆ CanDriver()

template<unsigned RxQueueCapacity>
uavcan_stm32::CanDriver::CanDriver ( CanRxItem(&)  rx_queue_storage[UAVCAN_STM32_NUM_IFACES][RxQueueCapacity])
inline

Member Function Documentation

◆ getIface()

CanIface * uavcan_stm32::CanDriver::getIface ( uavcan::uint8_t  iface_index)
virtual

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

Implements uavcan::ICanDriver.

Definition at line 1116 of file uc_stm32_can.cpp.

◆ getNumIfaces()

virtual uavcan::uint8_t uavcan_stm32::CanDriver::getNumIfaces ( ) const
inlinevirtual

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

Implements uavcan::ICanDriver.

Definition at line 278 of file platform_specific_components/stm32/libuavcan/driver/include/uavcan_stm32/can.hpp.

◆ hadActivity()

bool uavcan_stm32::CanDriver::hadActivity ( )

Whether at least one iface had at least one successful IO since previous call of this method. This is designed for use with iface activity LEDs.

Definition at line 1125 of file uc_stm32_can.cpp.

◆ hasReadableInterfaces()

bool uavcan_stm32::CanDriver::hasReadableInterfaces ( ) const

Whether there's at least one interface where receive() would return a frame.

Definition at line 915 of file uc_stm32_can.cpp.

◆ init()

int uavcan_stm32::CanDriver::init ( const uavcan::uint32_t  bitrate,
const CanIface::OperatingMode  mode 
)

Returns zero if OK. Returns negative value if failed (e.g. invalid bitrate).

Definition at line 1064 of file uc_stm32_can.cpp.

◆ initOnce()

void uavcan_stm32::CanDriver::initOnce ( )
staticprivate

Definition at line 979 of file uc_stm32_can.cpp.

◆ makeSelectMasks()

uavcan::CanSelectMasks uavcan_stm32::CanDriver::makeSelectMasks ( const uavcan::CanFrame *(&)  pending_tx[uavcan::MaxCanIfaces]) const

This function returns select masks indicating which interfaces are available for read/write.

Definition at line 885 of file uc_stm32_can.cpp.

◆ select()

uavcan::int16_t uavcan_stm32::CanDriver::select ( uavcan::CanSelectMasks inout_masks,
const uavcan::CanFrame *(&)  pending_tx[uavcan::MaxCanIfaces],
uavcan::MonotonicTime  blocking_deadline 
)
privatevirtual

Definition at line 926 of file uc_stm32_can.cpp.

Member Data Documentation

◆ if0_

CanIface uavcan_stm32::CanDriver::if0_
private

◆ update_event_

BusEvent uavcan_stm32::CanDriver::update_event_
private

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


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