PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Objects of this class are owned by the sub-node thread. More...
#include <uavcan_virtual_can_driver.hpp>
Classes | |
struct | RxItem |
This class re-defines uavcan::RxCanFrame with flags. More... | |
Public Member Functions | |
VirtualCanIface (uavcan::IPoolAllocator &allocator, uavcan::ISystemClock &clock, pthread_mutex_t &arg_mutex, unsigned quota_per_queue) | |
~VirtualCanIface () | |
void | addRxFrame (const uavcan::CanRxFrame &frame, uavcan::CanIOFlags flags) |
Note that RX queue overwrites oldest items when overflowed. More... | |
void | flushTxQueueTo (uavcan::INode &main_node, std::uint8_t iface_index) |
Call this from the main thread only. More... | |
bool | hasDataInRxQueue () |
Call this from the sub-node thread only. More... | |
Private Member Functions | |
int16_t | send (const uavcan::CanFrame &frame, uavcan::MonotonicTime tx_deadline, uavcan::CanIOFlags flags) override |
int16_t | receive (uavcan::CanFrame &out_frame, uavcan::MonotonicTime &out_ts_monotonic, uavcan::UtcTime &out_ts_utc, uavcan::CanIOFlags &out_flags) override |
int16_t | configureFilters (const uavcan::CanFilterConfig *, std::uint16_t) override |
uint16_t | getNumFilters () const override |
uint64_t | getErrorCount () const override |
Private Attributes | |
pthread_mutex_t & | common_driver_mutex_ |
uavcan::CanTxQueue | prioritized_tx_queue_ |
Queue< RxItem > | rx_queue_ |
Objects of this class are owned by the sub-node thread.
This class does not use heap memory.
Definition at line 193 of file uavcan_virtual_can_driver.hpp.
|
inline |
Definition at line 256 of file uavcan_virtual_can_driver.hpp.
|
inline |
Definition at line 264 of file uavcan_virtual_can_driver.hpp.
|
inline |
Note that RX queue overwrites oldest items when overflowed.
Call this from the main thread only. No additional locking is required.
Definition at line 273 of file uavcan_virtual_can_driver.hpp.
References Queue< T >::isEmpty(), MicroBenchHRT::lock(), Queue< T >::pop(), and Queue< T >::tryEmplace().
|
inlineoverrideprivate |
Definition at line 251 of file uavcan_virtual_can_driver.hpp.
|
inline |
Call this from the main thread only.
No additional locking is required.
Definition at line 287 of file uavcan_virtual_can_driver.hpp.
References MicroBenchHRT::lock().
|
inlineoverrideprivate |
Definition at line 253 of file uavcan_virtual_can_driver.hpp.
|
inlineoverrideprivate |
Definition at line 252 of file uavcan_virtual_can_driver.hpp.
|
inline |
Call this from the sub-node thread only.
No additional locking is required.
Definition at line 312 of file uavcan_virtual_can_driver.hpp.
References Queue< T >::isEmpty(), and MicroBenchHRT::lock().
|
inlineoverrideprivate |
Definition at line 231 of file uavcan_virtual_can_driver.hpp.
References Queue< T >::isEmpty(), MicroBenchHRT::lock(), Queue< T >::peek(), and Queue< T >::pop().
|
inlineoverrideprivate |
Definition at line 224 of file uavcan_virtual_can_driver.hpp.
References MicroBenchHRT::lock().
|
private |
Definition at line 219 of file uavcan_virtual_can_driver.hpp.
|
private |
Definition at line 221 of file uavcan_virtual_can_driver.hpp.
Definition at line 222 of file uavcan_virtual_can_driver.hpp.