#include <Fifo.h>
Public Member Functions | |
Fifo (unsigned int buffSz) | |
bool | get (T &t) |
bool | peekGet () const |
bool | put (T const &data) |
unsigned | size () const |
unsigned | room () const |
unsigned | numQueued () const |
Private Attributes | |
Atomic< unsigned > | _readIndex |
Atomic< unsigned > | _writeIndex |
std::vector< T > | _buffer |
|
contructor |
|
get Gets the next object of type T in the fifo and returns true, or returns false if there is no objects to get in the fifo.
|
|
numQueued
|
|
peekGet Takes a peek at the 'get' end and returns true if something is available to get.
|
|
put Copies an object of type T into the fifo and returns true, or returns false if there is no room in the fifo.
|
|
room The amount of room available in the buffer. This value is a minimum guarantee but there 'may' be more room. Basically room() + numQueued() != size() sometimes.
|
|
size
|
|
|
|
|
|
|