|
| RingBuffer (size_t size, bool mlock=false) |
| The Constructor.
|
|
| ~RingBuffer () |
| The Destructor.
|
|
size_t | length () |
| Get the total length of the ring buffer.
|
|
bool | isBufferMemoryLocked () |
| Get whether the ring buffer is locked into the memory.
|
|
size_t | getReadSpace () |
| Get the number of items that can be read at this time.
|
|
size_t | getWriteSpace () |
| Get the number of items that can be written at this time.
|
|
void | read (Type &dest) |
| Read into dest.
|
|
void | read (Type *dest, unsigned cnt) |
| Read into an array.
|
|
void | write (Type src) |
| Write into the ring buffer.
|
|
void | write (Type *src, unsigned int cnt) |
| Write an array of values into the ring buffer.
|
|
void | reset () |
| Reset.
|
|
◆ RingBuffer()
The Constructor.
- Parameters
-
size | the number of items that the ring buffer should be able to hold |
mlock | a boolean indicating whether or not the ring buffer should be locked in memory |
◆ read() [1/2]
Read into dest.
Read from the buffer into a variable.
- Parameters
-
dest | an item to be read into |
◆ read() [2/2]
Read into an array.
Read from the buffer into an array.
- Parameters
-
dest | an array to be read into |
cnt | the number of elements to read into this array |
◆ reset()
Reset.
This is not threadsafe. This resets the read and write pointers, effectively making the ring buffer empty.
◆ write() [1/2]
Write an array of values into the ring buffer.
- Parameters
-
src | an array of values to write |
cnt | the number of items from the array to write into our buffer |
◆ write() [2/2]
Write into the ring buffer.
- Parameters
-
The documentation for this class was generated from the following file: