|
|
| RingBuffer (int size) |
| |
| bool | read (T &result) override |
| | reads a single value
|
| |
| bool | peek (T &result) override |
| | peeks the actual entry from the buffer
|
| |
|
virtual int | peekArray (T *data, int n) |
| |
| virtual bool | isFull () override |
| | checks if the buffer is full
|
| |
|
bool | isEmpty () |
| |
| virtual bool | write (T data) override |
| | write add an entry to the buffer
|
| |
| virtual void | reset () override |
| | clears the buffer
|
| |
| virtual int | available () override |
| | provides the number of entries that are available to read
|
| |
| virtual int | availableForWrite () override |
| | provides the number of entries that are available to write
|
| |
| virtual T * | address () override |
| | returns the address of the start of the physical read buffer
|
| |
| virtual bool | resize (int len) |
| | Resizes the buffer if supported: returns false if not supported.
|
| |
| virtual size_t | size () override |
| | Returns the maximum capacity of the buffer.
|
| |
|
| 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.
|
| |
template<typename T = int16_t>
class tinyrobotics::RingBuffer< T >
Implements a typed Ringbuffer.
- Template Parameters
-