|
TinyRobotics
|
Shared functionality of all buffers. More...
#include <Buffers.h>

Public Member Functions | |
| BaseBuffer (BaseBuffer &)=default | |
| BaseBuffer & | operator= (BaseBuffer &)=default |
| virtual bool | read (T &result)=0 |
| reads a single value | |
| virtual int | readArray (T data[], int len) |
| reads multiple values | |
| virtual int | clearArray (int len) |
| Removes the next len entries. | |
| virtual int | writeArray (const T data[], int len) |
| Fills the buffer data. | |
| virtual int | writeArrayOverwrite (const T data[], int len) |
| Fills the buffer data and overwrites the oldest data if the buffer is full. | |
| virtual bool | peek (T &result)=0 |
| peeks the actual entry from the buffer | |
| virtual bool | isFull () |
| checks if the buffer is full | |
| bool | isEmpty () |
| virtual bool | write (T data)=0 |
| write add an entry to the buffer | |
| virtual void | reset ()=0 |
| clears the buffer | |
| void | clear () |
| same as reset | |
| virtual int | available ()=0 |
| provides the number of entries that are available to read | |
| virtual int | availableForWrite ()=0 |
| provides the number of entries that are available to write | |
| virtual T * | address ()=0 |
| returns the address of the start of the physical read buffer | |
| virtual size_t | size ()=0 |
| virtual float | levelPercent () |
| Returns the level of the buffer in %. | |
| virtual bool | resize (int bytes) |
| Resizes the buffer if supported: returns false if not supported. | |
Shared functionality of all buffers.
|
pure virtual |
returns the address of the start of the physical read buffer
Implemented in BufferRP2040T< T >, BufferRTOS< T, TAllocator >, BufferRTOS< uint8_t >, SynchronizedBuffer< T >, SingleBuffer< T >, SingleBuffer< T >, SingleBuffer< uint8_t >, RingBuffer< T >, and RingBuffer< uint8_t >.
|
pure virtual |
provides the number of entries that are available to read
Implemented in BufferRP2040T< T >, BufferRTOS< T, TAllocator >, BufferRTOS< uint8_t >, SynchronizedBuffer< T >, SingleBuffer< T >, SingleBuffer< T >, SingleBuffer< uint8_t >, RingBuffer< T >, and RingBuffer< uint8_t >.
|
pure virtual |
provides the number of entries that are available to write
Implemented in BufferRP2040T< T >, BufferRTOS< T, TAllocator >, BufferRTOS< uint8_t >, SynchronizedBuffer< T >, SingleBuffer< T >, SingleBuffer< T >, SingleBuffer< uint8_t >, RingBuffer< T >, and RingBuffer< uint8_t >.
|
inlinevirtual |
Removes the next len entries.
Reimplemented in SingleBuffer< T >, SingleBuffer< T >, and SingleBuffer< uint8_t >.
|
inlinevirtual |
checks if the buffer is full
Reimplemented in BufferRP2040T< T >, BufferRTOS< T, TAllocator >, BufferRTOS< uint8_t >, SynchronizedBuffer< T >, SingleBuffer< T >, SingleBuffer< T >, SingleBuffer< uint8_t >, RingBuffer< T >, and RingBuffer< uint8_t >.
|
pure virtual |
peeks the actual entry from the buffer
Implemented in BufferRP2040T< T >, BufferRTOS< T, TAllocator >, SynchronizedBuffer< T >, SingleBuffer< T >, SingleBuffer< T >, and RingBuffer< T >.
|
pure virtual |
reads a single value
Implemented in BufferRP2040T< T >, BufferRTOS< T, TAllocator >, SynchronizedBuffer< T >, SingleBuffer< T >, SingleBuffer< T >, and RingBuffer< T >.
|
inlinevirtual |
reads multiple values
Reimplemented in BufferRTOS< T, TAllocator >, SynchronizedBuffer< T >, and BufferRP2040T< T >.
|
pure virtual |
clears the buffer
Implemented in BufferRP2040T< T >, BufferRTOS< T, TAllocator >, BufferRTOS< uint8_t >, SynchronizedBuffer< T >, SingleBuffer< T >, SingleBuffer< T >, SingleBuffer< uint8_t >, RingBuffer< T >, and RingBuffer< uint8_t >.
|
inlinevirtual |
Resizes the buffer if supported: returns false if not supported.
Reimplemented in RingBuffer< T >, RingBuffer< uint8_t >, SingleBuffer< T >, SingleBuffer< T >, and SingleBuffer< uint8_t >.
|
pure virtual |
Implemented in RingBuffer< T >, and RingBuffer< uint8_t >.
|
pure virtual |
write add an entry to the buffer
Implemented in BufferRP2040T< T >, BufferRTOS< T, TAllocator >, SynchronizedBuffer< T >, RingBuffer< T >, SingleBuffer< T >, and SingleBuffer< T >.
|
inlinevirtual |
Fills the buffer data.
Reimplemented in BufferRTOS< T, TAllocator >, SynchronizedBuffer< T >, BufferRP2040T< T >, SingleBuffer< T >, and SingleBuffer< T >.