mrfioc2  2.3.0
ntpShmNull.cpp
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <dbCommon.h>
3 #include <drvSup.h>
4 #include <alarm.h>
5 #include <recGbl.h>
6 #include <devSup.h>
7 #include <drvSup.h>
8 
9 static void ntpShmRegister()
10 {
11  // nothing to do here...
12 }
13 
14 static long init_record(dbCommon*) { return 0; }
15 
16 static long read_record(dbCommon* prec)
17 {
18  recGblSetSevr(prec, READ_ALARM, INVALID_ALARM);
19  return 0;
20 }
21 
22 typedef struct {
23  dset common;
24  DEVSUPFUN read_fn;
25  DEVSUPFUN lin_convert;
26 } commonset;
27 
28 static commonset devNtpShmLiOk = {
29  {6, NULL, NULL, (DEVSUPFUN)&init_record, NULL},
30  (DEVSUPFUN)&read_record,
31  NULL
32 };
33 
34 static commonset devNtpShmLiFail = {
35  {6, NULL, NULL, (DEVSUPFUN)&init_record, NULL},
36  (DEVSUPFUN)&read_record,
37  NULL
38 };
39 
40 static commonset devNtpShmAiDelta = {
41  {6, NULL, NULL, (DEVSUPFUN)&init_record, NULL},
42  (DEVSUPFUN)&read_record,
43  NULL
44 };
45 
46 static void ntpShmReport(int)
47 {
48  fprintf(stderr, "NTP: Not implemented for this target\n");
49 }
50 
51 static drvet ntpShared = {
52  2,
53  (DRVSUPFUN)&ntpShmReport,
54  0,
55 };
56 
57 #include <epicsExport.h>
58 
59 extern "C"{
60  epicsExportAddress(drvet, ntpShared);
61  epicsExportAddress(dset, devNtpShmLiOk);
62  epicsExportAddress(dset, devNtpShmLiFail);
63  epicsExportAddress(dset, devNtpShmAiDelta);
64  epicsExportRegistrar(ntpShmRegister);
65 }
epicsExportRegistrar(ntpShmRegister)
epicsExportAddress(drvet, ntpShared)
DEVSUPFUN init_record