![]() |
FancySafeBot 0.0.1
A safe robotics library
|
Circular Buffer.
#include <fsb_circular_buffer.h>

Public Member Functions | |
| CircularBufferStatus | push (BufferType push_value) |
| Add value to the buffer if there is space available. | |
| CircularBufferStatus | force_push (BufferType push_value) |
| Add value to buffer and overwrite oldest value if buffer is full. | |
| CircularBufferStatus | pop (BufferType &popped_value) |
| Get oldest value from buffer. | |
| CircularBufferStatus | pop_all (std::array< BufferType, BufferSize > &popped_values, size_t &num_popped) |
| Pop all values from the buffer into an array. | |
| void | reset () |
| Reset buffer to empty state. | |
| size_t | get_filled () const |
| Get number of filled buffer positions. | |
| size_t | get_remaining () const |
| Get number of remaining buffer positions. | |
Static Public Member Functions | |
| static size_t | get_size () |
| Get total buffer size. | |