#include <CircularBuffer.h>
Inheritance diagram for CircularBuffer:


Public Member Functions | |
| CircularBuffer (unsigned long inBufferSize) | |
| Constructor taking in the size in bytes of the internal buffer. | |
| virtual | ~CircularBuffer (void) |
| virtual unsigned long | read (unsigned char *outData, unsigned long inBytesToRead) |
| Read bytes from the internal buffer. Returns how many actually read. | |
| virtual unsigned long | write (const unsigned char *inData, unsigned long inBytesToWrite) |
| Write bytes into the internal buffer. Returns how many written. | |
| virtual unsigned long | numBytesAvail () |
| Returns how many bytes are available in the buffer. | |
| virtual unsigned long | spaceLeft () |
| Returns how much space is left in the buffer. | |
| virtual void | reset () |
| Resets the buffer. | |
Protected Member Functions | |
| void | bufASSERT (bool inBool) |
Protected Attributes | |
| unsigned long | mBufferSize |
| unsigned long | mReadPtr |
| unsigned long | mWritePtr |
| unsigned char * | mBuffer |
Private Member Functions | |
| CircularBuffer & | operator= (const CircularBuffer &other) |
| CircularBuffer (const CircularBuffer &other) | |
|
|
Constructor taking in the size in bytes of the internal buffer.
Definition at line 36 of file CircularBuffer.cpp. References mBuffer. |
|
|
Definition at line 46 of file CircularBuffer.cpp. |
|
|
|
|
|
Definition at line 154 of file CircularBuffer.h. Referenced by numBytesAvail(), read(), spaceLeft(), and write(). |
|
|
Returns how many bytes are available in the buffer.
Implements IFIFOBuffer. Definition at line 162 of file CircularBuffer.cpp. References bufASSERT(), mBufferSize, mReadPtr, and mWritePtr. Referenced by read(). |
Here is the call graph for this function:

|
|
|
|
||||||||||||
|
Read bytes from the internal buffer. Returns how many actually read.
Implements IFIFOBuffer. Definition at line 51 of file CircularBuffer.cpp. References bufASSERT(), mBuffer, mBufferSize, mReadPtr, numBytesAvail(), and spaceLeft(). |
Here is the call graph for this function:

|
|
Resets the buffer.
Implements IFIFOBuffer. Definition at line 184 of file CircularBuffer.cpp. |
|
|
Returns how much space is left in the buffer.
Implements IFIFOBuffer. Definition at line 141 of file CircularBuffer.cpp. References bufASSERT(), mBufferSize, mReadPtr, and mWritePtr. |
Here is the call graph for this function:

|
||||||||||||
|
Write bytes into the internal buffer. Returns how many written.
Implements IFIFOBuffer. Definition at line 95 of file CircularBuffer.cpp. References bufASSERT(), mBuffer, mBufferSize, mWritePtr, and spaceLeft(). |
Here is the call graph for this function:

|
|
Definition at line 155 of file CircularBuffer.h. Referenced by CircularBuffer(), read(), and write(). |
|
|
Definition at line 150 of file CircularBuffer.h. Referenced by numBytesAvail(), read(), spaceLeft(), and write(). |
|
|
Definition at line 151 of file CircularBuffer.h. Referenced by numBytesAvail(), read(), reset(), and spaceLeft(). |
|
|
Definition at line 152 of file CircularBuffer.h. Referenced by numBytesAvail(), reset(), spaceLeft(), and write(). |
1.3.9