![]() |
This is Unofficial EPICS BASE Doxygen Site
|
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "epicsRingPointer.h"
Go to the source code of this file.
Typedefs | |
typedef epicsRingPointer< void > | voidPointer |
Functions | |
LIBCOM_API epicsRingPointerId epicsStdCall | epicsRingPointerCreate (int size) |
Create a new ring buffer. More... | |
LIBCOM_API epicsRingPointerId epicsStdCall | epicsRingPointerLockedCreate (int size) |
Create a new ring buffer, secured by a spinlock. More... | |
LIBCOM_API void epicsStdCall | epicsRingPointerDelete (epicsRingPointerId id) |
Delete the ring buffer and free any associated memory. More... | |
LIBCOM_API void *epicsStdCall | epicsRingPointerPop (epicsRingPointerId id) |
Take an element off the ring. More... | |
LIBCOM_API int epicsStdCall | epicsRingPointerPush (epicsRingPointerId id, void *p) |
Push pointer into the ring buffer. More... | |
LIBCOM_API void epicsStdCall | epicsRingPointerFlush (epicsRingPointerId id) |
Remove all elements from the ring. More... | |
LIBCOM_API int epicsStdCall | epicsRingPointerGetFree (epicsRingPointerId id) |
Return the amount of empty space in the ring buffer. More... | |
LIBCOM_API int epicsStdCall | epicsRingPointerGetUsed (epicsRingPointerId id) |
Return the number of elements stored in the ring buffer. More... | |
LIBCOM_API int epicsStdCall | epicsRingPointerGetSize (epicsRingPointerId id) |
Return the size of the ring. More... | |
LIBCOM_API int epicsStdCall | epicsRingPointerIsEmpty (epicsRingPointerId id) |
Check if the ring buffer is currently empty. More... | |
LIBCOM_API int epicsStdCall | epicsRingPointerIsFull (epicsRingPointerId id) |
Check if the ring buffer is currently full. More... | |
LIBCOM_API int epicsStdCall | epicsRingPointerGetHighWaterMark (epicsRingPointerIdConst id) |
Get the Highwater mark of the ring buffer. More... | |
LIBCOM_API void epicsStdCall | epicsRingPointerResetHighWaterMark (epicsRingPointerId id) |
Reset the Highwater mark of the ring buffer. More... | |
typedef epicsRingPointer<void> voidPointer |
Definition at line 24 of file epicsRingPointer.cpp.
LIBCOM_API epicsRingPointerId epicsStdCall epicsRingPointerCreate | ( | int | size | ) |
Create a new ring buffer.
size | Size of ring buffer to create |
Definition at line 27 of file epicsRingPointer.cpp.
LIBCOM_API void epicsStdCall epicsRingPointerDelete | ( | epicsRingPointerId | id | ) |
Delete the ring buffer and free any associated memory.
id | Ring buffer identifier |
Definition at line 39 of file epicsRingPointer.cpp.
LIBCOM_API void epicsStdCall epicsRingPointerFlush | ( | epicsRingPointerId | id | ) |
Remove all elements from the ring.
id | Ring buffer identifier |
Definition at line 57 of file epicsRingPointer.cpp.
LIBCOM_API int epicsStdCall epicsRingPointerGetFree | ( | epicsRingPointerId | id | ) |
Return the amount of empty space in the ring buffer.
id | Ring buffer identifier |
Definition at line 63 of file epicsRingPointer.cpp.
LIBCOM_API int epicsStdCall epicsRingPointerGetHighWaterMark | ( | epicsRingPointerIdConst | id | ) |
Get the Highwater mark of the ring buffer.
Returns the largest 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.
id | Ring buffer identifier |
Definition at line 93 of file epicsRingPointer.cpp.
LIBCOM_API int epicsStdCall epicsRingPointerGetSize | ( | epicsRingPointerId | id | ) |
Return the size of the ring.
id | Ring buffer identifier |
size
given when the ring was created. Definition at line 75 of file epicsRingPointer.cpp.
LIBCOM_API int epicsStdCall epicsRingPointerGetUsed | ( | epicsRingPointerId | id | ) |
Return the number of elements stored in the ring buffer.
id | Ring buffer identifier |
Definition at line 69 of file epicsRingPointer.cpp.
LIBCOM_API int epicsStdCall epicsRingPointerIsEmpty | ( | epicsRingPointerId | id | ) |
Check if the ring buffer is currently empty.
id | Ring buffer identifier |
Definition at line 81 of file epicsRingPointer.cpp.
LIBCOM_API int epicsStdCall epicsRingPointerIsFull | ( | epicsRingPointerId | id | ) |
Check if the ring buffer is currently full.
id | Ring buffer identifier |
Definition at line 87 of file epicsRingPointer.cpp.
LIBCOM_API epicsRingPointerId epicsStdCall epicsRingPointerLockedCreate | ( | int | size | ) |
Create a new ring buffer, secured by a spinlock.
size | Size of ring buffer to create |
Definition at line 33 of file epicsRingPointer.cpp.
LIBCOM_API void* epicsStdCall epicsRingPointerPop | ( | epicsRingPointerId | id | ) |
Take an element off the ring.
id | Ring buffer identifier |
Definition at line 45 of file epicsRingPointer.cpp.
LIBCOM_API int epicsStdCall epicsRingPointerPush | ( | epicsRingPointerId | id, |
void * | p | ||
) |
Push pointer into the ring buffer.
id | Ring buffer identifier |
p | Pointer to be pushed to the ring |
Definition at line 51 of file epicsRingPointer.cpp.
LIBCOM_API void epicsStdCall epicsRingPointerResetHighWaterMark | ( | epicsRingPointerId | id | ) |
Reset the Highwater mark of the ring buffer.
The Highwater mark will be set to the current usage
id | Ring buffer identifier |
Definition at line 99 of file epicsRingPointer.cpp.