20 template <
class Type>
class BFifo {
Type * writeData()
Returns a pointer to the data.
BUInt readAvailable()
How many items are available to read.
Type readPos(BUInt pos)
Read item at given offset from current read position.
Type * odata
FIFO memory buffer.
Definition: BFifo.h:56
void writeBackup(BUInt num)
Backup, remove num items at end of fifo. Careful, make sure read is not already happening.
Type & operator[](int pos)
Direct access to read samples in buffer.
volatile BUInt oreadPos
The read pointer.
Definition: BFifo.h:58
void writePos(BUInt pos, const Type &v)
Write item at given offset from current read position.
volatile BUInt owritePos
The write pointer.
Definition: BFifo.h:57
BError rebase()
Rebases fifo so read pointer is at zero moving memory as needed.
BError resize(BUInt size)
Resize FIFO, clears it as well.
BUInt osize
The size of the FIFO.
Definition: BFifo.h:55
BError write(const Type v)
Write a single item.
void writeDone(BUInt num)
Indicates when write is complete.
BUInt readAvailableChunk()
How many items are available to read in a chunk.
BUInt32 BUInt
Definition: BTypes.h:30
Type read()
Read one item.
BUInt size()
Returns fifo size.
char data[8]
Definition: BoapMc1.h:21
Type * readData()
Returns a pointer to the data.
BUInt writeAvailable()
How many items that can be written.
BUInt writeAvailableChunk()
How many items that can be written in a chunk.