EPICS Base  7.0.5.1
printfRecord.h
Go to the documentation of this file.
1 
7 #ifndef INC_printfRecord_H
8 #define INC_printfRecord_H
9 
10 #include "epicsTypes.h"
11 #include "link.h"
12 #include "epicsMutex.h"
13 #include "ellLib.h"
14 #include "devSup.h"
15 #include "epicsTime.h"
16 
17 /* Declare Device Support Entry Table */
18 struct printfRecord;
19 typedef struct printfdset {
20  dset common;
21  long (*write_string)(struct printfRecord *prec);
22 } printfdset;
23 #define HAS_printfdset
24 
25 /* Number of INPx fields defined */
26 #define PRINTF_NLINKS 10
27 
29 typedef struct printfRecord {
30  char name[61];
31  char desc[41];
32  char asg[29];
33  epicsEnum16 scan;
34  epicsEnum16 pini;
35  epicsInt16 phas;
36  char evnt[40];
37  epicsInt16 tse;
38  DBLINK tsel;
39  epicsEnum16 dtyp;
40  epicsInt16 disv;
41  epicsInt16 disa;
42  DBLINK sdis;
46  epicsUInt8 disp;
47  epicsUInt8 proc;
48  epicsEnum16 stat;
49  epicsEnum16 sevr;
50  epicsEnum16 nsta;
51  epicsEnum16 nsev;
52  epicsEnum16 acks;
53  epicsEnum16 ackt;
54  epicsEnum16 diss;
55  epicsUInt8 lcnt;
56  epicsUInt8 pact;
57  epicsUInt8 putf;
58  epicsUInt8 rpro;
59  struct asgMember *asp;
60  struct processNotify *ppn;
61  struct processNotifyRecord *ppnr;
62  struct scan_element *spvt;
63  struct typed_rset *rset;
65  void *dpvt;
66  struct dbRecordType *rdes;
67  struct lockRecord *lset;
68  epicsEnum16 prio;
69  epicsUInt8 tpro;
70  epicsUInt8 bkpt;
71  epicsUInt8 udf;
72  epicsEnum16 udfs;
74  DBLINK flnk;
75  char *val;
76  epicsUInt16 sizv;
77  epicsUInt32 len;
78  DBLINK out;
79  char fmt[81];
80  char ivls[16];
81  DBLINK inp0;
82  DBLINK inp1;
83  DBLINK inp2;
84  DBLINK inp3;
85  DBLINK inp4;
86  DBLINK inp5;
87  DBLINK inp6;
88  DBLINK inp7;
89  DBLINK inp8;
90  DBLINK inp9;
91 } printfRecord;
92 
93 typedef enum {
94  printfRecordNAME = 0,
95  printfRecordDESC = 1,
96  printfRecordASG = 2,
97  printfRecordSCAN = 3,
98  printfRecordPINI = 4,
99  printfRecordPHAS = 5,
100  printfRecordEVNT = 6,
101  printfRecordTSE = 7,
102  printfRecordTSEL = 8,
103  printfRecordDTYP = 9,
104  printfRecordDISV = 10,
105  printfRecordDISA = 11,
106  printfRecordSDIS = 12,
107  printfRecordMLOK = 13,
108  printfRecordMLIS = 14,
109  printfRecordBKLNK = 15,
110  printfRecordDISP = 16,
111  printfRecordPROC = 17,
112  printfRecordSTAT = 18,
113  printfRecordSEVR = 19,
114  printfRecordNSTA = 20,
115  printfRecordNSEV = 21,
116  printfRecordACKS = 22,
117  printfRecordACKT = 23,
118  printfRecordDISS = 24,
119  printfRecordLCNT = 25,
120  printfRecordPACT = 26,
121  printfRecordPUTF = 27,
122  printfRecordRPRO = 28,
123  printfRecordASP = 29,
124  printfRecordPPN = 30,
125  printfRecordPPNR = 31,
126  printfRecordSPVT = 32,
127  printfRecordRSET = 33,
128  printfRecordDSET = 34,
129  printfRecordDPVT = 35,
130  printfRecordRDES = 36,
131  printfRecordLSET = 37,
132  printfRecordPRIO = 38,
133  printfRecordTPRO = 39,
134  printfRecordBKPT = 40,
135  printfRecordUDF = 41,
136  printfRecordUDFS = 42,
137  printfRecordTIME = 43,
138  printfRecordFLNK = 44,
139  printfRecordVAL = 45,
140  printfRecordSIZV = 46,
141  printfRecordLEN = 47,
142  printfRecordOUT = 48,
143  printfRecordFMT = 49,
144  printfRecordIVLS = 50,
145  printfRecordINP0 = 51,
146  printfRecordINP1 = 52,
147  printfRecordINP2 = 53,
148  printfRecordINP3 = 54,
149  printfRecordINP4 = 55,
150  printfRecordINP5 = 56,
151  printfRecordINP6 = 57,
152  printfRecordINP7 = 58,
153  printfRecordINP8 = 59,
154  printfRecordINP9 = 60
155 } printfFieldIndex;
156 
157 #ifdef GEN_SIZE_OFFSET
158 
159 #include <epicsExport.h>
160 #include <cantProceed.h>
161 #ifdef __cplusplus
162 extern "C" {
163 #endif
164 static int printfRecordSizeOffset(dbRecordType *prt)
165 {
166  printfRecord *prec = 0;
167 
168  if (prt->no_fields != 61) {
169  cantProceed("IOC build or installation error:\n"
170  " The printfRecord defined in the DBD file has %d fields,\n"
171  " but the record support code was built with 61.\n",
172  prt->no_fields);
173  }
174  prt->papFldDes[printfRecordNAME]->size = sizeof(prec->name);
175  prt->papFldDes[printfRecordNAME]->offset = (unsigned short)((char *)&prec->name - (char *)prec);
176  prt->papFldDes[printfRecordDESC]->size = sizeof(prec->desc);
177  prt->papFldDes[printfRecordDESC]->offset = (unsigned short)((char *)&prec->desc - (char *)prec);
178  prt->papFldDes[printfRecordASG]->size = sizeof(prec->asg);
179  prt->papFldDes[printfRecordASG]->offset = (unsigned short)((char *)&prec->asg - (char *)prec);
180  prt->papFldDes[printfRecordSCAN]->size = sizeof(prec->scan);
181  prt->papFldDes[printfRecordSCAN]->offset = (unsigned short)((char *)&prec->scan - (char *)prec);
182  prt->papFldDes[printfRecordPINI]->size = sizeof(prec->pini);
183  prt->papFldDes[printfRecordPINI]->offset = (unsigned short)((char *)&prec->pini - (char *)prec);
184  prt->papFldDes[printfRecordPHAS]->size = sizeof(prec->phas);
185  prt->papFldDes[printfRecordPHAS]->offset = (unsigned short)((char *)&prec->phas - (char *)prec);
186  prt->papFldDes[printfRecordEVNT]->size = sizeof(prec->evnt);
187  prt->papFldDes[printfRecordEVNT]->offset = (unsigned short)((char *)&prec->evnt - (char *)prec);
188  prt->papFldDes[printfRecordTSE]->size = sizeof(prec->tse);
189  prt->papFldDes[printfRecordTSE]->offset = (unsigned short)((char *)&prec->tse - (char *)prec);
190  prt->papFldDes[printfRecordTSEL]->size = sizeof(prec->tsel);
191  prt->papFldDes[printfRecordTSEL]->offset = (unsigned short)((char *)&prec->tsel - (char *)prec);
192  prt->papFldDes[printfRecordDTYP]->size = sizeof(prec->dtyp);
193  prt->papFldDes[printfRecordDTYP]->offset = (unsigned short)((char *)&prec->dtyp - (char *)prec);
194  prt->papFldDes[printfRecordDISV]->size = sizeof(prec->disv);
195  prt->papFldDes[printfRecordDISV]->offset = (unsigned short)((char *)&prec->disv - (char *)prec);
196  prt->papFldDes[printfRecordDISA]->size = sizeof(prec->disa);
197  prt->papFldDes[printfRecordDISA]->offset = (unsigned short)((char *)&prec->disa - (char *)prec);
198  prt->papFldDes[printfRecordSDIS]->size = sizeof(prec->sdis);
199  prt->papFldDes[printfRecordSDIS]->offset = (unsigned short)((char *)&prec->sdis - (char *)prec);
200  prt->papFldDes[printfRecordMLOK]->size = sizeof(prec->mlok);
201  prt->papFldDes[printfRecordMLOK]->offset = (unsigned short)((char *)&prec->mlok - (char *)prec);
202  prt->papFldDes[printfRecordMLIS]->size = sizeof(prec->mlis);
203  prt->papFldDes[printfRecordMLIS]->offset = (unsigned short)((char *)&prec->mlis - (char *)prec);
204  prt->papFldDes[printfRecordBKLNK]->size = sizeof(prec->bklnk);
205  prt->papFldDes[printfRecordBKLNK]->offset = (unsigned short)((char *)&prec->bklnk - (char *)prec);
206  prt->papFldDes[printfRecordDISP]->size = sizeof(prec->disp);
207  prt->papFldDes[printfRecordDISP]->offset = (unsigned short)((char *)&prec->disp - (char *)prec);
208  prt->papFldDes[printfRecordPROC]->size = sizeof(prec->proc);
209  prt->papFldDes[printfRecordPROC]->offset = (unsigned short)((char *)&prec->proc - (char *)prec);
210  prt->papFldDes[printfRecordSTAT]->size = sizeof(prec->stat);
211  prt->papFldDes[printfRecordSTAT]->offset = (unsigned short)((char *)&prec->stat - (char *)prec);
212  prt->papFldDes[printfRecordSEVR]->size = sizeof(prec->sevr);
213  prt->papFldDes[printfRecordSEVR]->offset = (unsigned short)((char *)&prec->sevr - (char *)prec);
214  prt->papFldDes[printfRecordNSTA]->size = sizeof(prec->nsta);
215  prt->papFldDes[printfRecordNSTA]->offset = (unsigned short)((char *)&prec->nsta - (char *)prec);
216  prt->papFldDes[printfRecordNSEV]->size = sizeof(prec->nsev);
217  prt->papFldDes[printfRecordNSEV]->offset = (unsigned short)((char *)&prec->nsev - (char *)prec);
218  prt->papFldDes[printfRecordACKS]->size = sizeof(prec->acks);
219  prt->papFldDes[printfRecordACKS]->offset = (unsigned short)((char *)&prec->acks - (char *)prec);
220  prt->papFldDes[printfRecordACKT]->size = sizeof(prec->ackt);
221  prt->papFldDes[printfRecordACKT]->offset = (unsigned short)((char *)&prec->ackt - (char *)prec);
222  prt->papFldDes[printfRecordDISS]->size = sizeof(prec->diss);
223  prt->papFldDes[printfRecordDISS]->offset = (unsigned short)((char *)&prec->diss - (char *)prec);
224  prt->papFldDes[printfRecordLCNT]->size = sizeof(prec->lcnt);
225  prt->papFldDes[printfRecordLCNT]->offset = (unsigned short)((char *)&prec->lcnt - (char *)prec);
226  prt->papFldDes[printfRecordPACT]->size = sizeof(prec->pact);
227  prt->papFldDes[printfRecordPACT]->offset = (unsigned short)((char *)&prec->pact - (char *)prec);
228  prt->papFldDes[printfRecordPUTF]->size = sizeof(prec->putf);
229  prt->papFldDes[printfRecordPUTF]->offset = (unsigned short)((char *)&prec->putf - (char *)prec);
230  prt->papFldDes[printfRecordRPRO]->size = sizeof(prec->rpro);
231  prt->papFldDes[printfRecordRPRO]->offset = (unsigned short)((char *)&prec->rpro - (char *)prec);
232  prt->papFldDes[printfRecordASP]->size = sizeof(prec->asp);
233  prt->papFldDes[printfRecordASP]->offset = (unsigned short)((char *)&prec->asp - (char *)prec);
234  prt->papFldDes[printfRecordPPN]->size = sizeof(prec->ppn);
235  prt->papFldDes[printfRecordPPN]->offset = (unsigned short)((char *)&prec->ppn - (char *)prec);
236  prt->papFldDes[printfRecordPPNR]->size = sizeof(prec->ppnr);
237  prt->papFldDes[printfRecordPPNR]->offset = (unsigned short)((char *)&prec->ppnr - (char *)prec);
238  prt->papFldDes[printfRecordSPVT]->size = sizeof(prec->spvt);
239  prt->papFldDes[printfRecordSPVT]->offset = (unsigned short)((char *)&prec->spvt - (char *)prec);
240  prt->papFldDes[printfRecordRSET]->size = sizeof(prec->rset);
241  prt->papFldDes[printfRecordRSET]->offset = (unsigned short)((char *)&prec->rset - (char *)prec);
242  prt->papFldDes[printfRecordDSET]->size = sizeof(prec->dset);
243  prt->papFldDes[printfRecordDSET]->offset = (unsigned short)((char *)&prec->dset - (char *)prec);
244  prt->papFldDes[printfRecordDPVT]->size = sizeof(prec->dpvt);
245  prt->papFldDes[printfRecordDPVT]->offset = (unsigned short)((char *)&prec->dpvt - (char *)prec);
246  prt->papFldDes[printfRecordRDES]->size = sizeof(prec->rdes);
247  prt->papFldDes[printfRecordRDES]->offset = (unsigned short)((char *)&prec->rdes - (char *)prec);
248  prt->papFldDes[printfRecordLSET]->size = sizeof(prec->lset);
249  prt->papFldDes[printfRecordLSET]->offset = (unsigned short)((char *)&prec->lset - (char *)prec);
250  prt->papFldDes[printfRecordPRIO]->size = sizeof(prec->prio);
251  prt->papFldDes[printfRecordPRIO]->offset = (unsigned short)((char *)&prec->prio - (char *)prec);
252  prt->papFldDes[printfRecordTPRO]->size = sizeof(prec->tpro);
253  prt->papFldDes[printfRecordTPRO]->offset = (unsigned short)((char *)&prec->tpro - (char *)prec);
254  prt->papFldDes[printfRecordBKPT]->size = sizeof(prec->bkpt);
255  prt->papFldDes[printfRecordBKPT]->offset = (unsigned short)((char *)&prec->bkpt - (char *)prec);
256  prt->papFldDes[printfRecordUDF]->size = sizeof(prec->udf);
257  prt->papFldDes[printfRecordUDF]->offset = (unsigned short)((char *)&prec->udf - (char *)prec);
258  prt->papFldDes[printfRecordUDFS]->size = sizeof(prec->udfs);
259  prt->papFldDes[printfRecordUDFS]->offset = (unsigned short)((char *)&prec->udfs - (char *)prec);
260  prt->papFldDes[printfRecordTIME]->size = sizeof(prec->time);
261  prt->papFldDes[printfRecordTIME]->offset = (unsigned short)((char *)&prec->time - (char *)prec);
262  prt->papFldDes[printfRecordFLNK]->size = sizeof(prec->flnk);
263  prt->papFldDes[printfRecordFLNK]->offset = (unsigned short)((char *)&prec->flnk - (char *)prec);
264  prt->papFldDes[printfRecordVAL]->size = sizeof(prec->val);
265  prt->papFldDes[printfRecordVAL]->offset = (unsigned short)((char *)&prec->val - (char *)prec);
266  prt->papFldDes[printfRecordSIZV]->size = sizeof(prec->sizv);
267  prt->papFldDes[printfRecordSIZV]->offset = (unsigned short)((char *)&prec->sizv - (char *)prec);
268  prt->papFldDes[printfRecordLEN]->size = sizeof(prec->len);
269  prt->papFldDes[printfRecordLEN]->offset = (unsigned short)((char *)&prec->len - (char *)prec);
270  prt->papFldDes[printfRecordOUT]->size = sizeof(prec->out);
271  prt->papFldDes[printfRecordOUT]->offset = (unsigned short)((char *)&prec->out - (char *)prec);
272  prt->papFldDes[printfRecordFMT]->size = sizeof(prec->fmt);
273  prt->papFldDes[printfRecordFMT]->offset = (unsigned short)((char *)&prec->fmt - (char *)prec);
274  prt->papFldDes[printfRecordIVLS]->size = sizeof(prec->ivls);
275  prt->papFldDes[printfRecordIVLS]->offset = (unsigned short)((char *)&prec->ivls - (char *)prec);
276  prt->papFldDes[printfRecordINP0]->size = sizeof(prec->inp0);
277  prt->papFldDes[printfRecordINP0]->offset = (unsigned short)((char *)&prec->inp0 - (char *)prec);
278  prt->papFldDes[printfRecordINP1]->size = sizeof(prec->inp1);
279  prt->papFldDes[printfRecordINP1]->offset = (unsigned short)((char *)&prec->inp1 - (char *)prec);
280  prt->papFldDes[printfRecordINP2]->size = sizeof(prec->inp2);
281  prt->papFldDes[printfRecordINP2]->offset = (unsigned short)((char *)&prec->inp2 - (char *)prec);
282  prt->papFldDes[printfRecordINP3]->size = sizeof(prec->inp3);
283  prt->papFldDes[printfRecordINP3]->offset = (unsigned short)((char *)&prec->inp3 - (char *)prec);
284  prt->papFldDes[printfRecordINP4]->size = sizeof(prec->inp4);
285  prt->papFldDes[printfRecordINP4]->offset = (unsigned short)((char *)&prec->inp4 - (char *)prec);
286  prt->papFldDes[printfRecordINP5]->size = sizeof(prec->inp5);
287  prt->papFldDes[printfRecordINP5]->offset = (unsigned short)((char *)&prec->inp5 - (char *)prec);
288  prt->papFldDes[printfRecordINP6]->size = sizeof(prec->inp6);
289  prt->papFldDes[printfRecordINP6]->offset = (unsigned short)((char *)&prec->inp6 - (char *)prec);
290  prt->papFldDes[printfRecordINP7]->size = sizeof(prec->inp7);
291  prt->papFldDes[printfRecordINP7]->offset = (unsigned short)((char *)&prec->inp7 - (char *)prec);
292  prt->papFldDes[printfRecordINP8]->size = sizeof(prec->inp8);
293  prt->papFldDes[printfRecordINP8]->offset = (unsigned short)((char *)&prec->inp8 - (char *)prec);
294  prt->papFldDes[printfRecordINP9]->size = sizeof(prec->inp9);
295  prt->papFldDes[printfRecordINP9]->offset = (unsigned short)((char *)&prec->inp9 - (char *)prec);
296  prt->rec_size = sizeof(*prec);
297  return 0;
298 }
299 epicsExportRegistrar(printfRecordSizeOffset);
300 
301 #ifdef __cplusplus
302 }
303 #endif
304 #endif /* GEN_SIZE_OFFSET */
305 
306 #endif /* INC_printfRecord_H */
DBLINK inp3
Input 3.
Definition: printfRecord.h:84
epicsInt16 disv
Disable Value.
Definition: printfRecord.h:40
epicsMutexId mlok
Monitor lock.
Definition: printfRecord.h:43
struct lockRecord * lset
Lock Set.
Definition: printfRecord.h:67
epicsUInt8 tpro
Trace Processing.
Definition: printfRecord.h:69
epicsEnum16 stat
Alarm Status.
Definition: printfRecord.h:48
epicsUInt8 udf
Undefined.
Definition: printfRecord.h:71
epicsEnum16 diss
Disable Alarm Sevrty.
Definition: printfRecord.h:54
epicsInt16 phas
Scan Phase.
Definition: printfRecord.h:35
epicsEnum16 nsev
New Alarm Severity.
Definition: printfRecord.h:51
LIBCOM_API void cantProceed(const char *errorMessage,...) EPICS_PRINTF_STYLE(1
Suspend this thread, the caller cannot continue or return.
The core data types used by epics.
epicsEnum16 scan
Scan Mechanism.
Definition: printfRecord.h:33
struct scan_element * spvt
Scan Private.
Definition: printfRecord.h:62
epicsEnum16 sevr
Alarm Severity.
Definition: printfRecord.h:49
epicsEnum16 acks
Alarm Ack Severity.
Definition: printfRecord.h:52
Exporting IOC objects.
epicsEnum16 udfs
Undefined Alarm Sevrty.
Definition: printfRecord.h:72
char evnt[40]
Event Name.
Definition: printfRecord.h:36
DBLINK inp9
Input 9.
Definition: printfRecord.h:90
epicsEnum16 pini
Process at iocInit.
Definition: printfRecord.h:34
struct dbRecordType * rdes
Address of dbRecordType.
Definition: printfRecord.h:66
DBLINK inp1
Input 1.
Definition: printfRecord.h:82
DBLINK inp2
Input 2.
Definition: printfRecord.h:83
Routines for code that can&#39;t continue or return after an error.
DBLINK sdis
Scanning Disable.
Definition: printfRecord.h:42
Declaration of printf record type.
Definition: printfRecord.h:29
DBLINK out
Output Specification.
Definition: printfRecord.h:78
epicsInt16 disa
Disable.
Definition: printfRecord.h:41
struct processNotifyRecord * ppnr
pprocessNotifyRecord
Definition: printfRecord.h:61
epicsUInt8 bkpt
Break Point.
Definition: printfRecord.h:70
DBLINK inp8
Input 8.
Definition: printfRecord.h:89
struct asgMember * asp
Access Security Pvt.
Definition: printfRecord.h:59
char asg[29]
Access Security Group.
Definition: printfRecord.h:32
epicsEnum16 ackt
Alarm Ack Transient.
Definition: printfRecord.h:53
epicsUInt8 pact
Record active.
Definition: printfRecord.h:56
Definition: devSup.h:141
EPICS time stamp, for use from C code.
Definition: epicsTime.h:34
A doubly-linked list library.
List header type.
Definition: ellLib.h:57
DBLINK tsel
Time Stamp Link.
Definition: printfRecord.h:38
char name[61]
Record Name.
Definition: printfRecord.h:30
DBLINK inp6
Input 6.
Definition: printfRecord.h:87
epicsUInt8 lcnt
Lock Count.
Definition: printfRecord.h:55
char * val
Result.
Definition: printfRecord.h:75
DBLINK flnk
Forward Process Link.
Definition: printfRecord.h:74
epicsUInt8 disp
Disable putField.
Definition: printfRecord.h:46
APIs for the epicsMutex mutual exclusion semaphore.
epicsUInt32 len
Length of VAL.
Definition: printfRecord.h:77
Device support routines.
char ivls[16]
Invalid Link String.
Definition: printfRecord.h:80
ELLLIST mlis
Monitor List.
Definition: printfRecord.h:44
epicsEnum16 prio
Scheduling Priority.
Definition: printfRecord.h:68
void * dpvt
Device Private.
Definition: printfRecord.h:65
ELLLIST bklnk
Backwards link tracking.
Definition: printfRecord.h:45
struct typed_rset * rset
Address of RSET.
Definition: printfRecord.h:63
epicsUInt8 putf
dbPutField process
Definition: printfRecord.h:57
epicsInt16 tse
Time Stamp Event.
Definition: printfRecord.h:37
epicsUInt8 rpro
Reprocess.
Definition: printfRecord.h:58
DBLINK inp0
Input 0.
Definition: printfRecord.h:81
epicsTimeStamp time
Time.
Definition: printfRecord.h:73
#define epicsExportRegistrar(fun)
Declare a registrar function for exporting.
Definition: epicsExport.h:94
epicsEnum16 dtyp
Device Type.
Definition: printfRecord.h:39
DBLINK inp4
Input 4.
Definition: printfRecord.h:85
DBLINK inp5
Input 5.
Definition: printfRecord.h:86
epicsUInt16 sizv
Size of VAL buffer.
Definition: printfRecord.h:76
char fmt[81]
Format String.
Definition: printfRecord.h:79
EPICS time-stamps (epicsTimeStamp), epicsTime C++ class and C functions for handling wall-clock times...
epicsUInt8 proc
Force Processing.
Definition: printfRecord.h:47
unambiguous_dset * dset
DSET address.
Definition: printfRecord.h:64
struct processNotify * ppn
pprocessNotify
Definition: printfRecord.h:60
DBLINK inp7
Input 7.
Definition: printfRecord.h:88
char desc[41]
Descriptor.
Definition: printfRecord.h:31
epicsEnum16 nsta
New Alarm Status.
Definition: printfRecord.h:50
struct epicsMutexParm * epicsMutexId
An identifier for an epicsMutex for use with the C API.
Definition: epicsMutex.h:49