PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <RingBuffer.h>
Public Member Functions | |
RingBuffer () | |
~RingBuffer () | |
RingBuffer (const RingBuffer &)=delete | |
RingBuffer & | operator= (const RingBuffer &)=delete |
RingBuffer (RingBuffer &&)=delete | |
RingBuffer & | operator= (RingBuffer &&)=delete |
bool | allocate (uint8_t size) |
void | unallocate () |
void | push (const data_type &sample) |
uint8_t | get_length () const |
data_type & | operator[] (const uint8_t index) |
const data_type & | get_newest () |
const data_type & | get_oldest () |
uint8_t | get_oldest_index () const |
bool | pop_first_older_than (const uint64_t ×tamp, data_type *sample) |
int | get_total_size () |
Private Attributes | |
data_type * | _buffer {nullptr} |
uint8_t | _head {0} |
uint8_t | _tail {0} |
uint8_t | _size {0} |
bool | _first_write {true} |
Definition at line 45 of file RingBuffer.h.
|
inline |
Definition at line 48 of file RingBuffer.h.
Referenced by RingBuffer< gpsSample >::~RingBuffer().
|
inline |
Definition at line 56 of file RingBuffer.h.
|
delete |
|
delete |
|
inline |
Definition at line 64 of file RingBuffer.h.
Referenced by EstimatorInterface::initialise_interface(), RingBuffer< gpsSample >::RingBuffer(), EstimatorInterface::setAirspeedData(), EstimatorInterface::setAuxVelData(), EstimatorInterface::setBaroData(), EstimatorInterface::setExtVisionData(), EstimatorInterface::setGpsData(), EstimatorInterface::setIMUData(), EstimatorInterface::setMagData(), EstimatorInterface::setOpticalFlowData(), and EstimatorInterface::setRangeData().
|
inline |
Definition at line 117 of file RingBuffer.h.
Referenced by Ekf::alignOutputFilter(), Ekf::calculateOutputStates(), Ekf::controlExternalVisionFusion(), EstimatorInterface::print_status(), Ekf::realignYawGPS(), Ekf::resetGpsAntYaw(), Ekf::resetHeight(), Ekf::resetMagHeading(), Ekf::resetPosition(), Ekf::resetVelocity(), EstimatorInterface::setAirspeedData(), EstimatorInterface::setAuxVelData(), EstimatorInterface::setBaroData(), EstimatorInterface::setExtVisionData(), EstimatorInterface::setGpsData(), EstimatorInterface::setIMUData(), EstimatorInterface::setMagData(), EstimatorInterface::setOpticalFlowData(), and EstimatorInterface::setRangeData().
|
inline |
Definition at line 121 of file RingBuffer.h.
Referenced by Ekf::calculateOutputStates(), Ekf::controlExternalVisionFusion(), Ekf::controlFusionModes(), Ekf::controlHeightSensorTimeouts(), Ekf::initHagl(), Ekf::initialiseFilter(), and Ekf::resetHeight().
|
inline |
Definition at line 122 of file RingBuffer.h.
Referenced by Ekf::calculateOutputStates(), and Ekf::collect_imu().
|
inline |
Definition at line 124 of file RingBuffer.h.
Referenced by Ekf::calculateOutputStates().
|
inline |
Definition at line 161 of file RingBuffer.h.
Referenced by EstimatorInterface::print_status().
|
delete |
|
delete |
|
inline |
Definition at line 119 of file RingBuffer.h.
|
inline |
Definition at line 126 of file RingBuffer.h.
Referenced by Ekf::controlAuxVelFusion(), Ekf::controlDragFusion(), Ekf::controlFusionModes(), and Ekf::initialiseFilter().
|
inline |
Definition at line 97 of file RingBuffer.h.
Referenced by Ekf::calculateOutputStates(), Ekf::collect_imu(), RingBuffer< gpsSample >::RingBuffer(), EstimatorInterface::setAirspeedData(), EstimatorInterface::setAuxVelData(), EstimatorInterface::setBaroData(), EstimatorInterface::setExtVisionData(), EstimatorInterface::setGpsData(), EstimatorInterface::setIMUData(), EstimatorInterface::setMagData(), EstimatorInterface::setOpticalFlowData(), and EstimatorInterface::setRangeData().
|
inline |
Definition at line 91 of file RingBuffer.h.
Referenced by EkfRingBufferTest::TearDown(), and EstimatorInterface::unallocate_buffers().
|
private |
Definition at line 164 of file RingBuffer.h.
Referenced by RingBuffer< gpsSample >::allocate(), RingBuffer< gpsSample >::get_newest(), RingBuffer< gpsSample >::get_oldest(), RingBuffer< gpsSample >::operator[](), RingBuffer< gpsSample >::pop_first_older_than(), RingBuffer< gpsSample >::push(), RingBuffer< gpsSample >::unallocate(), and RingBuffer< gpsSample >::~RingBuffer().
|
private |
Definition at line 170 of file RingBuffer.h.
Referenced by RingBuffer< gpsSample >::allocate(), RingBuffer< gpsSample >::pop_first_older_than(), and RingBuffer< gpsSample >::push().
|
private |
Definition at line 166 of file RingBuffer.h.
Referenced by RingBuffer< gpsSample >::allocate(), RingBuffer< gpsSample >::get_newest(), RingBuffer< gpsSample >::pop_first_older_than(), and RingBuffer< gpsSample >::push().
|
private |
Definition at line 168 of file RingBuffer.h.
Referenced by RingBuffer< gpsSample >::allocate(), RingBuffer< gpsSample >::get_length(), RingBuffer< gpsSample >::get_total_size(), RingBuffer< gpsSample >::pop_first_older_than(), and RingBuffer< gpsSample >::push().
|
private |
Definition at line 167 of file RingBuffer.h.
Referenced by RingBuffer< gpsSample >::allocate(), RingBuffer< gpsSample >::get_oldest(), RingBuffer< gpsSample >::get_oldest_index(), RingBuffer< gpsSample >::pop_first_older_than(), and RingBuffer< gpsSample >::push().