PX4 Firmware
PX4 Autopilot Software http://px4.io
uavcan_stm32::CanIface::RxQueue Class Reference
Collaboration diagram for uavcan_stm32::CanIface::RxQueue:

Public Member Functions

 RxQueue (CanRxItem *buf, uavcan::uint8_t capacity)
 
void push (const uavcan::CanFrame &frame, const uint64_t &utc_usec, uavcan::CanIOFlags flags)
 
void pop (uavcan::CanFrame &out_frame, uavcan::uint64_t &out_utc_usec, uavcan::CanIOFlags &out_flags)
 
void reset ()
 
unsigned getLength () const
 
uavcan::uint32_t getOverflowCount () const
 

Private Member Functions

void registerOverflow ()
 

Private Attributes

CanRxItem *const buf_
 
const uavcan::uint8_t capacity_
 
uavcan::uint8_t in_
 
uavcan::uint8_t out_
 
uavcan::uint8_t len_
 
uavcan::uint32_t overflow_cnt_
 

Detailed Description

Definition at line 48 of file can.hpp.

Constructor & Destructor Documentation

◆ RxQueue()

uavcan_stm32::CanIface::RxQueue::RxQueue ( CanRxItem buf,
uavcan::uint8_t  capacity 
)
inline

Definition at line 60 of file can.hpp.

References uavcan_stm32::CanRxItem::flags, uavcan_stm32::CanRxItem::frame, lps22hb::reset(), and uavcan_stm32::CanRxItem::utc_usec.

Here is the call graph for this function:

Member Function Documentation

◆ getLength()

unsigned uavcan_stm32::CanIface::RxQueue::getLength ( ) const
inline

Definition at line 74 of file can.hpp.

Referenced by uavcan_stm32::CanIface::getRxQueueLength(), uavcan_stm32::CanIface::isRxBufferEmpty(), and uavcan_stm32::CanIface::receive().

Here is the caller graph for this function:

◆ getOverflowCount()

uavcan::uint32_t uavcan_stm32::CanIface::RxQueue::getOverflowCount ( ) const
inline

Definition at line 76 of file can.hpp.

Referenced by uavcan_stm32::CanIface::getErrorCount(), and uavcan_stm32::CanIface::getRxQueueOverflowCount().

Here is the caller graph for this function:

◆ pop()

void uavcan_stm32::CanIface::RxQueue::pop ( uavcan::CanFrame &  out_frame,
uavcan::uint64_t &  out_utc_usec,
uavcan::CanIOFlags &  out_flags 
)

Definition at line 125 of file uc_stm32_can.cpp.

References buf_, capacity_, uavcan_stm32::CanRxItem::flags, uavcan_stm32::CanRxItem::frame, len_, out_, and uavcan_stm32::CanRxItem::utc_usec.

Referenced by uavcan_stm32::CanIface::receive().

Here is the caller graph for this function:

◆ push()

void uavcan_stm32::CanIface::RxQueue::push ( const uavcan::CanFrame &  frame,
const uint64_t &  utc_usec,
uavcan::CanIOFlags  flags 
)

Definition at line 101 of file uc_stm32_can.cpp.

References buf_, capacity_, uavcan_stm32::CanRxItem::flags, uavcan_stm32::CanRxItem::frame, in_, len_, out_, registerOverflow(), and uavcan_stm32::CanRxItem::utc_usec.

Referenced by uavcan_stm32::CanIface::handleRxInterrupt(), and uavcan_stm32::CanIface::handleTxMailboxInterrupt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerOverflow()

void uavcan_stm32::CanIface::RxQueue::registerOverflow ( )
private

Definition at line 94 of file uc_stm32_can.cpp.

References overflow_cnt_.

Referenced by push().

Here is the caller graph for this function:

◆ reset()

void uavcan_stm32::CanIface::RxQueue::reset ( void  )

Definition at line 142 of file uc_stm32_can.cpp.

References in_, len_, uavcan_stm32::CanIface::NumTxMailboxes, out_, overflow_cnt_, uavcan_stm32::bxcan::TSR_ABRQ0, uavcan_stm32::bxcan::TSR_ABRQ1, uavcan_stm32::bxcan::TSR_ABRQ2, and uavcan_stm32::CanIface::TSR_ABRQx.

Referenced by uavcan_stm32::CanIface::init().

Here is the caller graph for this function:

Member Data Documentation

◆ buf_

CanRxItem* const uavcan_stm32::CanIface::RxQueue::buf_
private

Definition at line 50 of file can.hpp.

Referenced by pop(), and push().

◆ capacity_

const uavcan::uint8_t uavcan_stm32::CanIface::RxQueue::capacity_
private

Definition at line 51 of file can.hpp.

Referenced by pop(), and push().

◆ in_

uavcan::uint8_t uavcan_stm32::CanIface::RxQueue::in_
private

Definition at line 52 of file can.hpp.

Referenced by push(), and reset().

◆ len_

uavcan::uint8_t uavcan_stm32::CanIface::RxQueue::len_
private

Definition at line 54 of file can.hpp.

Referenced by pop(), push(), and reset().

◆ out_

uavcan::uint8_t uavcan_stm32::CanIface::RxQueue::out_
private

Definition at line 53 of file can.hpp.

Referenced by pop(), push(), and reset().

◆ overflow_cnt_

uavcan::uint32_t uavcan_stm32::CanIface::RxQueue::overflow_cnt_
private

Definition at line 55 of file can.hpp.

Referenced by registerOverflow(), and reset().


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