My Project
devMrmBuf.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2015 Paul Scherrer Institute (PSI), Villigen, Switzerland
3 * mrfioc2 is distributed subject to a Software License Agreement found
4 * in file LICENSE that is included with this distribution.
5 \*************************************************************************/
12 #ifndef DEVMRMBUF_H_
13 #define DEVMRMBUF_H_
14 
15 #include <epicsTypes.h>
16 
23 typedef struct mrmBufferInfo mrmBufferInfo_t;
24 
33 typedef void (*mrmBufRecievedCallback)(void *arg, epicsStatus status, epicsUInt32 length, const epicsUInt8 *buffer);
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
52 mrmBufferInfo_t epicsShareFunc *mrmBufInit(const char *dev_name);
53 
65 epicsStatus epicsShareFunc mrmBufRxSupported(mrmBufferInfo_t *data);
66 
78 epicsStatus epicsShareFunc mrmBufTxSupported(mrmBufferInfo_t *data);
79 
91 epicsStatus epicsShareFunc mrmBufEnable(mrmBufferInfo_t *data);
92 
102 epicsStatus epicsShareFunc mrmBufDisable(mrmBufferInfo_t *data);
103 
112 epicsStatus epicsShareFunc mrmBufMaxLen(mrmBufferInfo_t *data, epicsUInt32 *maxLength);
113 
125 epicsStatus epicsShareFunc mrmBufSend(mrmBufferInfo_t *data, epicsUInt32 len, epicsUInt8 *buf);
126 
136 epicsStatus epicsShareFunc mrmBufRegCallback(mrmBufferInfo_t *data, mrmBufRecievedCallback callback, void *param);
137 
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif /* DEVMRMBUF_H_ */
epicsStatus epicsShareFunc mrmBufMaxLen(mrmBufferInfo_t *data, epicsUInt32 *maxLength)
Get maximum supported buffer length.
Definition: devMrmBuf.cpp:122
epicsStatus epicsShareFunc mrmBufSend(mrmBufferInfo_t *data, epicsUInt32 len, epicsUInt8 *buf)
Send buffer data.
Definition: devMrmBuf.cpp:139
epicsStatus epicsShareFunc mrmBufTxSupported(mrmBufferInfo_t *data)
Checks whether transferring buffer is supported.
Definition: devMrmBuf.cpp:81
struct mrmBufferInfo mrmBufferInfo_t
The buffer information data structure.
Definition: devMrmBuf.h:23
epicsStatus epicsShareFunc mrmBufDisable(mrmBufferInfo_t *data)
Disable buffer sending logic.
Definition: devMrmBuf.cpp:109
epicsStatus epicsShareFunc mrmBufRxSupported(mrmBufferInfo_t *data)
Checks whether receive buffer is supported.
Definition: devMrmBuf.cpp:67
epicsStatus epicsShareFunc mrmBufRegCallback(mrmBufferInfo_t *data, mrmBufRecievedCallback callback, void *param)
Register data receive callback function.
Definition: devMrmBuf.cpp:156
mrmBufferInfo_t epicsShareFunc * mrmBufInit(const char *dev_name)
Initialize buffer data structure.
Definition: devMrmBuf.cpp:24
epicsStatus epicsShareFunc mrmBufEnable(mrmBufferInfo_t *data)
Disable buffer sending logic.
Definition: devMrmBuf.cpp:96
void(* mrmBufRecievedCallback)(void *arg, epicsStatus status, epicsUInt32 length, const epicsUInt8 *buffer)
Buffer received callback function.
Definition: devMrmBuf.h:33