Customer RingBuffer with random access.
More...
#include <AviateTypes.h>
template<class T>
class Aviate::RingBuffer< T >
Customer RingBuffer with random access.
◆ RingBuffer()
Construct a RingBuffer of specified max size.
- Parameters
-
maxSize | number of entries in ring buffer |
◆ at()
get the element at the specified absolute index
- Parameters
-
index | element to retrieve from absolute queue position |
- Returns
- the request element
◆ back()
get the element at the back of the queue
- Returns
- element at the back of the queue
◆ front()
Get the element at the front of the queue.
- Returns
- element at front of queue
◆ get_index_from_back()
Get a previously pushed elememt.
- Parameters
-
offset | zero is last pushed, 1 is second last, etc. |
- Returns
- the absolute index corresponding to the requested offset.
◆ max_size()
get the maximum size the queue can hold
- Returns
- maximum size of the queue
◆ operator[]()
get the element at the specified absolute index
- Parameters
-
index | element to retrieve from absolute queue position |
- Returns
- the request element
◆ pop_front()
Remove the element at teh front of the queue.
- Returns
- 0 if success, otherwise error
◆ push_back()
Add an element to the back of the queue.
- Parameters
-
element | element to add to queue |
- Returns
- 0 if success, otherwise error
◆ size()
get the current size of the queue
- Returns
- size of the queue
The documentation for this class was generated from the following file: