APM:Libraries
Public Member Functions | Private Member Functions | Private Attributes | List of all members
VRBRAIN::VRBRAINCANManager Class Reference

#include <CAN.h>

Inheritance diagram for VRBRAIN::VRBRAINCANManager:
[legend]
Collaboration diagram for VRBRAIN::VRBRAINCANManager:
[legend]

Public Member Functions

 VRBRAINCANManager ()
 
uavcan::CanSelectMasks makeSelectMasks (const uavcan::CanFrame *(&pending_tx)[uavcan::MaxCanIfaces]) const
 
bool hasReadableInterfaces () const
 
int init (const uint32_t bitrate, const VRBRAINCAN::OperatingMode mode, uint8_t can_number)
 
virtual VRBRAINCANgetIface (uint8_t iface_index) override
 
VRBRAINCANgetIface_out_to_in (uint8_t iface_index)
 
virtual uint8_t getNumIfaces () const override
 
bool hadActivity ()
 
bool begin (uint32_t bitrate, uint8_t can_number) override
 
bool is_initialized () override
 
void initialized (bool val) override
 
AP_UAVCANget_UAVCAN (void) override
 
void set_UAVCAN (AP_UAVCAN *uavcan) override
 

Private Member Functions

virtual int16_t select (uavcan::CanSelectMasks &inout_masks, const uavcan::CanFrame *(&pending_tx)[uavcan::MaxCanIfaces], uavcan::MonotonicTime blocking_deadline) override
 
void initOnce (uint8_t can_number)
 

Private Attributes

BusEvent update_event_
 
VRBRAINCAN if0_
 
VRBRAINCAN if1_
 
bool initialized_
 
VRBRAINCANifaces [CAN_STM32_NUM_IFACES]
 
uint8_t _ifaces_num
 
uint8_t _ifaces_out_to_in [CAN_STM32_NUM_IFACES]
 
AP_UAVCANp_uavcan
 

Detailed Description

Definition at line 258 of file CAN.h.

Constructor & Destructor Documentation

◆ VRBRAINCANManager()

VRBRAIN::VRBRAINCANManager::VRBRAINCANManager ( )

Member Function Documentation

◆ begin()

bool VRBRAIN::VRBRAINCANManager::begin ( uint32_t  bitrate,
uint8_t  can_number 
)
override

◆ get_UAVCAN()

AP_UAVCAN* VRBRAIN::VRBRAINCANManager::get_UAVCAN ( void  )
override

◆ getIface()

virtual VRBRAINCAN* VRBRAIN::VRBRAINCANManager::getIface ( uint8_t  iface_index)
overridevirtual

◆ getIface_out_to_in()

VRBRAINCAN* VRBRAIN::VRBRAINCANManager::getIface_out_to_in ( uint8_t  iface_index)

◆ getNumIfaces()

virtual uint8_t VRBRAIN::VRBRAINCANManager::getNumIfaces ( ) const
inlineoverridevirtual

Definition at line 298 of file CAN.h.

◆ hadActivity()

bool VRBRAIN::VRBRAINCANManager::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.

◆ hasReadableInterfaces()

bool VRBRAIN::VRBRAINCANManager::hasReadableInterfaces ( ) const

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

◆ init()

int VRBRAIN::VRBRAINCANManager::init ( const uint32_t  bitrate,
const VRBRAINCAN::OperatingMode  mode,
uint8_t  can_number 
)

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

◆ initialized()

void VRBRAIN::VRBRAINCANManager::initialized ( bool  val)
override

◆ initOnce()

void VRBRAIN::VRBRAINCANManager::initOnce ( uint8_t  can_number)
private

◆ is_initialized()

bool VRBRAIN::VRBRAINCANManager::is_initialized ( )
override

◆ makeSelectMasks()

uavcan::CanSelectMasks VRBRAIN::VRBRAINCANManager::makeSelectMasks ( const uavcan::CanFrame *(&)  pending_tx[uavcan::MaxCanIfaces]) const

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

◆ select()

virtual int16_t VRBRAIN::VRBRAINCANManager::select ( uavcan::CanSelectMasks &  inout_masks,
const uavcan::CanFrame *(&)  pending_tx[uavcan::MaxCanIfaces],
uavcan::MonotonicTime  blocking_deadline 
)
overrideprivatevirtual

◆ set_UAVCAN()

void VRBRAIN::VRBRAINCANManager::set_UAVCAN ( AP_UAVCAN uavcan)
override

Member Data Documentation

◆ _ifaces_num

uint8_t VRBRAIN::VRBRAINCANManager::_ifaces_num
private

Definition at line 271 of file CAN.h.

◆ _ifaces_out_to_in

uint8_t VRBRAIN::VRBRAINCANManager::_ifaces_out_to_in[CAN_STM32_NUM_IFACES]
private

Definition at line 272 of file CAN.h.

◆ if0_

VRBRAINCAN VRBRAIN::VRBRAINCANManager::if0_
private

Definition at line 260 of file CAN.h.

◆ if1_

VRBRAINCAN VRBRAIN::VRBRAINCANManager::if1_
private

Definition at line 261 of file CAN.h.

◆ ifaces

VRBRAINCAN* VRBRAIN::VRBRAINCANManager::ifaces[CAN_STM32_NUM_IFACES]
private

Definition at line 270 of file CAN.h.

◆ initialized_

bool VRBRAIN::VRBRAINCANManager::initialized_
private

Definition at line 268 of file CAN.h.

◆ p_uavcan

AP_UAVCAN* VRBRAIN::VRBRAINCANManager::p_uavcan
private

Definition at line 274 of file CAN.h.

◆ update_event_

BusEvent VRBRAIN::VRBRAINCANManager::update_event_
private

Definition at line 259 of file CAN.h.


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