EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 * SPDX-License-Identifier: EPICS
8 * EPICS BASE is distributed subject to a Software License Agreement found
9 * in file LICENSE that is included with this distribution.
10 \*************************************************************************/
28 #ifndef INCepicsRingBytesh
29 #define INCepicsRingBytesh
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #include "libComAPI.h"
36 
38 typedef void *epicsRingBytesId;
39 typedef void const *epicsRingBytesIdConst;
40 
46 LIBCOM_API epicsRingBytesId epicsStdCall epicsRingBytesCreate(int nbytes);
52 LIBCOM_API epicsRingBytesId epicsStdCall epicsRingBytesLockedCreate(int nbytes);
57 LIBCOM_API void epicsStdCall epicsRingBytesDelete(epicsRingBytesId id);
65 LIBCOM_API int epicsStdCall epicsRingBytesGet(
66  epicsRingBytesId id, char *value,int nbytes);
74 LIBCOM_API int epicsStdCall epicsRingBytesPut(
75  epicsRingBytesId id, char *value,int nbytes);
81 LIBCOM_API void epicsStdCall epicsRingBytesFlush(epicsRingBytesId id);
87 LIBCOM_API int epicsStdCall epicsRingBytesFreeBytes(epicsRingBytesId id);
93 LIBCOM_API int epicsStdCall epicsRingBytesUsedBytes(epicsRingBytesId id);
100 LIBCOM_API int epicsStdCall epicsRingBytesSize(epicsRingBytesId id);
106 LIBCOM_API int epicsStdCall epicsRingBytesIsEmpty(epicsRingBytesId id);
112 LIBCOM_API int epicsStdCall epicsRingBytesIsFull(epicsRingBytesId id);
122 LIBCOM_API int epicsStdCall epicsRingBytesHighWaterMark(epicsRingBytesIdConst id);
129 LIBCOM_API void epicsStdCall epicsRingBytesResetHighWaterMark(epicsRingBytesId id);
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 
136 #endif /* INCepicsRingBytesh */
LIBCOM_API int epicsStdCall epicsRingBytesGet(epicsRingBytesId id, char *value, int nbytes)
Read data out of the ring buffer.
Definition: link.h:175
LIBCOM_API void epicsStdCall epicsRingBytesFlush(epicsRingBytesId id)
Make the ring buffer empty.
LIBCOM_API int epicsStdCall epicsRingBytesIsFull(epicsRingBytesId id)
Test if the ring buffer is currently full.
LIBCOM_API int epicsStdCall epicsRingBytesPut(epicsRingBytesId id, char *value, int nbytes)
Write data into the ring buffer.
LIBCOM_API void epicsStdCall epicsRingBytesDelete(epicsRingBytesId id)
Delete the ring buffer and free any associated memory.
LIBCOM_API epicsRingBytesId epicsStdCall epicsRingBytesLockedCreate(int nbytes)
Create a new ring buffer, secured by a spinlock.
LIBCOM_API int epicsStdCall epicsRingBytesUsedBytes(epicsRingBytesId id)
Return the number of bytes currently stored in the ring buffer.
LIBCOM_API epicsRingBytesId epicsStdCall epicsRingBytesCreate(int nbytes)
Create a new ring buffer.
LIBCOM_API int epicsStdCall epicsRingBytesSize(epicsRingBytesId id)
Return the size of the ring buffer.
LIBCOM_API int epicsStdCall epicsRingBytesFreeBytes(epicsRingBytesId id)
Return the number of free bytes in the ring buffer.
LIBCOM_API void epicsStdCall epicsRingBytesResetHighWaterMark(epicsRingBytesId id)
Reset the Highwater mark of the ring buffer.
LIBCOM_API int epicsStdCall epicsRingBytesHighWaterMark(epicsRingBytesIdConst id)
See how full a ring buffer has been since it was last checked.
void * epicsRingBytesId
An identifier for a ring buffer.
LIBCOM_API int epicsStdCall epicsRingBytesIsEmpty(epicsRingBytesId id)
Test if the ring buffer is currently empty.