EPICS Base
7.0.6.1
|
A C++ template class providing methods for creating and using a ring buffer (a first in, first out circular buffer) that stores pointers to objects of the template type.
#include <epicsRingPointer.h>
Public Member Functions | |
epicsRingPointer (int size, bool locked) | |
Constructor. More... | |
~epicsRingPointer () | |
Destructor. | |
bool | push (T *p) |
Push a new entry on the ring. More... | |
T * | pop () |
Take an element off the ring. More... | |
void | flush () |
Remove all elements from the ring. More... | |
int | getFree () const |
Get how much free space remains in the ring. More... | |
int | getUsed () const |
Get how many elements are stored on the ring. More... | |
int | getSize () const |
Get the size of the ring. More... | |
bool | isEmpty () const |
Test if the ring is currently empty. More... | |
bool | isFull () const |
Test if the ring is currently full. More... | |
int | getHighWaterMark () const |
See how full the ring has got since it was last checked. More... | |
void | resetHighWaterMark () |
Reset high water mark. More... | |
Definition at line 42 of file epicsRingPointer.h.
|
inline |
size | Maximum number of elements (pointers) that can be stored |
locked | If true, the spin lock secured variant is created |
Definition at line 220 of file epicsRingPointer.h.
|
inline |
Definition at line 236 of file epicsRingPointer.h.
|
inline |
Definition at line 255 of file epicsRingPointer.h.
|
inline |
Definition at line 272 of file epicsRingPointer.h.
|
inline |
Definition at line 281 of file epicsRingPointer.h.
|
inline |
Definition at line 299 of file epicsRingPointer.h.
|
inline |
size
specified when the ring was created. Definition at line 308 of file epicsRingPointer.h.
|
inline |
Definition at line 314 of file epicsRingPointer.h.
|
inline |
Definition at line 324 of file epicsRingPointer.h.
|
inline |
Returns the maximum number of elements the ring buffer has held since the water mark was last reset. A new ring buffer starts with a water mark of 0.
Definition at line 333 of file epicsRingPointer.h.
|
inline |
High water mark will be set to the current usage
Definition at line 339 of file epicsRingPointer.h.