Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef devStream_h
00022 #define devStream_h
00023
00024 #define STREAM_MAJOR 2
00025 #define STREAM_MINOR 4
00026
00027 #if defined(__vxworks) || defined(vxWorks)
00028 #include <vxWorks.h>
00029 #endif
00030
00031 #ifndef OK
00032 #define OK 0
00033 #endif
00034
00035 #ifndef ERROR
00036 #define ERROR -1
00037 #endif
00038
00039 #define DO_NOT_CONVERT 2
00040 #define INIT_RUN (!interruptAccept)
00041
00042 #include <epicsVersion.h>
00043 #if (EPICS_VERSION == 3 && EPICS_REVISION == 14)
00044 #define EPICS_3_14
00045 #endif
00046
00047 #if defined(__cplusplus) && !defined(EPICS_3_14)
00048 extern "C" {
00049 #endif
00050
00051 #include <stdio.h>
00052 #include <dbCommon.h>
00053 #include <dbScan.h>
00054 #include <devSup.h>
00055
00056 #include <dbAccess.h>
00057
00058 #if defined(__cplusplus) && !defined(EPICS_3_14)
00059 }
00060 #endif
00061
00062
00063 typedef const struct format_s {
00064 unsigned char type;
00065 const struct StreamFormat* priv;
00066 } format_t;
00067
00068 #ifdef __cplusplus
00069 extern "C" {
00070 #endif
00071
00072 #ifdef _WIN32
00073 __declspec(dllimport)
00074 #endif
00075 extern FILE* StreamDebugFile;
00076
00077 extern const char StreamVersion [];
00078
00079 typedef long (*streamIoFunction) (dbCommon*, format_t*);
00080
00081 long streamInit(int after);
00082 long streamInitRecord(dbCommon *record, struct link *ioLink,
00083 streamIoFunction readData, streamIoFunction writeData);
00084 long streamReport(int interest);
00085 long streamReadWrite(dbCommon *record);
00086 long streamGetIointInfo(int cmd, dbCommon *record, IOSCANPVT *ppvt);
00087 long streamPrintf(dbCommon *record, format_t *format, ...);
00088 long streamScanfN(dbCommon *record, format_t *format,
00089 void*, size_t maxStringSize);
00090
00091
00092 #define devStreamIoFunction streamIoFunction
00093 #define devStreamInit streamInit
00094 #define devStreamInitRecord streamInitRecord
00095 #define devStreamReport streamReport
00096 #define devStreamRead streamReadWrite
00097 #define devStreamWrite streamReadWrite
00098 #define devStreamGetIointInfo streamGetIointInfo
00099 #define devStreamPrintf streamPrintf
00100 #define devStreamPrintSep(record) (0)
00101 #define devStreamScanSep (0)
00102 #define devStreamScanf(record, format, value) \
00103 streamScanfN(record, format, value, MAX_STRING_SIZE)
00104 #define streamScanf(record, format, value) \
00105 streamScanfN(record, format, value, MAX_STRING_SIZE)
00106 #define streamRead streamReadWrite
00107 #define streamWrite streamReadWrite
00108 #define streamReport NULL
00109
00110 #ifdef __cplusplus
00111 }
00112 #endif
00113
00114 #endif