This is Unofficial EPICS BASE Doxygen Site
epicsRingBytes.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * Copyright (c) 2012 ITER Organization.
7 * EPICS BASE is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
27 #ifndef INCepicsRingBytesh
28 #define INCepicsRingBytesh
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #include "libComAPI.h"
35 
37 typedef void *epicsRingBytesId;
38 typedef void const *epicsRingBytesIdConst;
39 
45 LIBCOM_API epicsRingBytesId epicsStdCall epicsRingBytesCreate(int nbytes);
51 LIBCOM_API epicsRingBytesId epicsStdCall epicsRingBytesLockedCreate(int nbytes);
56 LIBCOM_API void epicsStdCall epicsRingBytesDelete(epicsRingBytesId id);
64 LIBCOM_API int epicsStdCall epicsRingBytesGet(
65  epicsRingBytesId id, char *value,int nbytes);
73 LIBCOM_API int epicsStdCall epicsRingBytesPut(
74  epicsRingBytesId id, char *value,int nbytes);
80 LIBCOM_API void epicsStdCall epicsRingBytesFlush(epicsRingBytesId id);
86 LIBCOM_API int epicsStdCall epicsRingBytesFreeBytes(epicsRingBytesId id);
92 LIBCOM_API int epicsStdCall epicsRingBytesUsedBytes(epicsRingBytesId id);
99 LIBCOM_API int epicsStdCall epicsRingBytesSize(epicsRingBytesId id);
105 LIBCOM_API int epicsStdCall epicsRingBytesIsEmpty(epicsRingBytesId id);
111 LIBCOM_API int epicsStdCall epicsRingBytesIsFull(epicsRingBytesId id);
121 LIBCOM_API int epicsStdCall epicsRingBytesHighWaterMark(epicsRingBytesIdConst id);
128 LIBCOM_API void epicsStdCall epicsRingBytesResetHighWaterMark(epicsRingBytesId id);
129 
130 #ifdef __cplusplus
131 }
132 #endif
133 
134 
135 #endif /* INCepicsRingBytesh */
LIBCOM_API int epicsStdCall epicsRingBytesHighWaterMark(epicsRingBytesIdConst id)
See how full a ring buffer has been since it was last checked.
LIBCOM_API epicsRingBytesId epicsStdCall epicsRingBytesLockedCreate(int nbytes)
Create a new ring buffer, secured by a spinlock.
Definition: link.h:174
LIBCOM_API int epicsStdCall epicsRingBytesUsedBytes(epicsRingBytesId id)
Return the number of bytes currently stored in the ring buffer.
LIBCOM_API int epicsStdCall epicsRingBytesSize(epicsRingBytesId id)
Return the size of the ring buffer.
void const * epicsRingBytesIdConst
LIBCOM_API void epicsStdCall epicsRingBytesFlush(epicsRingBytesId id)
Make the ring buffer empty.
LIBCOM_API void epicsStdCall epicsRingBytesResetHighWaterMark(epicsRingBytesId id)
Reset the Highwater mark of the ring buffer.
LIBCOM_API epicsRingBytesId epicsStdCall epicsRingBytesCreate(int nbytes)
Create a new ring buffer.
LIBCOM_API int epicsStdCall epicsRingBytesIsEmpty(epicsRingBytesId id)
Test if the ring buffer is currently empty.
LIBCOM_API void epicsStdCall epicsRingBytesDelete(epicsRingBytesId id)
Delete the ring buffer and free any associated memory.
LIBCOM_API int epicsStdCall epicsRingBytesPut(epicsRingBytesId id, char *value, int nbytes)
Write data into the ring buffer.
LIBCOM_API int epicsStdCall epicsRingBytesIsFull(epicsRingBytesId id)
Test if the ring buffer is currently full.
LIBCOM_API int epicsStdCall epicsRingBytesFreeBytes(epicsRingBytesId id)
Return the number of free bytes in the ring buffer.
LIBCOM_API int epicsStdCall epicsRingBytesGet(epicsRingBytesId id, char *value, int nbytes)
Read data out of the ring buffer.
void * epicsRingBytesId
An identifier for a ring buffer.