![]() |
FancySafeBot 0.0.1
A safe robotics library
|
Circular buffer. More...
Classes | |
| class | fsb::CircularBuffer< BufferType, BufferSize > |
| Circular Buffer. More... | |
Enumerations | |
| enum class | fsb::CircularBufferStatus : uint8_t { CircularBufferStatus::SUCCESS = 0 , CircularBufferStatus::FULL , CircularBufferStatus::EMPTY , CircularBufferStatus::OVERWRITE } |
Functions | |
| CircularBufferStatus | fsb::CircularBuffer< BufferType, BufferSize >::push (BufferType push_value) |
| Add value to the buffer if there is space available. | |
| CircularBufferStatus | fsb::CircularBuffer< BufferType, BufferSize >::force_push (BufferType push_value) |
| Add value to buffer and overwrite oldest value if buffer is full. | |
| CircularBufferStatus | fsb::CircularBuffer< BufferType, BufferSize >::pop (BufferType &popped_value) |
| Get oldest value from buffer. | |
| CircularBufferStatus | fsb::CircularBuffer< BufferType, BufferSize >::pop_all (std::array< BufferType, BufferSize > &popped_values, size_t &num_popped) |
| Get oldest value from buffer. | |
| void | fsb::CircularBuffer< BufferType, BufferSize >::Reset () |
| Reset buffer to empty state. | |
| size_t | fsb::CircularBuffer< BufferType, BufferSize >::GetFilled () const |
| Get number of filled buffer positions. | |
| size_t | fsb::CircularBuffer< BufferType, BufferSize >::GetRemaining () const |
| Get number of remaining buffer positions. | |
| size_t | fsb::CircularBuffer< BufferType, BufferSize >::GetSize () const |
| Get total buffer size. | |
Circular buffer.
|
strong |
|
inline |
Add value to buffer and overwrite oldest value if buffer is full.
| push_value | New value to add to buffer. |
|
inline |
Get number of filled buffer positions.
|
inline |
Get number of remaining buffer positions.
|
inline |
Get total buffer size.
|
inline |
Get oldest value from buffer.
| popped_value | Oldest value in buffer. |
| CircularBufferStatus fsb::CircularBuffer< BufferType, BufferSize >::pop_all | ( | std::array< BufferType, BufferSize > & | popped_values, |
| size_t & | num_popped | ||
| ) |
Get oldest value from buffer.
| popped_values | All values in buffer. |
|
inline |
Add value to the buffer if there is space available.
| push_value | New value to add to buffer. |