Merge ~anj/epics-base/+git/base-7.0:typed-dsets into ~epics-core/epics-base/+git/epics-base:7.0

Proposed by Andrew Johnson
Status: Merged
Approved by: Andrew Johnson
Approved revision: e13b01208ba86f5e5c8f446e5fc287118e822f9a
Merged at revision: bc595e3a70fe7e8b718d796d38adf2ca66b3815e
Proposed branch: ~anj/epics-base/+git/base-7.0:typed-dsets
Merge into: ~epics-core/epics-base/+git/epics-base:7.0
Diff against target: 4144 lines (+759/-1061) (has conflicts)
110 files modified
configure/CONFIG_DATABASE_VERSION (+2/-2)
documentation/RELEASE_NOTES.md (+103/-0)
modules/database/src/ioc/Makefile (+3/-2)
modules/database/src/ioc/dbStatic/devSup.h (+2/-5)
modules/database/src/std/Makefile (+3/-2)
modules/database/src/std/dev/Makefile (+1/-1)
modules/database/src/std/dev/devAaiSoft.c (+8/-18)
modules/database/src/std/dev/devAaoSoft.c (+8/-17)
modules/database/src/std/dev/devAiSoft.c (+7/-18)
modules/database/src/std/dev/devAiSoftCallback.c (+5/-9)
modules/database/src/std/dev/devAiSoftRaw.c (+7/-18)
modules/database/src/std/dev/devAoSoft.c (+8/-22)
modules/database/src/std/dev/devAoSoftCallback.c (+6/-17)
modules/database/src/std/dev/devAoSoftRaw.c (+6/-18)
modules/database/src/std/dev/devBiDbState.c (+4/-15)
modules/database/src/std/dev/devBiSoft.c (+6/-15)
modules/database/src/std/dev/devBiSoftCallback.c (+4/-5)
modules/database/src/std/dev/devBiSoftRaw.c (+6/-15)
modules/database/src/std/dev/devBoDbState.c (+4/-15)
modules/database/src/std/dev/devBoSoft.c (+7/-20)
modules/database/src/std/dev/devBoSoftCallback.c (+4/-16)
modules/database/src/std/dev/devBoSoftRaw.c (+7/-20)
modules/database/src/std/dev/devCalcoutSoft.c (+3/-9)
modules/database/src/std/dev/devCalcoutSoftCallback.c (+3/-9)
modules/database/src/std/dev/devEnviron.c (+4/-6)
modules/database/src/std/dev/devEventSoft.c (+6/-15)
modules/database/src/std/dev/devGeneralTime.c (+21/-25)
modules/database/src/std/dev/devHistogramSoft.c (+10/-20)
modules/database/src/std/dev/devI64inSoft.c (+10/-22)
modules/database/src/std/dev/devI64inSoftCallback.c (+4/-7)
modules/database/src/std/dev/devI64outSoft.c (+8/-21)
modules/database/src/std/dev/devI64outSoftCallback.c (+6/-19)
modules/database/src/std/dev/devLiSoft.c (+6/-15)
modules/database/src/std/dev/devLiSoftCallback.c (+4/-5)
modules/database/src/std/dev/devLoSoft.c (+8/-18)
modules/database/src/std/dev/devLoSoftCallback.c (+5/-16)
modules/database/src/std/dev/devLsiSoft.c (+3/-2)
modules/database/src/std/dev/devLsoSoft.c (+1/-1)
modules/database/src/std/dev/devLsoSoftCallback.c (+1/-1)
modules/database/src/std/dev/devMbbiDirectSoft.c (+6/-15)
modules/database/src/std/dev/devMbbiDirectSoftCallback.c (+4/-5)
modules/database/src/std/dev/devMbbiDirectSoftRaw.c (+6/-15)
modules/database/src/std/dev/devMbbiSoft.c (+6/-15)
modules/database/src/std/dev/devMbbiSoftCallback.c (+5/-6)
modules/database/src/std/dev/devMbbiSoftRaw.c (+6/-15)
modules/database/src/std/dev/devMbboDirectSoft.c (+1/-4)
modules/database/src/std/dev/devMbboDirectSoftCallback.c (+2/-5)
modules/database/src/std/dev/devMbboDirectSoftRaw.c (+4/-5)
modules/database/src/std/dev/devMbboSoft.c (+8/-18)
modules/database/src/std/dev/devMbboSoftCallback.c (+5/-15)
modules/database/src/std/dev/devMbboSoftRaw.c (+4/-5)
modules/database/src/std/dev/devPrintfSoft.c (+1/-1)
modules/database/src/std/dev/devPrintfSoftCallback.c (+1/-1)
modules/database/src/std/dev/devSASoft.c (+5/-15)
modules/database/src/std/dev/devSiSoft.c (+6/-15)
modules/database/src/std/dev/devSiSoftCallback.c (+5/-6)
modules/database/src/std/dev/devSoSoft.c (+3/-13)
modules/database/src/std/dev/devSoSoftCallback.c (+3/-14)
modules/database/src/std/dev/devStdio.c (+5/-7)
modules/database/src/std/dev/devTimestamp.c (+6/-11)
modules/database/src/std/dev/devWfSoft.c (+5/-15)
modules/database/src/std/rec/aaiRecord.c (+6/-15)
modules/database/src/std/rec/aaiRecord.dbd (+9/-0)
modules/database/src/std/rec/aaoRecord.c (+6/-15)
modules/database/src/std/rec/aaoRecord.dbd (+9/-0)
modules/database/src/std/rec/aiRecord.c (+4/-15)
modules/database/src/std/rec/aiRecord.dbd.pod (+10/-0)
modules/database/src/std/rec/aoRecord.c (+10/-20)
modules/database/src/std/rec/aoRecord.dbd.pod (+10/-0)
modules/database/src/std/rec/biRecord.c (+9/-16)
modules/database/src/std/rec/biRecord.dbd.pod (+9/-0)
modules/database/src/std/rec/boRecord.c (+6/-16)
modules/database/src/std/rec/boRecord.dbd.pod (+9/-0)
modules/database/src/std/rec/calcRecord.c (+1/-1)
modules/database/src/std/rec/calcoutRecord.c (+5/-15)
modules/database/src/std/rec/calcoutRecord.dbd.pod (+8/-0)
modules/database/src/std/rec/eventRecord.c (+6/-14)
modules/database/src/std/rec/eventRecord.dbd.pod (+10/-0)
modules/database/src/std/rec/histogramRecord.c (+7/-18)
modules/database/src/std/rec/histogramRecord.dbd (+10/-0)
modules/database/src/std/rec/int64inRecord.c (+7/-15)
modules/database/src/std/rec/int64inRecord.dbd.pod (+9/-0)
modules/database/src/std/rec/int64outRecord.c (+7/-15)
modules/database/src/std/rec/int64outRecord.dbd.pod (+9/-0)
modules/database/src/std/rec/longinRecord.c (+6/-15)
modules/database/src/std/rec/longinRecord.dbd.pod (+9/-0)
modules/database/src/std/rec/longoutRecord.c (+6/-15)
modules/database/src/std/rec/longoutRecord.dbd.pod (+9/-0)
modules/database/src/std/rec/lsiRecord.c (+4/-4)
modules/database/src/std/rec/lsiRecord.dbd (+4/-7)
modules/database/src/std/rec/lsoRecord.c (+3/-3)
modules/database/src/std/rec/lsoRecord.dbd (+4/-7)
modules/database/src/std/rec/mbbiDirectRecord.c (+6/-15)
modules/database/src/std/rec/mbbiDirectRecord.dbd.pod (+8/-0)
modules/database/src/std/rec/mbbiRecord.c (+6/-16)
modules/database/src/std/rec/mbbiRecord.dbd.pod (+8/-0)
modules/database/src/std/rec/mbboDirectRecord.c (+6/-16)
modules/database/src/std/rec/mbboDirectRecord.dbd.pod (+8/-0)
modules/database/src/std/rec/mbboRecord.c (+7/-16)
modules/database/src/std/rec/mbboRecord.dbd.pod (+8/-0)
modules/database/src/std/rec/printfRecord.c (+4/-4)
modules/database/src/std/rec/printfRecord.dbd (+4/-7)
modules/database/src/std/rec/stringinRecord.c (+6/-14)
modules/database/src/std/rec/stringinRecord.dbd.pod (+9/-0)
modules/database/src/std/rec/stringoutRecord.c (+6/-14)
modules/database/src/std/rec/stringoutRecord.dbd.pod (+9/-0)
modules/database/src/std/rec/subArrayRecord.c (+7/-16)
modules/database/src/std/rec/subArrayRecord.dbd.pod (+9/-0)
modules/database/src/std/rec/waveformRecord.c (+7/-15)
modules/database/src/std/rec/waveformRecord.dbd.pod (+9/-0)
Conflict in documentation/RELEASE_NOTES.md
Reviewer Review Type Date Requested Status
mdavidsaver Approve
Andrew Johnson Approve
Ralph Lange Approve
Review via email: mp+375934@code.launchpad.net

Commit message

Start adding typed dset declarations to the Record.h files and converting the code to use them.

Description of the change

I've started looking at how we could introduce record-specific fully-typed dset declarations into the record.dbd files. My lsi, lso and printf record types already declared their dset structures inside their Record.h files, but those dsets were not typed and didn't derive from the generic dset, so I started out by making them use the generic dset and work when USE_TYPED_DSET is defined. All internal device support layers were converted in the same commit. Then I added dset declarations for the int64in and int64out record types, and converted their record and device code too.

There are very few external device supports for these record types. The latest ether_ip driver supports lsi/lso, and asyn has support for the int64 record types, and both those modules build against this version of Base with no issues. However these device support layers are still defining their own dset structures for all record types.

In order to simplify writing device support that works with earlier Base versions I also define the macro HAS_<record>dset in the Record.h file.

My dset declarations look slightly different than the originals but result in an identical layout; I embed a generic dset object at the beginning of the record's dset, which requires some changes inside the Record.c code to access the generic members inside the embedded dset. The device support definition also has to add an extra pair of braces around the common members, so this requires some extra changes in the device support but means that the record dsets don't have to define the generic members at all, removing another potential source of typos/errors.

Please comment on the various aspects of this approach as described above. If approved, converting the other record types to use the same approach could become a codeathon project. I would add release notes showing how to convert record types and device support layers before merging this branch.

To post a comment you must log in.
Revision history for this message
mdavidsaver (mdavidsaver) wrote :

> There are very few external device supports for these record types
...
> However these device support layers are still defining their own dset structures for all record types.

I'm ok with this (imo. minor) compatibility break.

> ... removing another potential source of typos/errors.

:)

review: Approve
Revision history for this message
Ralph Lange (ralph-lange) wrote :

My opcua support supports both lsi/lso and the int64 types. Will check how this behaves, but I don't expect any serious issues. I do like these changes.

Good to go after documentation is added. (That's what the "Needs Fixing" is about.)
Please show how to correctly use the HAS_<record>dset macro.

review: Needs Fixing
Revision history for this message
Andrew Johnson (anj) wrote :

Added documentation to the Release Notes including how to modify an external device support that must remain compatible with older versions of Base. Rather than using one of the new and probably unfamiliar record types for that I converted the ai record and all the internal device supports that use it.

There is an unfortunate issue with the lso, lsi and printf records which were already publishing their dsets, so they need a slightly different approach to remain compatible with older Base versions, which I also showed. The alternative would have been to rename the dset for these record types, but I didn't want to break the naming pattern if I could avoid it.

I have tested these approaches with Kay's ether_ip driver, and will send him a PR for that code once this branch gets merged.

Revision history for this message
Ralph Lange (ralph-lange) wrote :

All fine now! Thanks.

review: Approve
Revision history for this message
Andrew Johnson (anj) wrote :

Merged José's Codeathon work into this branch (he converted all of the other record types and their device supports), then added some finishing touches and other documentation adjustments. I believe this is now ready to merge, but I haven't tested it with external source code. I did bump the minor version number for the database module, to 3.18.0.

review: Approve
Revision history for this message
mdavidsaver (mdavidsaver) wrote :

This all looks good.

review: Approve
Revision history for this message
mdavidsaver (mdavidsaver) wrote :

I've merged this change into my 7.0 branch in preparation for inclusion in the main 7.0 branch.

https://github.com/mdavidsaver/epics-base/tree/7.0

up to https://github.com/mdavidsaver/epics-base/commit/e822a65304e600808bc5994921a2d042f67f2eb2

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/configure/CONFIG_DATABASE_VERSION b/configure/CONFIG_DATABASE_VERSION
2index 21ac836..93a87a0 100644
3--- a/configure/CONFIG_DATABASE_VERSION
4+++ b/configure/CONFIG_DATABASE_VERSION
5@@ -1,8 +1,8 @@
6 # Version number for the database APIs and shared library
7
8 EPICS_DATABASE_MAJOR_VERSION = 3
9-EPICS_DATABASE_MINOR_VERSION = 17
10-EPICS_DATABASE_MAINTENANCE_VERSION = 6
11+EPICS_DATABASE_MINOR_VERSION = 18
12+EPICS_DATABASE_MAINTENANCE_VERSION = 0
13
14 # Development flag, set to zero for release versions
15
16diff --git a/documentation/RELEASE_NOTES.md b/documentation/RELEASE_NOTES.md
17index bdd2468..31322ec 100644
18--- a/documentation/RELEASE_NOTES.md
19+++ b/documentation/RELEASE_NOTES.md
20@@ -12,6 +12,7 @@ The external PVA submodules each have their own separate set of release notes
21 which should also be read to understand what has changed since an earlier
22 release.
23
24+<<<<<<< documentation/RELEASE_NOTES.md
25 ## EPICS Release 7.x.y.z
26
27 ### caRepeater /dev/null
28@@ -24,6 +25,108 @@ caget is itself being run from a shell script.
29
30 caRepeater will now understand the '-v' argument to retain stdin/out/err
31 which may be necessary to see any error messages it may emit.
32+=======
33+## EPICS Release 7.0.3.2
34+
35+<!-- Insert new items immediately below here ... -->
36+
37+
38+### Record types publish dset's
39+
40+The record types in Base now define their device support entry table (DSET)
41+structures in the record header file. While still optional, developers of
42+external support modules are encouraged to start converting their code to use
43+the record's new definitions instead of the traditional approach of copying the
44+structure definitions into each source file that needs them. By following the
45+instructions below it is still possible for the converted code to build and
46+work with older Base releases.
47+
48+This would also be a good time to modify the device support to use the type-safe
49+device support entry tables that were introduced in Base-3.16.2 -- see
50+[#type-safe-device-and-driver-support-tables](this entry below) for the
51+description of that change, which is also optional for now.
52+
53+Look at the aiRecord for example. Near the top of the generated `aiRecord.h`
54+header file is a new section that declares the `aidset`:
55+
56+```C
57+/* Declare Device Support Entry Table */
58+struct aiRecord;
59+typedef struct aidset {
60+ dset common;
61+ long (*read_ai)(struct aiRecord *prec);
62+ long (*special_linconv)(struct aiRecord *prec, int after);
63+} aidset;
64+#define HAS_aidset
65+```
66+
67+Notice that the common members (`number`, `report()`, `init()`, `init_record()`
68+and `get_ioint_info()` don't appear directly but are included by embedding the
69+`dset common` member instead. This avoids the need to have separate definitions
70+of those members in each record dset, but does require those members to be
71+wrapped inside another set of braces `{}` when initializing the data structure
72+for the individual device supports. It also requires changes to code that
73+references those common members, but that code usually only appears inside the
74+record type implementation and very rarely in device supports.
75+
76+An aiRecord device support that will only be built against this or later
77+versions of EPICS can now declare its dset like this:
78+
79+```C
80+aidset devAiSoft = {
81+ { 6, NULL, NULL, init_record, NULL },
82+ read_ai, NULL
83+};
84+epicsExportAddress(dset, devAiSoft);
85+```
86+
87+However most device support that is not built into EPICS itself will need to
88+remain compatible with older EPICS versions, which is why the ai record's header
89+file also declares the preprocessor macro `HAS_aidset`. This makes it easy to
90+define the `aidset` in the device support code when it's needed, and not when
91+it's provided in the header:
92+
93+```C
94+#ifndef HAS_aidset
95+typedef struct aidset {
96+ dset common;
97+ long (*read_ai)(aiRecord *prec);
98+ long (*special_linconv)(aiRecord *prec, int after);
99+} aidset;
100+#endif
101+aidset devAiSoft = {
102+ { 6, NULL, NULL, init_record, NULL },
103+ read_ai, NULL
104+};
105+epicsExportAddress(dset, devAiSoft);
106+```
107+
108+The above `typedef struct` declaration was copied directly from the new
109+aiRecord.h file and wrapped in the `#ifndef HAS_aidset` conditional.
110+
111+This same pattern should be followed for all record types except for the lsi,
112+lso and printf record types, which have published their device support entry
113+table structures since they were first added to Base but didn't previously embed
114+the `dset common` member. Device support for these record types therefore can't
115+use the dset name since the new definitions are different from the originals and
116+will cause a compile error, so this pattern should be used instead:
117+
118+```C
119+#ifndef HAS_lsidset
120+struct {
121+ dset common;
122+ long (*read_string)(lsiRecord *prec);
123+}
124+#else
125+lsidset
126+#endif
127+devLsiEtherIP = {
128+ {5, NULL, lsi_init, lsi_init_record, get_ioint_info},
129+ lsi_read
130+};
131+```
132+
133+>>>>>>> documentation/RELEASE_NOTES.md
134
135 ## EPICS Release 7.0.3.1
136
137diff --git a/modules/database/src/ioc/Makefile b/modules/database/src/ioc/Makefile
138index 70b1b55..c19b550 100644
139--- a/modules/database/src/ioc/Makefile
140+++ b/modules/database/src/ioc/Makefile
141@@ -11,9 +11,10 @@ TOP = ../../../..
142
143 include $(TOP)/configure/CONFIG
144
145-USR_CPPFLAGS += -DUSE_TYPED_RSET
146+USR_CPPFLAGS += -DUSE_TYPED_RSET -DUSE_TYPED_DSET
147
148-SHRLIB_VERSION = 3.17.0
149+# Shared library ABI version.
150+SHRLIB_VERSION = $(EPICS_DATABASE_MAJOR_VERSION).$(EPICS_DATABASE_MINOR_VERSION).$(EPICS_DATABASE_MAINTENANCE_VERSION)
151
152 LIBRARY_IOC += dbCore
153 dbCore_LIBS += ca Com
154diff --git a/modules/database/src/ioc/dbStatic/devSup.h b/modules/database/src/ioc/dbStatic/devSup.h
155index dc55a35..c54f476 100644
156--- a/modules/database/src/ioc/dbStatic/devSup.h
157+++ b/modules/database/src/ioc/dbStatic/devSup.h
158@@ -34,7 +34,7 @@ struct link; /* aka DBLINK */
159 *
160 * In Makefile:
161 @code
162- USR_CFLAGS += -DUSE_TYPED_RSET -DUSE_TYPED_DSET
163+ USR_CPPFLAGS += -DUSE_TYPED_RSET -DUSE_TYPED_DSET
164 @endcode
165 *
166 * In C source file:
167@@ -48,10 +48,7 @@ struct link; /* aka DBLINK */
168 static long get_iointr_info(int detach, dbCommon *prec, IOCSCANPVT* pscan);
169 static long longin_read(longinRecord *prec);
170
171- const struct {
172- dset common;
173- long (*read)(longinRecord *prec);
174- } devLiDevName = {
175+ longindset devLiDevName = {
176 {
177 5, // 4 from dset + 1 from longinRecord
178 NULL,
179diff --git a/modules/database/src/std/Makefile b/modules/database/src/std/Makefile
180index d8eb39b..d323bc0 100644
181--- a/modules/database/src/std/Makefile
182+++ b/modules/database/src/std/Makefile
183@@ -11,9 +11,10 @@ TOP = ../../../..
184
185 include $(TOP)/configure/CONFIG
186
187-USR_CPPFLAGS += -DUSE_TYPED_RSET
188+USR_CPPFLAGS += -DUSE_TYPED_RSET -DUSE_TYPED_DSET
189
190-SHRLIB_VERSION = 3.17.0
191+# Shared library ABI version.
192+SHRLIB_VERSION = $(EPICS_DATABASE_MAJOR_VERSION).$(EPICS_DATABASE_MINOR_VERSION).$(EPICS_DATABASE_MAINTENANCE_VERSION)
193
194 LIBRARY_IOC += dbRecStd
195 dbRecStd_LIBS = dbCore ca Com
196diff --git a/modules/database/src/std/dev/Makefile b/modules/database/src/std/dev/Makefile
197index ec3713b..1412f21 100644
198--- a/modules/database/src/std/dev/Makefile
199+++ b/modules/database/src/std/dev/Makefile
200@@ -47,7 +47,6 @@ dbRecStd_SRCS += devSASoft.c
201 dbRecStd_SRCS += devSiSoft.c
202 dbRecStd_SRCS += devSoSoft.c
203 dbRecStd_SRCS += devWfSoft.c
204-dbRecStd_SRCS += devGeneralTime.c
205
206 dbRecStd_SRCS += devAiSoftCallback.c
207 dbRecStd_SRCS += devBiSoftCallback.c
208@@ -68,6 +67,7 @@ dbRecStd_SRCS += devMbboDirectSoftCallback.c
209 dbRecStd_SRCS += devPrintfSoftCallback.c
210 dbRecStd_SRCS += devSoSoftCallback.c
211
212+dbRecStd_SRCS += devGeneralTime.c
213 dbRecStd_SRCS += devTimestamp.c
214 dbRecStd_SRCS += devStdio.c
215 dbRecStd_SRCS += devEnviron.c
216diff --git a/modules/database/src/std/dev/devAaiSoft.c b/modules/database/src/std/dev/devAaiSoft.c
217index cb4aa02..1f57656 100644
218--- a/modules/database/src/std/dev/devAaiSoft.c
219+++ b/modules/database/src/std/dev/devAaiSoft.c
220@@ -32,28 +32,18 @@
221 #include "epicsExport.h"
222
223 /* Create the dset for devAaiSoft */
224-static long init_record();
225-static long read_aai();
226-
227-struct {
228- long number;
229- DEVSUPFUN report;
230- DEVSUPFUN init;
231- DEVSUPFUN init_record;
232- DEVSUPFUN get_ioint_info;
233- DEVSUPFUN read_aai;
234-} devAaiSoft = {
235- 5,
236- NULL,
237- NULL,
238- init_record,
239- NULL,
240+static long init_record(dbCommon *pcommon);
241+static long read_aai(aaiRecord *prec);
242+
243+aaidset devAaiSoft = {
244+ {5, NULL, NULL, init_record, NULL},
245 read_aai
246 };
247-epicsExportAddress(dset,devAaiSoft);
248+epicsExportAddress(dset, devAaiSoft);
249
250-static long init_record(aaiRecord *prec)
251+static long init_record(dbCommon *pcommon)
252 {
253+ aaiRecord *prec = (aaiRecord *)pcommon;
254 DBLINK *plink = &prec->inp;
255
256 /* This is pass 0, link hasn't been initialized yet */
257diff --git a/modules/database/src/std/dev/devAaoSoft.c b/modules/database/src/std/dev/devAaoSoft.c
258index 3331ec1..98a84cd 100644
259--- a/modules/database/src/std/dev/devAaoSoft.c
260+++ b/modules/database/src/std/dev/devAaoSoft.c
261@@ -30,28 +30,19 @@
262 #include "epicsExport.h"
263
264 /* Create the dset for devAaoSoft */
265-static long init_record();
266-static long write_aao();
267+static long init_record(dbCommon *pcommon);
268+static long write_aao(aaoRecord *prec);
269
270-struct {
271- long number;
272- DEVSUPFUN report;
273- DEVSUPFUN init;
274- DEVSUPFUN init_record;
275- DEVSUPFUN get_ioint_info;
276- DEVSUPFUN read_aao;
277-} devAaoSoft = {
278- 5,
279- NULL,
280- NULL,
281- init_record,
282- NULL,
283+aaodset devAaoSoft = {
284+ {5, NULL, NULL, init_record, NULL},
285 write_aao
286 };
287-epicsExportAddress(dset,devAaoSoft);
288+epicsExportAddress(dset, devAaoSoft);
289
290-static long init_record(aaoRecord *prec)
291+static long init_record(dbCommon *pcommon)
292 {
293+ aaoRecord *prec = (aaoRecord *)pcommon;
294+
295 if (dbLinkIsConstant(&prec->out)) {
296 prec->nord = 0;
297 }
298diff --git a/modules/database/src/std/dev/devAiSoft.c b/modules/database/src/std/dev/devAiSoft.c
299index 0ecc1b1..136c7f5 100644
300--- a/modules/database/src/std/dev/devAiSoft.c
301+++ b/modules/database/src/std/dev/devAiSoft.c
302@@ -26,30 +26,19 @@
303 #include "epicsExport.h"
304
305 /* Create the dset for devAiSoft */
306-static long init_record(aiRecord *prec);
307+static long init_record(dbCommon *pcommon);
308 static long read_ai(aiRecord *prec);
309
310-struct {
311- long number;
312- DEVSUPFUN report;
313- DEVSUPFUN init;
314- DEVSUPFUN init_record;
315- DEVSUPFUN get_ioint_info;
316- DEVSUPFUN read_ai;
317- DEVSUPFUN special_linconv;
318-} devAiSoft = {
319- 6,
320- NULL,
321- NULL,
322- init_record,
323- NULL,
324- read_ai,
325- NULL
326+aidset devAiSoft = {
327+ {6, NULL, NULL, init_record, NULL},
328+ read_ai, NULL
329 };
330 epicsExportAddress(dset, devAiSoft);
331
332-static long init_record(aiRecord *prec)
333+static long init_record(dbCommon *pcommon)
334 {
335+ aiRecord *prec = (aiRecord *)pcommon;
336+
337 if (recGblInitConstantLink(&prec->inp, DBF_DOUBLE, &prec->val))
338 prec->udf = FALSE;
339
340diff --git a/modules/database/src/std/dev/devAiSoftCallback.c b/modules/database/src/std/dev/devAiSoftCallback.c
341index 8bf6385..4eca6b5 100644
342--- a/modules/database/src/std/dev/devAiSoftCallback.c
343+++ b/modules/database/src/std/dev/devAiSoftCallback.c
344@@ -153,8 +153,10 @@ static long init(int pass)
345 return 0;
346 }
347
348-static long init_record(aiRecord *prec)
349+static long init_record(dbCommon *pcommon)
350 {
351+ aiRecord *prec = (aiRecord *)pcommon;
352+
353 if (recGblInitConstantLink(&prec->inp, DBF_DOUBLE, &prec->val))
354 prec->udf = FALSE;
355
356@@ -213,14 +215,8 @@ static long read_ai(aiRecord *prec)
357 return 2;
358 }
359
360-/* Create the dset for devAiSoftCallback */
361-struct {
362- dset common;
363- DEVSUPFUN read_ai;
364- DEVSUPFUN special_linconv;
365-} devAiSoftCallback = {
366+aidset devAiSoftCallback = {
367 {6, NULL, init, init_record, NULL},
368- read_ai,
369- NULL
370+ read_ai, NULL
371 };
372 epicsExportAddress(dset, devAiSoftCallback);
373diff --git a/modules/database/src/std/dev/devAiSoftRaw.c b/modules/database/src/std/dev/devAiSoftRaw.c
374index f2cfd5d..39bf6b9 100644
375--- a/modules/database/src/std/dev/devAiSoftRaw.c
376+++ b/modules/database/src/std/dev/devAiSoftRaw.c
377@@ -25,30 +25,19 @@
378 #include "epicsExport.h"
379
380 /* Create the dset for devAiSoftRaw */
381-static long init_record(aiRecord *prec);
382+static long init_record(dbCommon *pcommon);
383 static long read_ai(aiRecord *prec);
384
385-struct {
386- long number;
387- DEVSUPFUN report;
388- DEVSUPFUN init;
389- DEVSUPFUN init_record;
390- DEVSUPFUN get_ioint_info;
391- DEVSUPFUN read_ai;
392- DEVSUPFUN special_linconv;
393-} devAiSoftRaw = {
394- 6,
395- NULL,
396- NULL,
397- init_record,
398- NULL,
399- read_ai,
400- NULL
401+aidset devAiSoftRaw = {
402+ {6, NULL, NULL, init_record, NULL},
403+ read_ai, NULL
404 };
405 epicsExportAddress(dset, devAiSoftRaw);
406
407-static long init_record(aiRecord *prec)
408+static long init_record(dbCommon *pcommon)
409 {
410+ aiRecord *prec = (aiRecord *)pcommon;
411+
412 recGblInitConstantLink(&prec->inp, DBF_LONG, &prec->rval);
413
414 return 0;
415diff --git a/modules/database/src/std/dev/devAoSoft.c b/modules/database/src/std/dev/devAoSoft.c
416index 56bd056..8772cde 100644
417--- a/modules/database/src/std/dev/devAoSoft.c
418+++ b/modules/database/src/std/dev/devAoSoft.c
419@@ -31,31 +31,17 @@
420 #include "aoRecord.h"
421 #include "epicsExport.h"
422
423-/* added for Channel Access Links */
424-static long init_record(aoRecord *prec);
425-
426 /* Create the dset for devAoSoft */
427+static long init_record(dbCommon *pcommon);
428 static long write_ao(aoRecord *prec);
429-struct {
430- long number;
431- DEVSUPFUN report;
432- DEVSUPFUN init;
433- DEVSUPFUN init_record;
434- DEVSUPFUN get_ioint_info;
435- DEVSUPFUN write_ao;
436- DEVSUPFUN special_linconv;
437-}devAoSoft={
438- 6,
439- NULL,
440- NULL,
441- init_record,
442- NULL,
443- write_ao,
444- NULL};
445-epicsExportAddress(dset,devAoSoft);
446-
447
448
449-static long init_record(aoRecord *prec)
450+aodset devAoSoft = {
451+ {6, NULL, NULL, init_record, NULL},
452+ write_ao, NULL
453+};
454+epicsExportAddress(dset, devAoSoft);
455+
456+static long init_record(dbCommon *pcommon)
457 {
458
459 long status=0;
460diff --git a/modules/database/src/std/dev/devAoSoftCallback.c b/modules/database/src/std/dev/devAoSoftCallback.c
461index c1fb72f..5144c77 100644
462--- a/modules/database/src/std/dev/devAoSoftCallback.c
463+++ b/modules/database/src/std/dev/devAoSoftCallback.c
464@@ -31,23 +31,12 @@
465
466 /* Create the dset for devAoSoftCallback */
467 static long write_ao(aoRecord *prec);
468-struct {
469- long number;
470- DEVSUPFUN report;
471- DEVSUPFUN init;
472- DEVSUPFUN init_record;
473- DEVSUPFUN get_ioint_info;
474- DEVSUPFUN write_ao;
475- DEVSUPFUN special_linconv;
476-}devAoSoftCallback={
477- 6,
478- NULL,
479- NULL,
480- NULL,
481- NULL,
482- write_ao,
483- NULL};
484-epicsExportAddress(dset,devAoSoftCallback);
485+
486+aodset devAoSoftCallback = {
487+ {6, NULL, NULL, NULL, NULL},
488+ write_ao, NULL
489+};
490+epicsExportAddress(dset, devAoSoftCallback);
491
492 static long write_ao(aoRecord *prec)
493 {
494diff --git a/modules/database/src/std/dev/devAoSoftRaw.c b/modules/database/src/std/dev/devAoSoftRaw.c
495index 05aed03..bb2ae7d 100644
496--- a/modules/database/src/std/dev/devAoSoftRaw.c
497+++ b/modules/database/src/std/dev/devAoSoftRaw.c
498@@ -33,25 +33,13 @@
499
500 /* Create the dset for devAoSoftRaw */
501 static long write_ao(aoRecord *prec);
502-struct {
503- long number;
504- DEVSUPFUN report;
505- DEVSUPFUN init;
506- DEVSUPFUN init_record;
507- DEVSUPFUN get_ioint_info;
508- DEVSUPFUN write_ao;
509- DEVSUPFUN special_linconv;
510-}devAoSoftRaw={
511- 6,
512- NULL,
513- NULL,
514- NULL,
515- NULL,
516- write_ao,
517- NULL
518+
519+aodset devAoSoftRaw = {
520+ {6, NULL, NULL, NULL, NULL},
521+ write_ao, NULL
522 };
523-epicsExportAddress(dset,devAoSoftRaw);
524-
525
526+epicsExportAddress(dset, devAoSoftRaw);
527+
528 static long write_ao(aoRecord *prec)
529 {
530 long status;
531diff --git a/modules/database/src/std/dev/devBiDbState.c b/modules/database/src/std/dev/devBiDbState.c
532index fcb6c8f..373270a 100644
533--- a/modules/database/src/std/dev/devBiDbState.c
534+++ b/modules/database/src/std/dev/devBiDbState.c
535@@ -69,20 +69,9 @@ static long read_bi(biRecord *prec)
536 return 2;
537 }
538
539-static struct {
540- long number;
541- DEVSUPFUN report;
542- DEVSUPFUN init;
543- DEVSUPFUN init_record;
544- DEVSUPFUN get_ioint_info;
545- DEVSUPFUN read_bi;
546-} devBiDbState = {
547- 5,
548- NULL,
549- init,
550- NULL,
551- NULL,
552- read_bi
553+/* Create the dset for devBiDbState */
554+bidset devBiDbState = {
555+ {5, NULL, init, NULL, NULL},
556+ read_bi
557 };
558-
559 epicsExportAddress(dset, devBiDbState);
560diff --git a/modules/database/src/std/dev/devBiSoft.c b/modules/database/src/std/dev/devBiSoft.c
561index 12640ad..41a308a 100644
562--- a/modules/database/src/std/dev/devBiSoft.c
563+++ b/modules/database/src/std/dev/devBiSoft.c
564@@ -25,28 +25,19 @@
565 #include "epicsExport.h"
566
567 /* Create the dset for devBiSoft */
568-static long init_record(biRecord *prec);
569+static long init_record(dbCommon *pcommon);
570 static long read_bi(biRecord *prec);
571
572-struct {
573- long number;
574- DEVSUPFUN report;
575- DEVSUPFUN init;
576- DEVSUPFUN init_record;
577- DEVSUPFUN get_ioint_info;
578- DEVSUPFUN read_bi;
579-} devBiSoft = {
580- 5,
581- NULL,
582- NULL,
583- init_record,
584- NULL,
585+bidset devBiSoft = {
586+ {5, NULL, NULL, init_record, NULL},
587 read_bi
588 };
589 epicsExportAddress(dset, devBiSoft);
590
591-static long init_record(biRecord *prec)
592+static long init_record(dbCommon *pcommon)
593 {
594+ biRecord *prec = (biRecord *)pcommon;
595+
596 if (recGblInitConstantLink(&prec->inp, DBF_ENUM, &prec->val))
597 prec->udf = FALSE;
598 return 0;
599diff --git a/modules/database/src/std/dev/devBiSoftCallback.c b/modules/database/src/std/dev/devBiSoftCallback.c
600index 607b1af..0610071 100644
601--- a/modules/database/src/std/dev/devBiSoftCallback.c
602+++ b/modules/database/src/std/dev/devBiSoftCallback.c
603@@ -151,8 +151,10 @@ static long init(int pass)
604 return 0;
605 }
606
607-static long init_record(biRecord *prec)
608+static long init_record(dbCommon *pcommon)
609 {
610+ biRecord *prec = (biRecord *)pcommon;
611+
612 if (recGblInitConstantLink(&prec->inp, DBR_ENUM, &prec->val))
613 prec->udf = FALSE;
614
615@@ -204,10 +206,7 @@ static long read_bi(biRecord *prec)
616 }
617
618 /* Create the dset for devBiSoftCallback */
619-struct {
620- dset common;
621- DEVSUPFUN read_bi;
622-} devBiSoftCallback = {
623+bidset devBiSoftCallback = {
624 {5, NULL, init, init_record, NULL},
625 read_bi
626 };
627diff --git a/modules/database/src/std/dev/devBiSoftRaw.c b/modules/database/src/std/dev/devBiSoftRaw.c
628index a71bf89..90fbcbb 100644
629--- a/modules/database/src/std/dev/devBiSoftRaw.c
630+++ b/modules/database/src/std/dev/devBiSoftRaw.c
631@@ -25,28 +25,19 @@
632 #include "epicsExport.h"
633
634 /* Create the dset for devBiSoftRaw */
635-static long init_record(biRecord *prec);
636+static long init_record(dbCommon *pcommon);
637 static long read_bi(biRecord *prec);
638
639-struct {
640- long number;
641- DEVSUPFUN report;
642- DEVSUPFUN init;
643- DEVSUPFUN init_record;
644- DEVSUPFUN get_ioint_info;
645- DEVSUPFUN read_bi;
646-} devBiSoftRaw = {
647- 5,
648- NULL,
649- NULL,
650- init_record,
651- NULL,
652+bidset devBiSoftRaw = {
653+ {5, NULL, NULL, init_record, NULL},
654 read_bi
655 };
656 epicsExportAddress(dset, devBiSoftRaw);
657
658-static long init_record(biRecord *prec)
659+static long init_record(dbCommon *pcommon)
660 {
661+ biRecord *prec = (biRecord *)pcommon;
662+
663 recGblInitConstantLink(&prec->inp, DBF_ULONG, &prec->rval);
664
665 return 0;
666diff --git a/modules/database/src/std/dev/devBoDbState.c b/modules/database/src/std/dev/devBoDbState.c
667index 26e97ae..f9a7606 100644
668--- a/modules/database/src/std/dev/devBoDbState.c
669+++ b/modules/database/src/std/dev/devBoDbState.c
670@@ -67,20 +67,9 @@ static long write_bo(boRecord *prec)
671 return 0;
672 }
673
674-static struct {
675- long number;
676- DEVSUPFUN report;
677- DEVSUPFUN init;
678- DEVSUPFUN init_record;
679- DEVSUPFUN get_ioint_info;
680- DEVSUPFUN write_bo;
681-} devBoDbState = {
682- 5,
683- NULL,
684- init,
685- NULL,
686- NULL,
687- write_bo
688+/* Create the dset for devBoDbState */
689+bodset devBoDbState = {
690+ {5, NULL, init, NULL, NULL},
691+ write_bo
692 };
693-
694 epicsExportAddress(dset, devBoDbState);
695diff --git a/modules/database/src/std/dev/devBoSoft.c b/modules/database/src/std/dev/devBoSoft.c
696index ba6ff14..b864542 100644
697--- a/modules/database/src/std/dev/devBoSoft.c
698+++ b/modules/database/src/std/dev/devBoSoft.c
699@@ -29,31 +29,18 @@
700 #include "boRecord.h"
701 #include "epicsExport.h"
702
703-static long init_record(boRecord *prec);
704-
705 /* Create the dset for devBoSoft */
706+static long init_record(dbCommon *pcommon);
707 static long write_bo(boRecord *prec);
708
709-struct {
710- long number;
711- DEVSUPFUN report;
712- DEVSUPFUN init;
713- DEVSUPFUN init_record;
714- DEVSUPFUN get_ioint_info;
715- DEVSUPFUN write_bo;
716-}devBoSoft={
717- 5,
718- NULL,
719- NULL,
720- init_record,
721- NULL,
722- write_bo
723+bodset devBoSoft = {
724+ {5, NULL, NULL, init_record, NULL},
725+ write_bo
726 };
727-epicsExportAddress(dset,devBoSoft);
728-
729
730-static long init_record(boRecord *prec)
731+epicsExportAddress(dset, devBoSoft);
732+
733+static long init_record(dbCommon *pcommon)
734 {
735-
736 long status=0;
737
738 /* dont convert */
739diff --git a/modules/database/src/std/dev/devBoSoftCallback.c b/modules/database/src/std/dev/devBoSoftCallback.c
740index ffb68e5..9373558 100644
741--- a/modules/database/src/std/dev/devBoSoftCallback.c
742+++ b/modules/database/src/std/dev/devBoSoftCallback.c
743@@ -31,22 +31,11 @@
744 /* Create the dset for devBoCallbackSoft */
745 static long write_bo(boRecord *prec);
746
747-struct {
748- long number;
749- DEVSUPFUN report;
750- DEVSUPFUN init;
751- DEVSUPFUN init_record;
752- DEVSUPFUN get_ioint_info;
753- DEVSUPFUN write_bo;
754-}devBoSoftCallback={
755- 5,
756- NULL,
757- NULL,
758- NULL,
759- NULL,
760- write_bo
761+bodset devBoSoftCallback = {
762+ {5, NULL, NULL, NULL, NULL},
763+ write_bo
764 };
765-epicsExportAddress(dset,devBoSoftCallback);
766+epicsExportAddress(dset, devBoSoftCallback);
767
768 static long write_bo(boRecord *prec)
769 {
770@@ -64,4 +53,3 @@ static long write_bo(boRecord *prec)
771
772 return status;
773 }
774-
775diff --git a/modules/database/src/std/dev/devBoSoftRaw.c b/modules/database/src/std/dev/devBoSoftRaw.c
776index df1ba5b..b0bd854 100644
777--- a/modules/database/src/std/dev/devBoSoftRaw.c
778+++ b/modules/database/src/std/dev/devBoSoftRaw.c
779@@ -28,30 +28,17 @@
780 #include "boRecord.h"
781 #include "epicsExport.h"
782
783-/* added for Channel Access Links */
784-static long init_record(boRecord *prec);
785-
786 /* Create the dset for devBoSoftRaw */
787+static long init_record(dbCommon *pcommon);
788 static long write_bo(boRecord *prec);
789
790-struct {
791- long number;
792- DEVSUPFUN report;
793- DEVSUPFUN init;
794- DEVSUPFUN init_record;
795- DEVSUPFUN get_ioint_info;
796- DEVSUPFUN write_bo;
797-}devBoSoftRaw={
798- 5,
799- NULL,
800- NULL,
801- init_record,
802- NULL,
803- write_bo
804+bodset devBoSoftRaw = {
805+ {5, NULL, NULL, init_record, NULL},
806+ write_bo
807 };
808-epicsExportAddress(dset,devBoSoftRaw);
809-
810
811-static long init_record(boRecord *prec)
812+epicsExportAddress(dset, devBoSoftRaw);
813+
814+static long init_record(dbCommon *pcommon)
815 {
816 long status;
817
818diff --git a/modules/database/src/std/dev/devCalcoutSoft.c b/modules/database/src/std/dev/devCalcoutSoft.c
819index f931e6a..52ee11b 100644
820--- a/modules/database/src/std/dev/devCalcoutSoft.c
821+++ b/modules/database/src/std/dev/devCalcoutSoft.c
822@@ -31,15 +31,9 @@
823
824 static long write_calcout(calcoutRecord *prec);
825
826-struct {
827- long number;
828- DEVSUPFUN report;
829- DEVSUPFUN init;
830- DEVSUPFUN init_record;
831- DEVSUPFUN get_ioint_info;
832- DEVSUPFUN write;
833-} devCalcoutSoft = {
834- 5, NULL, NULL, NULL, NULL, write_calcout
835+calcoutdset devCalcoutSoft = {
836+ {5, NULL, NULL, NULL, NULL},
837+ write_calcout
838 };
839 epicsExportAddress(dset, devCalcoutSoft);
840
841diff --git a/modules/database/src/std/dev/devCalcoutSoftCallback.c b/modules/database/src/std/dev/devCalcoutSoftCallback.c
842index 94f9d4f..3d357b8 100644
843--- a/modules/database/src/std/dev/devCalcoutSoftCallback.c
844+++ b/modules/database/src/std/dev/devCalcoutSoftCallback.c
845@@ -31,15 +31,9 @@
846
847 static long write_calcout(calcoutRecord *prec);
848
849-struct {
850- long number;
851- DEVSUPFUN report;
852- DEVSUPFUN init;
853- DEVSUPFUN init_record;
854- DEVSUPFUN get_ioint_info;
855- DEVSUPFUN write;
856-} devCalcoutSoftCallback = {
857- 5, NULL, NULL, NULL, NULL, write_calcout
858+calcoutdset devCalcoutSoftCallback = {
859+ {5, NULL, NULL, NULL, NULL},
860+ write_calcout
861 };
862 epicsExportAddress(dset, devCalcoutSoftCallback);
863
864diff --git a/modules/database/src/std/dev/devEnviron.c b/modules/database/src/std/dev/devEnviron.c
865index 9672d6c..8e4bd79 100644
866--- a/modules/database/src/std/dev/devEnviron.c
867+++ b/modules/database/src/std/dev/devEnviron.c
868@@ -69,7 +69,7 @@ static long read_lsi(lsiRecord *prec)
869 }
870
871 lsidset devLsiEnviron = {
872- 5, NULL, init_lsi, NULL, NULL, read_lsi
873+ {5, NULL, init_lsi, NULL, NULL }, read_lsi
874 };
875 epicsExportAddress(dset, devLsiEnviron);
876
877@@ -119,10 +119,8 @@ static long read_stringin(stringinRecord *prec)
878 return 0;
879 }
880
881-static struct {
882- dset common;
883- DEVSUPFUN read;
884-} devSiEnviron = {
885- {5, NULL, init_stringin, NULL, NULL}, read_stringin
886+stringindset devSiEnviron = {
887+ {5, NULL, init_stringin, NULL, NULL},
888+ read_stringin
889 };
890 epicsExportAddress(dset, devSiEnviron);
891diff --git a/modules/database/src/std/dev/devEventSoft.c b/modules/database/src/std/dev/devEventSoft.c
892index a748dda..4020c91 100644
893--- a/modules/database/src/std/dev/devEventSoft.c
894+++ b/modules/database/src/std/dev/devEventSoft.c
895@@ -25,28 +25,19 @@
896 #include "epicsExport.h"
897
898 /* Create the dset for devEventSoft */
899-static long init_record(eventRecord *prec);
900+static long init_record(dbCommon *pcommon);
901 static long read_event(eventRecord *prec);
902
903-struct {
904- long number;
905- DEVSUPFUN report;
906- DEVSUPFUN init;
907- DEVSUPFUN init_record;
908- DEVSUPFUN get_ioint_info;
909- DEVSUPFUN read_event;
910-} devEventSoft = {
911- 5,
912- NULL,
913- NULL,
914- init_record,
915- NULL,
916+eventdset devEventSoft = {
917+ {5, NULL, NULL, init_record, NULL},
918 read_event
919 };
920 epicsExportAddress(dset, devEventSoft);
921
922-static long init_record(eventRecord *prec)
923+static long init_record(dbCommon *pcommon)
924 {
925+ eventRecord *prec = (eventRecord *)pcommon;
926+
927 if (recGblInitConstantLink(&prec->inp, DBF_STRING, prec->val))
928 prec->udf = FALSE;
929
930diff --git a/modules/database/src/std/dev/devGeneralTime.c b/modules/database/src/std/dev/devGeneralTime.c
931index 1b821d5..f032751 100644
932--- a/modules/database/src/std/dev/devGeneralTime.c
933+++ b/modules/database/src/std/dev/devGeneralTime.c
934@@ -50,8 +50,9 @@ static struct ai_channel {
935 {"TIME", getCurrentTime},
936 };
937
938-static long init_ai(aiRecord *prec)
939+static long init_ai(dbCommon *pcommon)
940 {
941+ aiRecord *prec = (aiRecord *)pcommon;
942 int i;
943
944 if (prec->inp.type != INST_IO) {
945@@ -91,12 +92,9 @@ static long read_ai(aiRecord *prec)
946 return -1;
947 }
948
949-struct {
950- dset common;
951- DEVSUPFUN read_write;
952- DEVSUPFUN special_linconv;
953-} devAiGeneralTime = {
954- {6, NULL, NULL, init_ai, NULL}, read_ai, NULL
955+aidset devAiGeneralTime = {
956+ {6, NULL, NULL, init_ai, NULL},
957+ read_ai, NULL
958 };
959 epicsExportAddress(dset, devAiGeneralTime);
960
961@@ -114,8 +112,9 @@ static struct bo_channel {
962 {"RSTERRCNT", resetErrors},
963 };
964
965-static long init_bo(boRecord *prec)
966+static long init_bo(dbCommon *pcommon)
967 {
968+ boRecord *prec = (boRecord *)pcommon;
969 int i;
970
971 if (prec->out.type != INST_IO) {
972@@ -151,15 +150,14 @@ static long write_bo(boRecord *prec)
973 return 0;
974 }
975
976-struct {
977- dset common;
978- DEVSUPFUN read_write;
979-} devBoGeneralTime = {
980- {5, NULL, NULL, init_bo, NULL}, write_bo
981+bodset devBoGeneralTime = {
982+ {5, NULL, NULL, init_bo, NULL},
983+ write_bo
984 };
985 epicsExportAddress(dset, devBoGeneralTime);
986
987
988+
989 /******* longin record *************/
990 static int errorCount(void)
991 {
992@@ -173,8 +171,9 @@ static struct li_channel {
993 {"GETERRCNT", errorCount},
994 };
995
996-static long init_li(longinRecord *prec)
997+static long init_li(dbCommon *pcommon)
998 {
999+ longinRecord *prec = (longinRecord *)pcommon;
1000 int i;
1001
1002 if (prec->inp.type != INST_IO) {
1003@@ -209,11 +208,9 @@ static long read_li(longinRecord *prec)
1004 return 0;
1005 }
1006
1007-struct {
1008- dset common;
1009- DEVSUPFUN read_write;
1010-} devLiGeneralTime = {
1011- {5, NULL, NULL, init_li, NULL}, read_li
1012+longindset devLiGeneralTime = {
1013+ {5, NULL, NULL, init_li, NULL},
1014+ read_li
1015 };
1016 epicsExportAddress(dset, devLiGeneralTime);
1017
1018@@ -243,8 +240,9 @@ static struct si_channel {
1019 {"BESTTEP", eventProvider},
1020 };
1021
1022-static long init_si(stringinRecord *prec)
1023+static long init_si(dbCommon *pcommon)
1024 {
1025+ stringinRecord *prec = (stringinRecord *)pcommon;
1026 int i;
1027
1028 if (prec->inp.type != INST_IO) {
1029@@ -288,10 +286,8 @@ static long read_si(stringinRecord *prec)
1030 return 0;
1031 }
1032
1033-struct {
1034- dset common;
1035- DEVSUPFUN read_write;
1036-} devSiGeneralTime = {
1037- {5, NULL, NULL, init_si, NULL}, read_si
1038+stringindset devSiGeneralTime = {
1039+ {5, NULL, NULL, init_si, NULL},
1040+ read_si
1041 };
1042 epicsExportAddress(dset, devSiGeneralTime);
1043diff --git a/modules/database/src/std/dev/devHistogramSoft.c b/modules/database/src/std/dev/devHistogramSoft.c
1044index 3b46b5d..a410fef 100644
1045--- a/modules/database/src/std/dev/devHistogramSoft.c
1046+++ b/modules/database/src/std/dev/devHistogramSoft.c
1047@@ -28,29 +28,19 @@
1048 #include "epicsExport.h"
1049
1050 /* Create the dset for devHistogramSoft */
1051-static long init_record(histogramRecord *prec);
1052+static long init_record(dbCommon *pcommon);
1053 static long read_histogram(histogramRecord *prec);
1054-struct {
1055- long number;
1056- DEVSUPFUN report;
1057- DEVSUPFUN init;
1058- DEVSUPFUN init_record;
1059- DEVSUPFUN get_ioint_info;
1060- DEVSUPFUN read_histogram;
1061- DEVSUPFUN special_linconv;
1062-}devHistogramSoft={
1063- 6,
1064- NULL,
1065- NULL,
1066- init_record,
1067- NULL,
1068- read_histogram,
1069- NULL
1070+
1071+histogramdset devHistogramSoft = {
1072+ {6, NULL, NULL, init_record, NULL},
1073+ read_histogram, NULL
1074 };
1075-epicsExportAddress(dset,devHistogramSoft);
1076-
1077
1078-static long init_record(histogramRecord *prec)
1079+epicsExportAddress(dset, devHistogramSoft);
1080+
1081+static long init_record(dbCommon *pcommon)
1082 {
1083+ histogramRecord *prec = (histogramRecord *)pcommon;
1084+
1085 if (recGblInitConstantLink(&prec->svl,DBF_DOUBLE,&prec->sgnl))
1086 prec->udf = FALSE;
1087
1088diff --git a/modules/database/src/std/dev/devI64inSoft.c b/modules/database/src/std/dev/devI64inSoft.c
1089index 8d4ad90..76a049b 100644
1090--- a/modules/database/src/std/dev/devI64inSoft.c
1091+++ b/modules/database/src/std/dev/devI64inSoft.c
1092@@ -24,29 +24,9 @@
1093 #include "int64inRecord.h"
1094 #include "epicsExport.h"
1095
1096-/* Create the dset for devI64inSoft */
1097-static long init_record(int64inRecord *prec);
1098-static long read_int64in(int64inRecord *prec);
1099-
1100-struct {
1101- long number;
1102- DEVSUPFUN report;
1103- DEVSUPFUN init;
1104- DEVSUPFUN init_record;
1105- DEVSUPFUN get_ioint_info;
1106- DEVSUPFUN read_int64in;
1107-} devI64inSoft = {
1108- 5,
1109- NULL,
1110- NULL,
1111- init_record,
1112- NULL,
1113- read_int64in
1114-};
1115-epicsExportAddress(dset, devI64inSoft);
1116-
1117-static long init_record(int64inRecord *prec)
1118+static long init_record(dbCommon *common)
1119 {
1120+ int64inRecord *prec = (int64inRecord *)common;
1121 if (recGblInitConstantLink(&prec->inp, DBF_INT64, &prec->val))
1122 prec->udf = FALSE;
1123
1124@@ -76,3 +56,11 @@ static long read_int64in(int64inRecord *prec)
1125
1126 return status;
1127 }
1128+
1129+/* Create the dset for devI64inSoft */
1130+
1131+int64indset devI64inSoft = {
1132+ { 5, NULL, NULL, init_record, NULL }, read_int64in
1133+};
1134+epicsExportAddress(dset, devI64inSoft);
1135+
1136diff --git a/modules/database/src/std/dev/devI64inSoftCallback.c b/modules/database/src/std/dev/devI64inSoftCallback.c
1137index 9eb5656..d93f8c9 100644
1138--- a/modules/database/src/std/dev/devI64inSoftCallback.c
1139+++ b/modules/database/src/std/dev/devI64inSoftCallback.c
1140@@ -151,8 +151,9 @@ static long init(int pass)
1141 return 0;
1142 }
1143
1144-static long init_record(int64inRecord *prec)
1145+static long init_record(dbCommon *common)
1146 {
1147+ int64inRecord *prec = (int64inRecord *)common;
1148 if (recGblInitConstantLink(&prec->inp, DBR_INT64, &prec->val))
1149 prec->udf = FALSE;
1150
1151@@ -204,11 +205,7 @@ static long read_int64in(int64inRecord *prec)
1152 }
1153
1154 /* Create the dset for devI64inSoftCallback */
1155-struct {
1156- dset common;
1157- DEVSUPFUN read_int64in;
1158-} devI64inSoftCallback = {
1159- {5, NULL, init, init_record, NULL},
1160- read_int64in
1161+int64indset devI64inSoftCallback = {
1162+ { 5, NULL, init, init_record, NULL }, read_int64in
1163 };
1164 epicsExportAddress(dset, devI64inSoftCallback);
1165diff --git a/modules/database/src/std/dev/devI64outSoft.c b/modules/database/src/std/dev/devI64outSoft.c
1166index f9ac70a..f94b908 100644
1167--- a/modules/database/src/std/dev/devI64outSoft.c
1168+++ b/modules/database/src/std/dev/devI64outSoft.c
1169@@ -25,27 +25,7 @@
1170 #include "int64outRecord.h"
1171 #include "epicsExport.h"
1172
1173-/* Create the dset for devI64outSoft */
1174-static long init_record(int64outRecord *prec);
1175-static long write_int64out(int64outRecord *prec);
1176-struct {
1177- long number;
1178- DEVSUPFUN report;
1179- DEVSUPFUN init;
1180- DEVSUPFUN init_record;
1181- DEVSUPFUN get_ioint_info;
1182- DEVSUPFUN write_int64out;
1183-} devI64outSoft = {
1184- 5,
1185- NULL,
1186- NULL,
1187- init_record,
1188- NULL,
1189- write_int64out
1190-};
1191-epicsExportAddress(dset, devI64outSoft);
1192-
1193-static long init_record(int64outRecord *prec)
1194+static long init_record(dbCommon *common)
1195 {
1196 return 0;
1197 }
1198@@ -55,3 +35,10 @@ static long write_int64out(int64outRecord *prec)
1199 dbPutLink(&prec->out, DBR_INT64, &prec->val,1);
1200 return 0;
1201 }
1202+
1203+/* Create the dset for devI64outSoft */
1204+int64outdset devI64outSoft = {
1205+ { 5, NULL, NULL, init_record, NULL }, write_int64out
1206+};
1207+epicsExportAddress(dset, devI64outSoft);
1208+
1209diff --git a/modules/database/src/std/dev/devI64outSoftCallback.c b/modules/database/src/std/dev/devI64outSoftCallback.c
1210index e8041a2..3ad717d 100644
1211--- a/modules/database/src/std/dev/devI64outSoftCallback.c
1212+++ b/modules/database/src/std/dev/devI64outSoftCallback.c
1213@@ -25,25 +25,6 @@
1214 #include "int64outRecord.h"
1215 #include "epicsExport.h"
1216
1217-/* Create the dset for devI64outSoftCallback */
1218-static long write_int64out(int64outRecord *prec);
1219-struct {
1220- long number;
1221- DEVSUPFUN report;
1222- DEVSUPFUN init;
1223- DEVSUPFUN init_record;
1224- DEVSUPFUN get_ioint_info;
1225- DEVSUPFUN write_int64out;
1226-} devI64outSoftCallback = {
1227- 5,
1228- NULL,
1229- NULL,
1230- NULL,
1231- NULL,
1232- write_int64out
1233-};
1234-epicsExportAddress(dset, devI64outSoftCallback);
1235-
1236 static long write_int64out(int64outRecord *prec)
1237 {
1238 struct link *plink = &prec->out;
1239@@ -60,3 +41,9 @@ static long write_int64out(int64outRecord *prec)
1240
1241 return status;
1242 }
1243+
1244+/* Create the dset for devI64outSoftCallback */
1245+int64outdset devI64outSoftCallback = {
1246+ { 5, NULL, NULL, NULL, NULL }, write_int64out
1247+};
1248+epicsExportAddress(dset, devI64outSoftCallback);
1249diff --git a/modules/database/src/std/dev/devLiSoft.c b/modules/database/src/std/dev/devLiSoft.c
1250index 6d7b7fd..4c9912b 100644
1251--- a/modules/database/src/std/dev/devLiSoft.c
1252+++ b/modules/database/src/std/dev/devLiSoft.c
1253@@ -25,28 +25,19 @@
1254 #include "epicsExport.h"
1255
1256 /* Create the dset for devLiSoft */
1257-static long init_record(longinRecord *prec);
1258+static long init_record(dbCommon *pcommon);
1259 static long read_longin(longinRecord *prec);
1260
1261-struct {
1262- long number;
1263- DEVSUPFUN report;
1264- DEVSUPFUN init;
1265- DEVSUPFUN init_record;
1266- DEVSUPFUN get_ioint_info;
1267- DEVSUPFUN read_longin;
1268-} devLiSoft = {
1269- 5,
1270- NULL,
1271- NULL,
1272- init_record,
1273- NULL,
1274+longindset devLiSoft = {
1275+ {5, NULL, NULL, init_record, NULL},
1276 read_longin
1277 };
1278 epicsExportAddress(dset, devLiSoft);
1279
1280-static long init_record(longinRecord *prec)
1281+static long init_record(dbCommon *pcommon)
1282 {
1283+ longinRecord *prec = (longinRecord *)pcommon;
1284+
1285 if (recGblInitConstantLink(&prec->inp, DBF_LONG, &prec->val))
1286 prec->udf = FALSE;
1287
1288diff --git a/modules/database/src/std/dev/devLiSoftCallback.c b/modules/database/src/std/dev/devLiSoftCallback.c
1289index d833939..b7f7cee 100644
1290--- a/modules/database/src/std/dev/devLiSoftCallback.c
1291+++ b/modules/database/src/std/dev/devLiSoftCallback.c
1292@@ -151,8 +151,10 @@ static long init(int pass)
1293 return 0;
1294 }
1295
1296-static long init_record(longinRecord *prec)
1297+static long init_record(dbCommon *pcommon)
1298 {
1299+ longinRecord *prec = (longinRecord *)pcommon;
1300+
1301 if (recGblInitConstantLink(&prec->inp, DBR_LONG, &prec->val))
1302 prec->udf = FALSE;
1303
1304@@ -204,10 +206,7 @@ static long read_li(longinRecord *prec)
1305 }
1306
1307 /* Create the dset for devLiSoftCallback */
1308-struct {
1309- dset common;
1310- DEVSUPFUN read_li;
1311-} devLiSoftCallback = {
1312+longindset devLiSoftCallback = {
1313 {5, NULL, init, init_record, NULL},
1314 read_li
1315 };
1316diff --git a/modules/database/src/std/dev/devLoSoft.c b/modules/database/src/std/dev/devLoSoft.c
1317index af49c60..c9b8fe3 100644
1318--- a/modules/database/src/std/dev/devLoSoft.c
1319+++ b/modules/database/src/std/dev/devLoSoft.c
1320@@ -26,26 +26,16 @@
1321 #include "epicsExport.h"
1322
1323 /* Create the dset for devLoSoft */
1324-static long init_record(longoutRecord *prec);
1325+static long init_record(dbCommon *pcommon);
1326 static long write_longout(longoutRecord *prec);
1327-struct {
1328- long number;
1329- DEVSUPFUN report;
1330- DEVSUPFUN init;
1331- DEVSUPFUN init_record;
1332- DEVSUPFUN get_ioint_info;
1333- DEVSUPFUN write_longout;
1334-}devLoSoft={
1335- 5,
1336- NULL,
1337- NULL,
1338- init_record,
1339- NULL,
1340- write_longout
1341+
1342+longoutdset devLoSoft = {
1343+ {5, NULL, NULL, init_record, NULL},
1344+ write_longout
1345 };
1346-epicsExportAddress(dset,devLoSoft);
1347-
1348
1349-static long init_record(longoutRecord *prec)
1350+epicsExportAddress(dset, devLoSoft);
1351+
1352+static long init_record(dbCommon *pcommon)
1353 {
1354 return 0;
1355 } /* end init_record() */
1356diff --git a/modules/database/src/std/dev/devLoSoftCallback.c b/modules/database/src/std/dev/devLoSoftCallback.c
1357index f211957..3883e19 100644
1358--- a/modules/database/src/std/dev/devLoSoftCallback.c
1359+++ b/modules/database/src/std/dev/devLoSoftCallback.c
1360@@ -29,22 +29,12 @@
1361
1362 /* Create the dset for devLoSoftCallback */
1363 static long write_longout(longoutRecord *prec);
1364-struct {
1365- long number;
1366- DEVSUPFUN report;
1367- DEVSUPFUN init;
1368- DEVSUPFUN init_record;
1369- DEVSUPFUN get_ioint_info;
1370- DEVSUPFUN write_longout;
1371-}devLoSoftCallback={
1372- 5,
1373- NULL,
1374- NULL,
1375- NULL,
1376- NULL,
1377- write_longout
1378+
1379+longoutdset devLoSoftCallback = {
1380+ {5, NULL, NULL, NULL, NULL},
1381+ write_longout
1382 };
1383-epicsExportAddress(dset,devLoSoftCallback);
1384+epicsExportAddress(dset, devLoSoftCallback);
1385
1386 static long write_longout(longoutRecord *prec)
1387 {
1388@@ -62,4 +52,3 @@ static long write_longout(longoutRecord *prec)
1389
1390 return status;
1391 }
1392-
1393diff --git a/modules/database/src/std/dev/devLsiSoft.c b/modules/database/src/std/dev/devLsiSoft.c
1394index 3076c99..d7c5021 100644
1395--- a/modules/database/src/std/dev/devLsiSoft.c
1396+++ b/modules/database/src/std/dev/devLsiSoft.c
1397@@ -17,8 +17,9 @@
1398 #include "lsiRecord.h"
1399 #include "epicsExport.h"
1400
1401-static long init_record(lsiRecord *prec)
1402+static long init_record(dbCommon *common)
1403 {
1404+ lsiRecord *prec = (lsiRecord *)common;
1405 dbLoadLinkLS(&prec->inp, prec->val, prec->sizv, &prec->len);
1406
1407 return 0;
1408@@ -49,6 +50,6 @@ static long read_string(lsiRecord *prec)
1409 }
1410
1411 lsidset devLsiSoft = {
1412- 5, NULL, NULL, init_record, NULL, read_string
1413+ { 5, NULL, NULL, init_record, NULL }, read_string
1414 };
1415 epicsExportAddress(dset, devLsiSoft);
1416diff --git a/modules/database/src/std/dev/devLsoSoft.c b/modules/database/src/std/dev/devLsoSoft.c
1417index 02079a0..2f6f6ab 100644
1418--- a/modules/database/src/std/dev/devLsoSoft.c
1419+++ b/modules/database/src/std/dev/devLsoSoft.c
1420@@ -21,6 +21,6 @@ static long write_string(lsoRecord *prec)
1421 }
1422
1423 lsodset devLsoSoft = {
1424- 5, NULL, NULL, NULL, NULL, write_string
1425+ { 5, NULL, NULL, NULL, NULL }, write_string
1426 };
1427 epicsExportAddress(dset, devLsoSoft);
1428diff --git a/modules/database/src/std/dev/devLsoSoftCallback.c b/modules/database/src/std/dev/devLsoSoftCallback.c
1429index 59579d5..08fca77 100644
1430--- a/modules/database/src/std/dev/devLsoSoftCallback.c
1431+++ b/modules/database/src/std/dev/devLsoSoftCallback.c
1432@@ -40,7 +40,7 @@ static long write_string(lsoRecord *prec)
1433 }
1434
1435 lsodset devLsoSoftCallback = {
1436- 5, NULL, NULL, NULL, NULL, write_string
1437+ { 5, NULL, NULL, NULL, NULL }, write_string
1438 };
1439 epicsExportAddress(dset, devLsoSoftCallback);
1440
1441diff --git a/modules/database/src/std/dev/devMbbiDirectSoft.c b/modules/database/src/std/dev/devMbbiDirectSoft.c
1442index 861952f..2138500 100644
1443--- a/modules/database/src/std/dev/devMbbiDirectSoft.c
1444+++ b/modules/database/src/std/dev/devMbbiDirectSoft.c
1445@@ -25,28 +25,19 @@
1446 #include "epicsExport.h"
1447
1448 /* Create the dset for devMbbiDirectSoft */
1449-static long init_record(mbbiDirectRecord *prec);
1450+static long init_record(dbCommon *pcommon);
1451 static long read_mbbi(mbbiDirectRecord *prec);
1452
1453-struct {
1454- long number;
1455- DEVSUPFUN report;
1456- DEVSUPFUN init;
1457- DEVSUPFUN init_record;
1458- DEVSUPFUN get_ioint_info;
1459- DEVSUPFUN read_mbbi;
1460-} devMbbiDirectSoft = {
1461- 5,
1462- NULL,
1463- NULL,
1464- init_record,
1465- NULL,
1466+mbbidirectdset devMbbiDirectSoft = {
1467+ {5, NULL, NULL, init_record, NULL},
1468 read_mbbi
1469 };
1470 epicsExportAddress(dset, devMbbiDirectSoft);
1471
1472-static long init_record(mbbiDirectRecord *prec)
1473+static long init_record(dbCommon *pcommon)
1474 {
1475+ mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
1476+
1477 if (recGblInitConstantLink(&prec->inp, DBR_ULONG, &prec->val))
1478 prec->udf = FALSE;
1479
1480diff --git a/modules/database/src/std/dev/devMbbiDirectSoftCallback.c b/modules/database/src/std/dev/devMbbiDirectSoftCallback.c
1481index e40a6b0..7c9850b 100644
1482--- a/modules/database/src/std/dev/devMbbiDirectSoftCallback.c
1483+++ b/modules/database/src/std/dev/devMbbiDirectSoftCallback.c
1484@@ -151,8 +151,10 @@ static long init(int pass)
1485 return 0;
1486 }
1487
1488-static long init_record(mbbiDirectRecord *prec)
1489+static long init_record(dbCommon *pcommon)
1490 {
1491+ mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
1492+
1493 if (recGblInitConstantLink(&prec->inp, DBR_ULONG, &prec->val))
1494 prec->udf = FALSE;
1495
1496@@ -204,10 +206,7 @@ static long read_mbbiDirect(mbbiDirectRecord *prec)
1497 }
1498
1499 /* Create the dset for devMbbiDirectSoftCallback */
1500-struct {
1501- dset common;
1502- DEVSUPFUN read_mbbiDirect;
1503-} devMbbiDirectSoftCallback = {
1504+mbbidirectdset devMbbiDirectSoftCallback = {
1505 {5, NULL, init, init_record, NULL},
1506 read_mbbiDirect
1507 };
1508diff --git a/modules/database/src/std/dev/devMbbiDirectSoftRaw.c b/modules/database/src/std/dev/devMbbiDirectSoftRaw.c
1509index 98b4673..0075686 100644
1510--- a/modules/database/src/std/dev/devMbbiDirectSoftRaw.c
1511+++ b/modules/database/src/std/dev/devMbbiDirectSoftRaw.c
1512@@ -25,28 +25,19 @@
1513 #include "epicsExport.h"
1514
1515 /* Create the dset for devMbbiDirectSoftRaw */
1516-static long init_record(mbbiDirectRecord *prec);
1517+static long init_record(dbCommon *pcommon);
1518 static long read_mbbi(mbbiDirectRecord *prec);
1519
1520-struct {
1521- long number;
1522- DEVSUPFUN report;
1523- DEVSUPFUN init;
1524- DEVSUPFUN init_record;
1525- DEVSUPFUN get_ioint_info;
1526- DEVSUPFUN read_mbbi;
1527-} devMbbiDirectSoftRaw = {
1528- 5,
1529- NULL,
1530- NULL,
1531- init_record,
1532- NULL,
1533+mbbidirectdset devMbbiDirectSoftRaw = {
1534+ {5, NULL, NULL, init_record, NULL},
1535 read_mbbi
1536 };
1537 epicsExportAddress(dset, devMbbiDirectSoftRaw);
1538
1539-static long init_record(mbbiDirectRecord *prec)
1540+static long init_record(dbCommon *pcommon)
1541 {
1542+ mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
1543+
1544 recGblInitConstantLink(&prec->inp, DBF_ULONG, &prec->rval);
1545
1546 /* Preserve old functionality */
1547diff --git a/modules/database/src/std/dev/devMbbiSoft.c b/modules/database/src/std/dev/devMbbiSoft.c
1548index b0b5714..d1e0716 100644
1549--- a/modules/database/src/std/dev/devMbbiSoft.c
1550+++ b/modules/database/src/std/dev/devMbbiSoft.c
1551@@ -25,28 +25,19 @@
1552 #include "epicsExport.h"
1553
1554 /* Create the dset for devMbbiSoft */
1555-static long init_record(mbbiRecord *prec);
1556+static long init_record(dbCommon *pcommon);
1557 static long read_mbbi(mbbiRecord *prec);
1558
1559-struct {
1560- long number;
1561- DEVSUPFUN report;
1562- DEVSUPFUN init;
1563- DEVSUPFUN init_record;
1564- DEVSUPFUN get_ioint_info;
1565- DEVSUPFUN read_mbbi;
1566-} devMbbiSoft = {
1567- 5,
1568- NULL,
1569- NULL,
1570- init_record,
1571- NULL,
1572+mbbidset devMbbiSoft = {
1573+ {5, NULL, NULL, init_record, NULL},
1574 read_mbbi
1575 };
1576 epicsExportAddress(dset, devMbbiSoft);
1577
1578-static long init_record(mbbiRecord *prec)
1579+static long init_record(dbCommon *pcommon)
1580 {
1581+ mbbiRecord *prec = (mbbiRecord *)pcommon;
1582+
1583 if (recGblInitConstantLink(&prec->inp, DBF_ENUM, &prec->val))
1584 prec->udf = FALSE;
1585
1586diff --git a/modules/database/src/std/dev/devMbbiSoftCallback.c b/modules/database/src/std/dev/devMbbiSoftCallback.c
1587index fee81b5..6466b4c 100644
1588--- a/modules/database/src/std/dev/devMbbiSoftCallback.c
1589+++ b/modules/database/src/std/dev/devMbbiSoftCallback.c
1590@@ -151,8 +151,10 @@ static long init(int pass)
1591 return 0;
1592 }
1593
1594-static long init_record(mbbiRecord *prec)
1595+static long init_record(dbCommon *pcommon)
1596 {
1597+ mbbiRecord *prec = (mbbiRecord *)pcommon;
1598+
1599 if (recGblInitConstantLink(&prec->inp, DBR_ENUM, &prec->val))
1600 prec->udf = FALSE;
1601
1602@@ -204,11 +206,8 @@ static long read_mbbi(mbbiRecord *prec)
1603 }
1604
1605 /* Create the dset for devMbbiSoftCallback */
1606-struct {
1607- dset common;
1608- DEVSUPFUN read_mbbi;
1609-} devMbbiSoftCallback = {
1610+mbbidset devMbbiSoftCallback = {
1611 {5, NULL, init, init_record, NULL},
1612 read_mbbi
1613 };
1614-epicsExportAddress(dset,devMbbiSoftCallback);
1615+epicsExportAddress(dset, devMbbiSoftCallback);
1616diff --git a/modules/database/src/std/dev/devMbbiSoftRaw.c b/modules/database/src/std/dev/devMbbiSoftRaw.c
1617index 3bd6b21..40617ab 100644
1618--- a/modules/database/src/std/dev/devMbbiSoftRaw.c
1619+++ b/modules/database/src/std/dev/devMbbiSoftRaw.c
1620@@ -25,28 +25,19 @@
1621 #include "epicsExport.h"
1622
1623 /* Create the dset for devMbbiSoftRaw */
1624-static long init_record(mbbiRecord *prec);
1625+static long init_record(dbCommon *pcommon);
1626 static long read_mbbi(mbbiRecord *prec);
1627
1628-struct {
1629- long number;
1630- DEVSUPFUN report;
1631- DEVSUPFUN init;
1632- DEVSUPFUN init_record;
1633- DEVSUPFUN get_ioint_info;
1634- DEVSUPFUN read_mbbi;
1635-} devMbbiSoftRaw = {
1636- 5,
1637- NULL,
1638- NULL,
1639- init_record,
1640- NULL,
1641+mbbidset devMbbiSoftRaw = {
1642+ {5, NULL, NULL, init_record, NULL},
1643 read_mbbi
1644 };
1645 epicsExportAddress(dset, devMbbiSoftRaw);
1646
1647-static long init_record(mbbiRecord *prec)
1648+static long init_record(dbCommon *pcommon)
1649 {
1650+ mbbiRecord *prec = (mbbiRecord *)pcommon;
1651+
1652 recGblInitConstantLink(&prec->inp, DBF_ULONG, &prec->rval);
1653
1654 /* Preserve old functionality*/
1655diff --git a/modules/database/src/std/dev/devMbboDirectSoft.c b/modules/database/src/std/dev/devMbboDirectSoft.c
1656index 75359f2..dc769b2 100644
1657--- a/modules/database/src/std/dev/devMbboDirectSoft.c
1658+++ b/modules/database/src/std/dev/devMbboDirectSoft.c
1659@@ -26,10 +26,7 @@ static long write_mbbo(mbboDirectRecord *prec)
1660 }
1661
1662 /* Create the dset for devMbboDirectSoft */
1663-struct {
1664- dset common;
1665- DEVSUPFUN write;
1666-} devMbboDirectSoft = {
1667+mbbodirectdset devMbboDirectSoft = {
1668 {5, NULL, NULL, NULL, NULL},
1669 write_mbbo
1670 };
1671diff --git a/modules/database/src/std/dev/devMbboDirectSoftCallback.c b/modules/database/src/std/dev/devMbboDirectSoftCallback.c
1672index 6d86507..18d9b9c 100644
1673--- a/modules/database/src/std/dev/devMbboDirectSoftCallback.c
1674+++ b/modules/database/src/std/dev/devMbboDirectSoftCallback.c
1675@@ -38,11 +38,8 @@ static long write_mbbo(mbboDirectRecord *prec)
1676 return status;
1677 }
1678
1679-/* Create the dset for devMbboSoft */
1680-struct {
1681- dset common;
1682- DEVSUPFUN write;
1683-} devMbboDirectSoftCallback = {
1684+/* Create the dset for devMbboDirectSoftCallback */
1685+mbbodirectdset devMbboDirectSoftCallback = {
1686 {5, NULL, NULL, NULL, NULL},
1687 write_mbbo
1688 };
1689diff --git a/modules/database/src/std/dev/devMbboDirectSoftRaw.c b/modules/database/src/std/dev/devMbboDirectSoftRaw.c
1690index c3bbdc8..f3d45a7 100644
1691--- a/modules/database/src/std/dev/devMbboDirectSoftRaw.c
1692+++ b/modules/database/src/std/dev/devMbboDirectSoftRaw.c
1693@@ -20,8 +20,10 @@
1694 #include "mbboDirectRecord.h"
1695 #include "epicsExport.h"
1696
1697-static long init_record(mbboDirectRecord *prec)
1698+static long init_record(dbCommon *pcommon)
1699 {
1700+ mbboDirectRecord *prec = (mbboDirectRecord *)pcommon;
1701+
1702 if (prec->nobt == 0)
1703 prec->mask = 0xffffffff;
1704
1705@@ -40,10 +42,7 @@ static long write_mbbo(mbboDirectRecord *prec)
1706 }
1707
1708 /* Create the dset for devMbboDirectSoftRaw */
1709-struct {
1710- dset common;
1711- DEVSUPFUN write;
1712-} devMbboDirectSoftRaw = {
1713+mbbodirectdset devMbboDirectSoftRaw = {
1714 {5, NULL, NULL, init_record, NULL},
1715 write_mbbo
1716 };
1717diff --git a/modules/database/src/std/dev/devMbboSoft.c b/modules/database/src/std/dev/devMbboSoft.c
1718index b2fe6b0..dfe8569 100644
1719--- a/modules/database/src/std/dev/devMbboSoft.c
1720+++ b/modules/database/src/std/dev/devMbboSoft.c
1721@@ -27,26 +27,16 @@
1722 #include "epicsExport.h"
1723
1724 /* Create the dset for devMbboSoft */
1725-static long init_record(mbboRecord *prec);
1726+static long init_record(dbCommon *pcommon);
1727 static long write_mbbo(mbboRecord *prec);
1728-struct {
1729- long number;
1730- DEVSUPFUN report;
1731- DEVSUPFUN init;
1732- DEVSUPFUN init_record;
1733- DEVSUPFUN get_ioint_info;
1734- DEVSUPFUN write_mbbo;
1735-}devMbboSoft={
1736- 5,
1737- NULL,
1738- NULL,
1739- init_record,
1740- NULL,
1741- write_mbbo
1742+
1743+mbbodset devMbboSoft = {
1744+ {5, NULL, NULL, init_record, NULL},
1745+ write_mbbo
1746 };
1747-epicsExportAddress(dset,devMbboSoft);
1748-
1749
1750-static long init_record(mbboRecord *prec)
1751+epicsExportAddress(dset, devMbboSoft);
1752+
1753+static long init_record(dbCommon *pcommon)
1754 {
1755 /*dont convert*/
1756 return 2;
1757diff --git a/modules/database/src/std/dev/devMbboSoftCallback.c b/modules/database/src/std/dev/devMbboSoftCallback.c
1758index fd5fe40..d5f2f1c 100644
1759--- a/modules/database/src/std/dev/devMbboSoftCallback.c
1760+++ b/modules/database/src/std/dev/devMbboSoftCallback.c
1761@@ -28,22 +28,12 @@
1762
1763 /* Create the dset for devMbboSoftCallback */
1764 static long write_mbbo(mbboRecord *prec);
1765-struct {
1766- long number;
1767- DEVSUPFUN report;
1768- DEVSUPFUN init;
1769- DEVSUPFUN init_record;
1770- DEVSUPFUN get_ioint_info;
1771- DEVSUPFUN write_mbbo;
1772-}devMbboSoftCallback={
1773- 5,
1774- NULL,
1775- NULL,
1776- NULL,
1777- NULL,
1778- write_mbbo
1779+
1780+mbbodset devMbboSoftCallback = {
1781+ {5, NULL, NULL, NULL, NULL},
1782+ write_mbbo
1783 };
1784-epicsExportAddress(dset,devMbboSoftCallback);
1785+epicsExportAddress(dset, devMbboSoftCallback);
1786
1787 static long write_mbbo(mbboRecord *prec)
1788 {
1789diff --git a/modules/database/src/std/dev/devMbboSoftRaw.c b/modules/database/src/std/dev/devMbboSoftRaw.c
1790index 092b6a8..2813ca9 100644
1791--- a/modules/database/src/std/dev/devMbboSoftRaw.c
1792+++ b/modules/database/src/std/dev/devMbboSoftRaw.c
1793@@ -20,8 +20,10 @@
1794 #include "mbboRecord.h"
1795 #include "epicsExport.h"
1796
1797-static long init_record(mbboRecord *prec)
1798+static long init_record(dbCommon *pcommon)
1799 {
1800+ mbboRecord *prec = (mbboRecord *)pcommon;
1801+
1802 if (prec->nobt == 0)
1803 prec->mask = 0xffffffff;
1804
1805@@ -40,10 +42,7 @@ static long write_mbbo(mbboRecord *prec)
1806 }
1807
1808 /* Create the dset for devMbboSoftRaw */
1809-struct {
1810- dset common;
1811- DEVSUPFUN write;
1812-} devMbboSoftRaw = {
1813+mbbodset devMbboSoftRaw = {
1814 {5, NULL, NULL, init_record, NULL},
1815 write_mbbo
1816 };
1817diff --git a/modules/database/src/std/dev/devPrintfSoft.c b/modules/database/src/std/dev/devPrintfSoft.c
1818index ca06f04..053b6e4 100644
1819--- a/modules/database/src/std/dev/devPrintfSoft.c
1820+++ b/modules/database/src/std/dev/devPrintfSoft.c
1821@@ -19,7 +19,7 @@ static long write_string(printfRecord *prec)
1822 }
1823
1824 printfdset devPrintfSoft = {
1825- 5, NULL, NULL, NULL, NULL, write_string
1826+ { 5, NULL, NULL, NULL, NULL }, write_string
1827 };
1828 epicsExportAddress(dset, devPrintfSoft);
1829
1830diff --git a/modules/database/src/std/dev/devPrintfSoftCallback.c b/modules/database/src/std/dev/devPrintfSoftCallback.c
1831index e89afd5..a17efc4 100644
1832--- a/modules/database/src/std/dev/devPrintfSoftCallback.c
1833+++ b/modules/database/src/std/dev/devPrintfSoftCallback.c
1834@@ -40,6 +40,6 @@ static long write_string(printfRecord *prec)
1835 }
1836
1837 printfdset devPrintfSoftCallback = {
1838- 5, NULL, NULL, NULL, NULL, write_string
1839+ { 5, NULL, NULL, NULL, NULL }, write_string
1840 };
1841 epicsExportAddress(dset, devPrintfSoftCallback);
1842diff --git a/modules/database/src/std/dev/devSASoft.c b/modules/database/src/std/dev/devSASoft.c
1843index 69894dd..be32af4 100644
1844--- a/modules/database/src/std/dev/devSASoft.c
1845+++ b/modules/database/src/std/dev/devSASoft.c
1846@@ -26,22 +26,11 @@
1847 #include "epicsExport.h"
1848
1849 /* Create the dset for devSASoft */
1850-static long init_record(subArrayRecord *prec);
1851+static long init_record(dbCommon *pcommon);
1852 static long read_sa(subArrayRecord *prec);
1853
1854-struct {
1855- long number;
1856- DEVSUPFUN report;
1857- DEVSUPFUN init;
1858- DEVSUPFUN init_record;
1859- DEVSUPFUN get_ioint_info;
1860- DEVSUPFUN read_sa;
1861-} devSASoft = {
1862- 5,
1863- NULL,
1864- NULL,
1865- init_record,
1866- NULL,
1867+sadset devSASoft = {
1868+ {5, NULL, NULL, init_record, NULL},
1869 read_sa
1870 };
1871 epicsExportAddress(dset, devSASoft);
1872@@ -65,8 +54,9 @@ static void subset(subArrayRecord *prec, long nRequest)
1873 prec->udf = FALSE;
1874 }
1875
1876-static long init_record(subArrayRecord *prec)
1877+static long init_record(dbCommon *pcommon)
1878 {
1879+ subArrayRecord *prec = (subArrayRecord *)pcommon;
1880 long nRequest = prec->indx + prec->nelm;
1881 long status;
1882
1883diff --git a/modules/database/src/std/dev/devSiSoft.c b/modules/database/src/std/dev/devSiSoft.c
1884index 5141c10..7b97803 100644
1885--- a/modules/database/src/std/dev/devSiSoft.c
1886+++ b/modules/database/src/std/dev/devSiSoft.c
1887@@ -27,28 +27,19 @@
1888 #include "epicsExport.h"
1889
1890 /* Create the dset for devSiSoft */
1891-static long init_record(stringinRecord *prec);
1892+static long init_record(dbCommon *pcommon);
1893 static long read_stringin(stringinRecord *prec);
1894
1895-struct {
1896- long number;
1897- DEVSUPFUN report;
1898- DEVSUPFUN init;
1899- DEVSUPFUN init_record;
1900- DEVSUPFUN get_ioint_info;
1901- DEVSUPFUN read_stringin;
1902-} devSiSoft = {
1903- 5,
1904- NULL,
1905- NULL,
1906- init_record,
1907- NULL,
1908+stringindset devSiSoft = {
1909+ {5, NULL, NULL, init_record, NULL},
1910 read_stringin
1911 };
1912 epicsExportAddress(dset, devSiSoft);
1913
1914-static long init_record(stringinRecord *prec)
1915+static long init_record(dbCommon *pcommon)
1916 {
1917+ stringinRecord *prec = (stringinRecord *)pcommon;
1918+
1919 if (recGblInitConstantLink(&prec->inp, DBF_STRING, prec->val))
1920 prec->udf = FALSE;
1921
1922diff --git a/modules/database/src/std/dev/devSiSoftCallback.c b/modules/database/src/std/dev/devSiSoftCallback.c
1923index fd0e376..303e1be 100644
1924--- a/modules/database/src/std/dev/devSiSoftCallback.c
1925+++ b/modules/database/src/std/dev/devSiSoftCallback.c
1926@@ -153,8 +153,10 @@ static long init(int pass)
1927 return 0;
1928 }
1929
1930-static long init_record(stringinRecord *prec)
1931+static long init_record(dbCommon *pcommon)
1932 {
1933+ stringinRecord *prec = (stringinRecord *)pcommon;
1934+
1935 if (recGblInitConstantLink(&prec->inp, DBR_STRING, &prec->val))
1936 prec->udf = FALSE;
1937
1938@@ -207,11 +209,8 @@ static long read_si(stringinRecord *prec)
1939 }
1940
1941 /* Create the dset for devSiSoftCallback */
1942-struct {
1943- dset common;
1944- DEVSUPFUN read_li;
1945-} devSiSoftCallback = {
1946+stringindset devSiSoftCallback = {
1947 {5, NULL, init, init_record, NULL},
1948 read_si
1949 };
1950-epicsExportAddress(dset,devSiSoftCallback);
1951+epicsExportAddress(dset, devSiSoftCallback);
1952diff --git a/modules/database/src/std/dev/devSoSoft.c b/modules/database/src/std/dev/devSoSoft.c
1953index 6dda4a7..5af5a52 100644
1954--- a/modules/database/src/std/dev/devSoSoft.c
1955+++ b/modules/database/src/std/dev/devSoSoft.c
1956@@ -27,19 +27,9 @@
1957
1958 /* Create the dset for devSoSoft */
1959 static long write_stringout(stringoutRecord *prec);
1960-struct {
1961- long number;
1962- DEVSUPFUN report;
1963- DEVSUPFUN init;
1964- DEVSUPFUN init_record;
1965- DEVSUPFUN get_ioint_info;
1966- DEVSUPFUN write_stringout;
1967-} devSoSoft = {
1968- 5,
1969- NULL,
1970- NULL,
1971- NULL,
1972- NULL,
1973+
1974+stringoutdset devSoSoft = {
1975+ {5, NULL, NULL, NULL, NULL},
1976 write_stringout
1977 };
1978 epicsExportAddress(dset, devSoSoft);
1979diff --git a/modules/database/src/std/dev/devSoSoftCallback.c b/modules/database/src/std/dev/devSoSoftCallback.c
1980index df8c5d8..ceae801 100644
1981--- a/modules/database/src/std/dev/devSoSoftCallback.c
1982+++ b/modules/database/src/std/dev/devSoSoftCallback.c
1983@@ -27,19 +27,9 @@
1984
1985 /* Create the dset for devSoSoftCallback */
1986 static long write_stringout(stringoutRecord *prec);
1987-struct {
1988- long number;
1989- DEVSUPFUN report;
1990- DEVSUPFUN init;
1991- DEVSUPFUN init_record;
1992- DEVSUPFUN get_ioint_info;
1993- DEVSUPFUN write_stringout;
1994-} devSoSoftCallback = {
1995- 5,
1996- NULL,
1997- NULL,
1998- NULL,
1999- NULL,
2000+
2001+stringoutdset devSoSoftCallback = {
2002+ {5, NULL, NULL, NULL, NULL},
2003 write_stringout
2004 };
2005 epicsExportAddress(dset, devSoSoftCallback);
2006@@ -60,4 +50,3 @@ static long write_stringout(stringoutRecord *prec)
2007
2008 return status;
2009 }
2010-
2011diff --git a/modules/database/src/std/dev/devStdio.c b/modules/database/src/std/dev/devStdio.c
2012index e957bfc..d8646d9 100644
2013--- a/modules/database/src/std/dev/devStdio.c
2014+++ b/modules/database/src/std/dev/devStdio.c
2015@@ -103,7 +103,7 @@ static long write_lso(lsoRecord *prec)
2016 }
2017
2018 lsodset devLsoStdio = {
2019- 5, NULL, init_lso, NULL, NULL, write_lso
2020+ { 5, NULL, init_lso, NULL, NULL }, write_lso
2021 };
2022 epicsExportAddress(dset, devLsoStdio);
2023
2024@@ -153,7 +153,7 @@ static long write_printf(printfRecord *prec)
2025 }
2026
2027 printfdset devPrintfStdio = {
2028- 5, NULL, init_printf, NULL, NULL, write_printf
2029+ {5, NULL, init_printf, NULL, NULL }, write_printf
2030 };
2031 epicsExportAddress(dset, devPrintfStdio);
2032
2033@@ -202,10 +202,8 @@ static long write_stringout(stringoutRecord *prec)
2034 return 0;
2035 }
2036
2037-static struct {
2038- dset common;
2039- DEVSUPFUN write;
2040-} devSoStdio = {
2041- {5, NULL, init_stringout, NULL, NULL}, write_stringout
2042+stringoutdset devSoStdio = {
2043+ {5, NULL, init_stringout, NULL, NULL},
2044+ write_stringout
2045 };
2046 epicsExportAddress(dset, devSoStdio);
2047diff --git a/modules/database/src/std/dev/devTimestamp.c b/modules/database/src/std/dev/devTimestamp.c
2048index 936d776..06f694e 100644
2049--- a/modules/database/src/std/dev/devTimestamp.c
2050+++ b/modules/database/src/std/dev/devTimestamp.c
2051@@ -40,12 +40,9 @@ static long read_ai(aiRecord *prec)
2052 return 2;
2053 }
2054
2055-struct {
2056- dset common;
2057- DEVSUPFUN read_write;
2058- DEVSUPFUN special_linconv;
2059-} devTimestampAI = {
2060- {6, NULL, initAllow, NULL, NULL}, read_ai, NULL
2061+aidset devTimestampAI = {
2062+ {6, NULL, initAllow, NULL, NULL},
2063+ read_ai, NULL
2064 };
2065 epicsExportAddress(dset, devTimestampAI);
2066
2067@@ -68,10 +65,8 @@ static long read_stringin (stringinRecord *prec)
2068 return 0;
2069 }
2070
2071-struct {
2072- dset common;
2073- DEVSUPFUN read_stringin;
2074-} devTimestampSI = {
2075- {5, NULL, initAllow, NULL, NULL}, read_stringin
2076+stringindset devTimestampSI = {
2077+ {5, NULL, initAllow, NULL, NULL},
2078+ read_stringin
2079 };
2080 epicsExportAddress(dset, devTimestampSI);
2081diff --git a/modules/database/src/std/dev/devWfSoft.c b/modules/database/src/std/dev/devWfSoft.c
2082index 5b52151..0a089b8 100644
2083--- a/modules/database/src/std/dev/devWfSoft.c
2084+++ b/modules/database/src/std/dev/devWfSoft.c
2085@@ -26,28 +26,18 @@
2086 #include "epicsExport.h"
2087
2088 /* Create the dset for devWfSoft */
2089-static long init_record(waveformRecord *prec);
2090+static long init_record(dbCommon *pcommon);
2091 static long read_wf(waveformRecord *prec);
2092
2093-struct {
2094- long number;
2095- DEVSUPFUN report;
2096- DEVSUPFUN init;
2097- DEVSUPFUN init_record;
2098- DEVSUPFUN get_ioint_info;
2099- DEVSUPFUN read_wf;
2100-} devWfSoft = {
2101- 5,
2102- NULL,
2103- NULL,
2104- init_record,
2105- NULL,
2106+wfdset devWfSoft = {
2107+ {5, NULL, NULL, init_record, NULL},
2108 read_wf
2109 };
2110 epicsExportAddress(dset, devWfSoft);
2111
2112-static long init_record(waveformRecord *prec)
2113+static long init_record(dbCommon *pcommon)
2114 {
2115+ waveformRecord *prec = (waveformRecord *)pcommon;
2116 long nelm = prec->nelm;
2117 long status = dbLoadLinkArray(&prec->inp, prec->ftvl, prec->bptr, &nelm);
2118
2119diff --git a/modules/database/src/std/rec/aaiRecord.c b/modules/database/src/std/rec/aaiRecord.c
2120index 51af45f..e8143ae 100644
2121--- a/modules/database/src/std/rec/aaiRecord.c
2122+++ b/modules/database/src/std/rec/aaiRecord.c
2123@@ -90,22 +90,13 @@ rset aaiRSET={
2124 };
2125 epicsExportAddress(rset,aaiRSET);
2126
2127-struct aaidset { /* aai dset */
2128- long number;
2129- DEVSUPFUN dev_report;
2130- DEVSUPFUN init;
2131- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
2132- DEVSUPFUN get_ioint_info;
2133- DEVSUPFUN read_aai; /*returns: (-1,0)=>(failure,success)*/
2134-};
2135-
2136 static void monitor(aaiRecord *);
2137 static long readValue(aaiRecord *);
2138
2139 static long init_record(struct dbCommon *pcommon, int pass)
2140 {
2141 struct aaiRecord *prec = (struct aaiRecord *)pcommon;
2142- struct aaidset *pdset = (struct aaidset *)(prec->dset);
2143+ aaidset *pdset = (aaidset *)(prec->dset);
2144
2145 /* must have dset defined */
2146 if (!pdset) {
2147@@ -125,8 +116,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
2148 not change after links are established before pass 1
2149 */
2150
2151- if (pdset->init_record) {
2152- long status = pdset->init_record(prec);
2153+ if (pdset->common.init_record) {
2154+ long status = pdset->common.init_record(pcommon);
2155
2156 /* init_record may set the bptr to point to the data */
2157 if (status)
2158@@ -143,7 +134,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2159 recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
2160
2161 /* must have read_aai function defined */
2162- if (pdset->number < 5 || pdset->read_aai == NULL) {
2163+ if (pdset->common.number < 5 || pdset->read_aai == NULL) {
2164 recGblRecordError(S_dev_missingSup, prec, "aai: init_record");
2165 return S_dev_missingSup;
2166 }
2167@@ -153,7 +144,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2168 static long process(struct dbCommon *pcommon)
2169 {
2170 struct aaiRecord *prec = (struct aaiRecord *)pcommon;
2171- struct aaidset *pdset = (struct aaidset *)(prec->dset);
2172+ aaidset *pdset = (aaidset *)(prec->dset);
2173 long status;
2174 unsigned char pact = prec->pact;
2175
2176@@ -339,7 +330,7 @@ static void monitor(aaiRecord *prec)
2177
2178 static long readValue(aaiRecord *prec)
2179 {
2180- struct aaidset *pdset = (struct aaidset *) prec->dset;
2181+ aaidset *pdset = (aaidset *) prec->dset;
2182 long status;
2183
2184 /* NB: Device support must post updates to NORD */
2185diff --git a/modules/database/src/std/rec/aaiRecord.dbd b/modules/database/src/std/rec/aaiRecord.dbd
2186index b4675b3..bc29209 100644
2187--- a/modules/database/src/std/rec/aaiRecord.dbd
2188+++ b/modules/database/src/std/rec/aaiRecord.dbd
2189@@ -12,6 +12,15 @@ menu(aaiPOST) {
2190 }
2191 recordtype(aai) {
2192 include "dbCommon.dbd"
2193+ %
2194+ %/* Declare Device Support Entry Table */
2195+ %struct aaiRecord;
2196+ %typedef struct aaidset {
2197+ % dset common; /*init_record returns: (-1,0)=>(failure,success)*/
2198+ % long (*read_aai)(struct aaiRecord *prec); /*returns: (-1,0)=>(failure,success)*/
2199+ %} aaidset;
2200+ %#define HAS_aaidset
2201+ %
2202 field(VAL,DBF_NOACCESS) {
2203 prompt("Value")
2204 asl(ASL0)
2205diff --git a/modules/database/src/std/rec/aaoRecord.c b/modules/database/src/std/rec/aaoRecord.c
2206index ccf0517..feb4e34 100644
2207--- a/modules/database/src/std/rec/aaoRecord.c
2208+++ b/modules/database/src/std/rec/aaoRecord.c
2209@@ -90,22 +90,13 @@ rset aaoRSET={
2210 };
2211 epicsExportAddress(rset,aaoRSET);
2212
2213-struct aaodset { /* aao dset */
2214- long number;
2215- DEVSUPFUN dev_report;
2216- DEVSUPFUN init;
2217- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
2218- DEVSUPFUN get_ioint_info;
2219- DEVSUPFUN write_aao; /*returns: (-1,0)=>(failure,success)*/
2220-};
2221-
2222 static void monitor(aaoRecord *);
2223 static long writeValue(aaoRecord *);
2224
2225 static long init_record(struct dbCommon *pcommon, int pass)
2226 {
2227 struct aaoRecord *prec = (struct aaoRecord *)pcommon;
2228- struct aaodset *pdset = (struct aaodset *)(prec->dset);
2229+ aaodset *pdset = (aaodset *)(prec->dset);
2230 long status;
2231
2232 /* must have dset defined */
2233@@ -130,9 +121,9 @@ static long init_record(struct dbCommon *pcommon, int pass)
2234 not change after links are established before pass 1
2235 */
2236
2237- if (pdset->init_record) {
2238+ if (pdset->common.init_record) {
2239 /* init_record may set the bptr to point to the data */
2240- if ((status = pdset->init_record(prec)))
2241+ if ((status = pdset->common.init_record(pcommon)))
2242 return status;
2243 }
2244 if (!prec->bptr) {
2245@@ -146,7 +137,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2246 recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
2247
2248 /* must have write_aao function defined */
2249- if (pdset->number < 5 || pdset->write_aao == NULL) {
2250+ if (pdset->common.number < 5 || pdset->write_aao == NULL) {
2251 recGblRecordError(S_dev_missingSup, prec, "aao: init_record");
2252 return S_dev_missingSup;
2253 }
2254@@ -156,7 +147,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2255 static long process(struct dbCommon *pcommon)
2256 {
2257 struct aaoRecord *prec = (struct aaoRecord *)pcommon;
2258- struct aaodset *pdset = (struct aaodset *)(prec->dset);
2259+ aaodset *pdset = (aaodset *)(prec->dset);
2260 long status;
2261 unsigned char pact = prec->pact;
2262
2263@@ -339,7 +330,7 @@ static void monitor(aaoRecord *prec)
2264
2265 static long writeValue(aaoRecord *prec)
2266 {
2267- struct aaodset *pdset = (struct aaodset *) prec->dset;
2268+ aaodset *pdset = (aaodset *) prec->dset;
2269 long status = 0;
2270
2271 if (!prec->pact) {
2272diff --git a/modules/database/src/std/rec/aaoRecord.dbd b/modules/database/src/std/rec/aaoRecord.dbd
2273index 20e957f..aebb769 100644
2274--- a/modules/database/src/std/rec/aaoRecord.dbd
2275+++ b/modules/database/src/std/rec/aaoRecord.dbd
2276@@ -12,6 +12,15 @@ menu(aaoPOST) {
2277 }
2278 recordtype(aao) {
2279 include "dbCommon.dbd"
2280+ %
2281+ %/* Declare Device Support Entry Table */
2282+ %struct aaoRecord;
2283+ %typedef struct aaodset {
2284+ % dset common; /*init_record returns: (-1,0)=>(failure,success)*/
2285+ % long (*write_aao)(struct aaoRecord *prec); /*returns: (-1,0)=>(failure,success)*/
2286+ %} aaodset;
2287+ %#define HAS_aaodset
2288+ %
2289 field(VAL,DBF_NOACCESS) {
2290 prompt("Value")
2291 asl(ASL0)
2292diff --git a/modules/database/src/std/rec/aiRecord.c b/modules/database/src/std/rec/aiRecord.c
2293index 0e35932..512a012 100644
2294--- a/modules/database/src/std/rec/aiRecord.c
2295+++ b/modules/database/src/std/rec/aiRecord.c
2296@@ -86,17 +86,6 @@ rset aiRSET={
2297 };
2298 epicsExportAddress(rset,aiRSET);
2299
2300-typedef struct aidset { /* analog input dset */
2301- long number;
2302- DEVSUPFUN dev_report;
2303- DEVSUPFUN init;
2304- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
2305- DEVSUPFUN get_ioint_info;
2306- DEVSUPFUN read_ai;/*(0,2)=> success and convert,don't convert)*/
2307- /* if convert then raw value stored in rval */
2308- DEVSUPFUN special_linconv;
2309-}aidset;
2310-
2311 static void checkAlarms(aiRecord *prec, epicsTimeStamp *lastTime);
2312 static void convert(aiRecord *prec);
2313 static void monitor(aiRecord *prec);
2314@@ -118,7 +107,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2315 return(S_dev_noDSET);
2316 }
2317 /* must have read_ai function defined */
2318- if( (pdset->number < 6) || (pdset->read_ai == NULL) ) {
2319+ if ((pdset->common.number < 6) || (pdset->read_ai == NULL)) {
2320 recGblRecordError(S_dev_missingSup,(void *)prec,"ai: init_record");
2321 return(S_dev_missingSup);
2322 }
2323@@ -128,8 +117,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
2324 prec->eoff = prec->egul;
2325 }
2326
2327- if( pdset->init_record ) {
2328- long status=(*pdset->init_record)(prec);
2329+ if (pdset->common.init_record) {
2330+ long status = pdset->common.init_record(pcommon);
2331 if (prec->linr == menuConvertSLOPE) {
2332 prec->eoff = eoff;
2333 prec->eslo = eslo;
2334@@ -190,7 +179,7 @@ static long special(DBADDR *paddr,int after)
2335
2336 switch(special_type) {
2337 case(SPC_LINCONV):
2338- if(pdset->number<6) {
2339+ if (pdset->common.number < 6) {
2340 recGblDbaddrError(S_db_noMod,paddr,"ai: special");
2341 return(S_db_noMod);
2342 }
2343diff --git a/modules/database/src/std/rec/aiRecord.dbd.pod b/modules/database/src/std/rec/aiRecord.dbd.pod
2344index 3b53b7a..440d16c 100644
2345--- a/modules/database/src/std/rec/aiRecord.dbd.pod
2346+++ b/modules/database/src/std/rec/aiRecord.dbd.pod
2347@@ -215,6 +215,16 @@ monitoring functionality.
2348 =cut
2349
2350 include "dbCommon.dbd"
2351+ %
2352+ %/* Declare Device Support Entry Table */
2353+ %struct aiRecord;
2354+ %typedef struct aidset {
2355+ % dset common;
2356+ % long (*read_ai)(struct aiRecord *prec);
2357+ % long (*special_linconv)(struct aiRecord *prec, int after);
2358+ %} aidset;
2359+ %#define HAS_aidset
2360+ %
2361 field(VAL,DBF_DOUBLE) {
2362 prompt("Current EGU Value")
2363 promptgroup("40 - Input")
2364diff --git a/modules/database/src/std/rec/aoRecord.c b/modules/database/src/std/rec/aoRecord.c
2365index 6fa6585..3f9a84e 100644
2366--- a/modules/database/src/std/rec/aoRecord.c
2367+++ b/modules/database/src/std/rec/aoRecord.c
2368@@ -81,20 +81,10 @@ rset aoRSET={
2369 put_enum_str,
2370 get_graphic_double,
2371 get_control_double,
2372- get_alarm_double };
2373-
2374-struct aodset { /* analog input dset */
2375- long number;
2376- DEVSUPFUN dev_report;
2377- DEVSUPFUN init;
2378- DEVSUPFUN init_record; /*returns: (0,2)=>(success,success no convert)*/
2379- DEVSUPFUN get_ioint_info;
2380- DEVSUPFUN write_ao;/*(0)=>(success ) */
2381- DEVSUPFUN special_linconv;
2382+ get_alarm_double
2383 };
2384 epicsExportAddress(rset,aoRSET);
2385
2386-
2387 static void checkAlarms(aoRecord *);
2388 static long fetch_value(aoRecord *, double *);
2389 static void convert(aoRecord *, double);
2390@@ -104,7 +94,7 @@ static long writeValue(aoRecord *);
2391 static long init_record(struct dbCommon *pcommon, int pass)
2392 {
2393 struct aoRecord *prec = (struct aoRecord *)pcommon;
2394- struct aodset *pdset;
2395+ aodset *pdset;
2396 double eoff = prec->eoff, eslo = prec->eslo;
2397 double value;
2398 long status = 0;
2399@@ -113,7 +103,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2400
2401 recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
2402
2403- if(!(pdset = (struct aodset *)(prec->dset))) {
2404+ if(!(pdset = (aodset *)(prec->dset))) {
2405 recGblRecordError(S_dev_noDSET,(void *)prec,"ao: init_record");
2406 return(S_dev_noDSET);
2407 }
2408@@ -122,7 +112,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2409 prec->udf = isnan(prec->val);
2410
2411 /* must have write_ao function defined */
2412- if ((pdset->number < 6) || (pdset->write_ao ==NULL)) {
2413+ if ((pdset->common.number < 6) || (pdset->write_ao ==NULL)) {
2414 recGblRecordError(S_dev_missingSup,(void *)prec,"ao: init_record");
2415 return(S_dev_missingSup);
2416 }
2417@@ -132,8 +122,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
2418 prec->eoff = prec->egul;
2419 }
2420
2421- if (pdset->init_record) {
2422- status = (*pdset->init_record)(prec);
2423+ if (pdset->common.init_record) {
2424+ status = pdset->common.init_record(pcommon);
2425 if (prec->linr == menuConvertSLOPE) {
2426 prec->eoff = eoff;
2427 prec->eslo = eslo;
2428@@ -174,7 +164,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2429 static long process(struct dbCommon *pcommon)
2430 {
2431 struct aoRecord *prec = (struct aoRecord *)pcommon;
2432- struct aodset *pdset = (struct aodset *)(prec->dset);
2433+ aodset *pdset = (aodset *)(prec->dset);
2434 long status=0;
2435 unsigned char pact=prec->pact;
2436 double value;
2437@@ -245,12 +235,12 @@ static long process(struct dbCommon *pcommon)
2438 static long special(DBADDR *paddr, int after)
2439 {
2440 aoRecord *prec = (aoRecord *)(paddr->precord);
2441- struct aodset *pdset = (struct aodset *) (prec->dset);
2442+ aodset *pdset = (aodset *) (prec->dset);
2443 int special_type = paddr->special;
2444
2445 switch(special_type) {
2446 case(SPC_LINCONV):
2447- if(pdset->number<6 ) {
2448+ if(pdset->common.number<6 ) {
2449 recGblDbaddrError(S_db_noMod,paddr,"ao: special");
2450 return(S_db_noMod);
2451 }
2452@@ -555,7 +545,7 @@ static void monitor(aoRecord *prec)
2453
2454
2455 static long writeValue(aoRecord *prec)
2456 {
2457- struct aodset *pdset = (struct aodset *) prec->dset;
2458+ aodset *pdset = (aodset *) prec->dset;
2459 long status = 0;
2460
2461 if (!prec->pact) {
2462diff --git a/modules/database/src/std/rec/aoRecord.dbd.pod b/modules/database/src/std/rec/aoRecord.dbd.pod
2463index c54cb2c..672329e 100644
2464--- a/modules/database/src/std/rec/aoRecord.dbd.pod
2465+++ b/modules/database/src/std/rec/aoRecord.dbd.pod
2466@@ -269,6 +269,16 @@ information on these fields.
2467 =cut
2468
2469 include "dbCommon.dbd"
2470+ %
2471+ %/* Declare Device Support Entry Table */
2472+ %struct aoRecord;
2473+ %typedef struct aodset {
2474+ % dset common; /*init_record returns: (0,2)=>(success,success no convert)*/
2475+ % long (*write_ao)(struct aoRecord *prec); /*(0)=>(success ) */
2476+ % long (*special_linconv)(struct aoRecord *prec, int after);
2477+ %} aodset;
2478+ %#define HAS_aodset
2479+ %
2480 field(VAL,DBF_DOUBLE) {
2481 prompt("Desired Output")
2482 promptgroup("50 - Output")
2483diff --git a/modules/database/src/std/rec/biRecord.c b/modules/database/src/std/rec/biRecord.c
2484index 9c0ddb3..c26ed79 100644
2485--- a/modules/database/src/std/rec/biRecord.c
2486+++ b/modules/database/src/std/rec/biRecord.c
2487@@ -75,17 +75,10 @@ rset biRSET={
2488 put_enum_str,
2489 get_graphic_double,
2490 get_control_double,
2491- get_alarm_double };
2492-struct bidset { /* binary input dset */
2493- long number;
2494- DEVSUPFUN dev_report;
2495- DEVSUPFUN init;
2496- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
2497- DEVSUPFUN get_ioint_info;
2498- DEVSUPFUN read_bi;/*(0,2)=> success and convert, don't convert)*/
2499- /* if convert then raw value stored in rval */
2500+ get_alarm_double
2501 };
2502 epicsExportAddress(rset,biRSET);
2503+
2504 static void checkAlarms(biRecord *);
2505 static void monitor(biRecord *);
2506 static long readValue(biRecord *);
2507@@ -93,7 +86,7 @@ static long readValue(biRecord *);
2508 static long init_record(struct dbCommon *pcommon, int pass)
2509 {
2510 struct biRecord *prec = (struct biRecord *)pcommon;
2511- struct bidset *pdset;
2512+ bidset *pdset;
2513 long status;
2514
2515 if (pass == 0) return 0;
2516@@ -101,17 +94,17 @@ static long init_record(struct dbCommon *pcommon, int pass)
2517 recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
2518 recGblInitConstantLink(&prec->siol, DBF_USHORT, &prec->sval);
2519
2520- if(!(pdset = (struct bidset *)(prec->dset))) {
2521+ if(!(pdset = (bidset *)(prec->dset))) {
2522 recGblRecordError(S_dev_noDSET,(void *)prec,"bi: init_record");
2523 return(S_dev_noDSET);
2524 }
2525 /* must have read_bi function defined */
2526- if( (pdset->number < 5) || (pdset->read_bi == NULL) ) {
2527+ if( (pdset->common.number < 5) || (pdset->read_bi == NULL) ) {
2528 recGblRecordError(S_dev_missingSup,(void *)prec,"bi: init_record");
2529 return(S_dev_missingSup);
2530 }
2531- if( pdset->init_record ) {
2532- if((status=(*pdset->init_record)(prec))) return(status);
2533+ if( pdset->common.init_record ) {
2534+ if((status=(*pdset->common.init_record)(pcommon))) return(status);
2535 }
2536 prec->mlst = prec->val;
2537 prec->lalm = prec->val;
2538@@ -122,7 +115,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2539 static long process(struct dbCommon *pcommon)
2540 {
2541 struct biRecord *prec = (struct biRecord *)pcommon;
2542- struct bidset *pdset = (struct bidset *)(prec->dset);
2543+ bidset *pdset = (bidset *)(prec->dset);
2544 long status;
2545 unsigned char pact=prec->pact;
2546
2547@@ -275,7 +268,7 @@ static void monitor(biRecord *prec)
2548
2549
2550 static long readValue(biRecord *prec)
2551 {
2552- struct bidset *pdset = (struct bidset *)prec->dset;
2553+ bidset *pdset = (bidset *)prec->dset;
2554 long status = 0;
2555
2556 if (!prec->pact) {
2557diff --git a/modules/database/src/std/rec/biRecord.dbd.pod b/modules/database/src/std/rec/biRecord.dbd.pod
2558index 62bcf3b..a3b5ed3 100644
2559--- a/modules/database/src/std/rec/biRecord.dbd.pod
2560+++ b/modules/database/src/std/rec/biRecord.dbd.pod
2561@@ -163,6 +163,15 @@ these fields.
2562 =cut
2563
2564 include "dbCommon.dbd"
2565+ %
2566+ %/* Declare Device Support Entry Table */
2567+ %struct biRecord;
2568+ %typedef struct bidset {
2569+ % dset common; /*init_record returns: (-1,0)=>(failure,success)*/
2570+ % long (*read_bi)(struct biRecord *prec);/*(0,2)=> success and convert, don't convert); if convert then raw value stored in rval */
2571+ %} bidset;
2572+ %#define HAS_bidset
2573+ %
2574 field(INP,DBF_INLINK) {
2575 prompt("Input Specification")
2576 promptgroup("40 - Input")
2577diff --git a/modules/database/src/std/rec/boRecord.c b/modules/database/src/std/rec/boRecord.c
2578index 4cfe62d..94aa587 100644
2579--- a/modules/database/src/std/rec/boRecord.c
2580+++ b/modules/database/src/std/rec/boRecord.c
2581@@ -86,16 +86,6 @@ epicsExportAddress(int, boHIGHprecision);
2582 double boHIGHlimit = 100000;
2583 epicsExportAddress(double, boHIGHlimit);
2584
2585-struct bodset { /* binary output dset */
2586- long number;
2587- DEVSUPFUN dev_report;
2588- DEVSUPFUN init;
2589- DEVSUPFUN init_record; /*returns:(0,2)=>(success,success no convert*/
2590- DEVSUPFUN get_ioint_info;
2591- DEVSUPFUN write_bo;/*returns: (-1,0)=>(failure,success)*/
2592-};
2593-
2594-
2595 /* control block for callback*/
2596 typedef struct myCallback {
2597 epicsCallback callback;
2598@@ -131,7 +121,7 @@ static void myCallbackFunc(epicsCallback *arg)
2599 static long init_record(struct dbCommon *pcommon,int pass)
2600 {
2601 struct boRecord *prec = (struct boRecord *)pcommon;
2602- struct bodset *pdset = (struct bodset *) prec->dset;
2603+ bodset *pdset = (bodset *) prec->dset;
2604 unsigned short ival = 0;
2605 long status = 0;
2606 myCallback *pcallback;
2607@@ -146,7 +136,7 @@ static long init_record(struct dbCommon *pcommon,int pass)
2608 }
2609
2610 /* must have write_bo functions defined */
2611- if ((pdset->number < 5) || (pdset->write_bo == NULL)) {
2612+ if ((pdset->common.number < 5) || (pdset->write_bo == NULL)) {
2613 recGblRecordError(S_dev_missingSup, prec, "bo: init_record");
2614 return S_dev_missingSup;
2615 }
2616@@ -163,8 +153,8 @@ static long init_record(struct dbCommon *pcommon,int pass)
2617 callbackSetUser(pcallback, &pcallback->callback);
2618 pcallback->precord = (struct dbCommon *) prec;
2619
2620- if (pdset->init_record) {
2621- status=(*pdset->init_record)(prec);
2622+ if (pdset->common.init_record) {
2623+ status=(*pdset->common.init_record)(pcommon);
2624 if(status==0) {
2625 if(prec->rval==0) prec->val = 0;
2626 else prec->val = 1;
2627@@ -188,7 +178,7 @@ static long init_record(struct dbCommon *pcommon,int pass)
2628 static long process(struct dbCommon *pcommon)
2629 {
2630 struct boRecord *prec = (struct boRecord *)pcommon;
2631- struct bodset *pdset = (struct bodset *)(prec->dset);
2632+ bodset *pdset = (bodset *)(prec->dset);
2633 long status=0;
2634 unsigned char pact=prec->pact;
2635
2636@@ -420,7 +410,7 @@ static void monitor(boRecord *prec)
2637
2638
2639 static long writeValue(boRecord *prec)
2640 {
2641- struct bodset *pdset = (struct bodset *) prec->dset;
2642+ bodset *pdset = (bodset *) prec->dset;
2643 long status = 0;
2644
2645 if (!prec->pact) {
2646diff --git a/modules/database/src/std/rec/boRecord.dbd.pod b/modules/database/src/std/rec/boRecord.dbd.pod
2647index 6b6d180..ad48070 100644
2648--- a/modules/database/src/std/rec/boRecord.dbd.pod
2649+++ b/modules/database/src/std/rec/boRecord.dbd.pod
2650@@ -210,6 +210,15 @@ information on these fields.
2651 =cut
2652
2653 include "dbCommon.dbd"
2654+ %
2655+ %/* Declare Device Support Entry Table */
2656+ %struct boRecord;
2657+ %typedef struct bodset {
2658+ % dset common; /*init_record returns:(0,2)=>(success,success no convert*/
2659+ % long (*write_bo)(struct boRecord *prec); /*returns: (-1,0)=>(failure,success)*/
2660+ %} bodset;
2661+ %#define HAS_bodset
2662+ %
2663 field(VAL,DBF_ENUM) {
2664 prompt("Current Value")
2665 promptgroup("50 - Output")
2666diff --git a/modules/database/src/std/rec/calcRecord.c b/modules/database/src/std/rec/calcRecord.c
2667index 12a58d1..d72792a 100644
2668--- a/modules/database/src/std/rec/calcRecord.c
2669+++ b/modules/database/src/std/rec/calcRecord.c
2670@@ -43,7 +43,7 @@
2671
2672 #define report NULL
2673 #define initialize NULL
2674-static long init_record(struct dbCommon *prec, int pass);
2675+static long init_record(struct dbCommon *pcommon, int pass);
2676 static long process(struct dbCommon *prec);
2677 static long special(DBADDR *paddr, int after);
2678 #define get_value NULL
2679diff --git a/modules/database/src/std/rec/calcoutRecord.c b/modules/database/src/std/rec/calcoutRecord.c
2680index d9f66af..75edcce 100644
2681--- a/modules/database/src/std/rec/calcoutRecord.c
2682+++ b/modules/database/src/std/rec/calcoutRecord.c
2683@@ -90,16 +90,6 @@ epicsExportAddress(int, calcoutODLYprecision);
2684 double calcoutODLYlimit = 100000;
2685 epicsExportAddress(double, calcoutODLYlimit);
2686
2687-typedef struct calcoutDSET {
2688- long number;
2689- DEVSUPFUN dev_report;
2690- DEVSUPFUN init;
2691- DEVSUPFUN init_record;
2692- DEVSUPFUN get_ioint_info;
2693- DEVSUPFUN write;
2694-}calcoutDSET;
2695-
2696-
2697 /* To provide feedback to the user as to the connection status of the
2698 * links (.INxV and .OUTV), the following algorithm has been implemented ...
2699 *
2700@@ -142,7 +132,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2701 double *pvalue;
2702 epicsEnum16 *plinkValid;
2703 short error_number;
2704- calcoutDSET *pcalcoutDSET;
2705+ calcoutdset *pcalcoutDSET;
2706 rpvtStruct *prpvt;
2707
2708 if (pass == 0) {
2709@@ -150,13 +140,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
2710 return 0;
2711 }
2712
2713- if (!(pcalcoutDSET = (calcoutDSET *)prec->dset)) {
2714+ if (!(pcalcoutDSET = (calcoutdset *)prec->dset)) {
2715 recGblRecordError(S_dev_noDSET, (void *)prec, "calcout:init_record");
2716 return S_dev_noDSET;
2717 }
2718
2719 /* must have write defined */
2720- if ((pcalcoutDSET->number < 5) || (pcalcoutDSET->write ==NULL)) {
2721+ if ((pcalcoutDSET->common.number < 5) || (pcalcoutDSET->write ==NULL)) {
2722 recGblRecordError(S_dev_missingSup, (void *)prec, "calcout:init_record");
2723 return S_dev_missingSup;
2724 }
2725@@ -221,7 +211,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2726
2727 prec->epvt = eventNameToHandle(prec->oevt);
2728
2729- if (pcalcoutDSET->init_record) pcalcoutDSET->init_record(prec);
2730+ if (pcalcoutDSET->common.init_record) pcalcoutDSET->common.init_record(pcommon);
2731 prec->pval = prec->val;
2732 prec->mlst = prec->val;
2733 prec->alst = prec->val;
2734@@ -768,7 +758,7 @@ static void checkLinks(calcoutRecord *prec)
2735
2736
2737 static long writeValue(calcoutRecord *prec)
2738 {
2739- calcoutDSET *pcalcoutDSET = (calcoutDSET *)prec->dset;
2740+ calcoutdset *pcalcoutDSET = (calcoutdset *)prec->dset;
2741
2742
2743 if (!pcalcoutDSET || !pcalcoutDSET->write) {
2744diff --git a/modules/database/src/std/rec/calcoutRecord.dbd.pod b/modules/database/src/std/rec/calcoutRecord.dbd.pod
2745index a59eaa3..2436cf0 100644
2746--- a/modules/database/src/std/rec/calcoutRecord.dbd.pod
2747+++ b/modules/database/src/std/rec/calcoutRecord.dbd.pod
2748@@ -659,6 +659,14 @@ manner for the VAL field.
2749 =cut
2750
2751 include "dbCommon.dbd"
2752+ %/* Declare Device Support Entry Table */
2753+ %struct calcoutRecord;
2754+ %typedef struct calcoutdset {
2755+ % dset common;
2756+ % long (*write)(struct calcoutRecord *prec);
2757+ %} calcoutdset;
2758+ %#define HAS_calcoutdset
2759+ %
2760 field(RPVT,DBF_NOACCESS) {
2761 prompt("Record Private")
2762 special(SPC_NOMOD)
2763diff --git a/modules/database/src/std/rec/eventRecord.c b/modules/database/src/std/rec/eventRecord.c
2764index c10c902..0d03cf3 100644
2765--- a/modules/database/src/std/rec/eventRecord.c
2766+++ b/modules/database/src/std/rec/eventRecord.c
2767@@ -80,14 +80,6 @@ rset eventRSET={
2768 };
2769 epicsExportAddress(rset,eventRSET);
2770
2771-struct eventdset { /* event input dset */
2772- long number;
2773- DEVSUPFUN dev_report;
2774- DEVSUPFUN init;
2775- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
2776- DEVSUPFUN get_ioint_info;
2777- DEVSUPFUN read_event;/*(0)=> success */
2778-};
2779 static void monitor(eventRecord *);
2780 static long readValue(eventRecord *);
2781
2782@@ -95,7 +87,7 @@ static long readValue(eventRecord *);
2783 static long init_record(struct dbCommon *pcommon, int pass)
2784 {
2785 struct eventRecord *prec = (struct eventRecord *)pcommon;
2786- struct eventdset *pdset;
2787+ eventdset *pdset;
2788 long status=0;
2789
2790 if (pass == 0) return 0;
2791@@ -103,8 +95,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
2792 recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
2793 recGblInitConstantLink(&prec->siol, DBF_STRING, &prec->sval);
2794
2795- if( (pdset=(struct eventdset *)(prec->dset)) && (pdset->init_record) )
2796- status=(*pdset->init_record)(prec);
2797+ if( (pdset=(eventdset *)(prec->dset)) && (pdset->common.init_record) )
2798+ status=(*pdset->common.init_record)(pcommon);
2799
2800 prec->epvt = eventNameToHandle(prec->val);
2801
2802@@ -114,11 +106,11 @@ static long init_record(struct dbCommon *pcommon, int pass)
2803 static long process(struct dbCommon *pcommon)
2804 {
2805 struct eventRecord *prec = (struct eventRecord *)pcommon;
2806- struct eventdset *pdset = (struct eventdset *)(prec->dset);
2807+ eventdset *pdset = (eventdset *)(prec->dset);
2808 long status=0;
2809 unsigned char pact=prec->pact;
2810
2811- if((pdset!=NULL) && (pdset->number >= 5) && pdset->read_event )
2812+ if((pdset!=NULL) && (pdset->common.number >= 5) && pdset->read_event )
2813 status=readValue(prec); /* read the new value */
2814 /* check if device support set pact */
2815 if ( !pact && prec->pact ) return(0);
2816@@ -173,7 +165,7 @@ static void monitor(eventRecord *prec)
2817
2818
2819 static long readValue(eventRecord *prec)
2820 {
2821- struct eventdset *pdset = (struct eventdset *) prec->dset;
2822+ eventdset *pdset = (eventdset *) prec->dset;
2823 long status = 0;
2824
2825 if (!prec->pact) {
2826diff --git a/modules/database/src/std/rec/eventRecord.dbd.pod b/modules/database/src/std/rec/eventRecord.dbd.pod
2827index c783e98..4004056 100644
2828--- a/modules/database/src/std/rec/eventRecord.dbd.pod
2829+++ b/modules/database/src/std/rec/eventRecord.dbd.pod
2830@@ -44,6 +44,16 @@ simulation mode parameters
2831 recordtype(event) {
2832 include "dbCommon.dbd"
2833
2834+ %
2835+ %/* Declare Device Support Entry Table */
2836+ %struct eventRecord;
2837+ %typedef struct eventdset {
2838+ % dset common; /*init_record returns: (-1,0)=>(failure,success)*/
2839+ % long (*read_event)(struct eventRecord *prec); /*(0)=> success */
2840+ %} eventdset;
2841+ %#define HAS_eventdset
2842+ %
2843+
2844 =head3 Scan Parameters
2845
2846 The event record has the standard fields for specifying under what circumstances
2847diff --git a/modules/database/src/std/rec/histogramRecord.c b/modules/database/src/std/rec/histogramRecord.c
2848index 82fc91a..1a42636 100644
2849--- a/modules/database/src/std/rec/histogramRecord.c
2850+++ b/modules/database/src/std/rec/histogramRecord.c
2851@@ -87,17 +87,6 @@ epicsExportAddress(rset,histogramRSET);
2852 int histogramSDELprecision = 2;
2853 epicsExportAddress(int, histogramSDELprecision);
2854
2855-struct histogramdset { /* histogram input dset */
2856- long number;
2857- DEVSUPFUN dev_report;
2858- DEVSUPFUN init;
2859- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
2860- DEVSUPFUN get_ioint_info;
2861- DEVSUPFUN read_histogram;/*(0,2)=> success and add_count, don't add_count)*/
2862- /* if add_count then sgnl added to array */
2863- DEVSUPFUN special_linconv;
2864-};
2865-
2866 /* control block for callback*/
2867 typedef struct myCallback {
2868 epicsCallback callback;
2869@@ -165,7 +154,7 @@ static long wdogInit(histogramRecord *prec)
2870 static long init_record(struct dbCommon *pcommon, int pass)
2871 {
2872 struct histogramRecord *prec = (struct histogramRecord *)pcommon;
2873- struct histogramdset *pdset;
2874+ histogramdset *pdset;
2875
2876 if (pass == 0) {
2877 /* allocate space for histogram array */
2878@@ -186,21 +175,21 @@ static long init_record(struct dbCommon *pcommon, int pass)
2879 recGblInitConstantLink(&prec->siol, DBF_DOUBLE, &prec->sval);
2880
2881 /* must have device support defined */
2882- pdset = (struct histogramdset *) prec->dset;
2883+ pdset = (histogramdset *) prec->dset;
2884 if (!pdset) {
2885 recGblRecordError(S_dev_noDSET, prec, "histogram: init_record");
2886 return S_dev_noDSET;
2887 }
2888
2889 /* must have read_histogram function defined */
2890- if (pdset->number < 6 || !pdset->read_histogram) {
2891+ if (pdset->common.number < 6 || !pdset->read_histogram) {
2892 recGblRecordError(S_dev_missingSup, prec, "histogram: init_record");
2893 return S_dev_missingSup;
2894 }
2895
2896 /* call device support init_record */
2897- if (pdset->init_record) {
2898- long status = pdset->init_record(prec);
2899+ if (pdset->common.init_record) {
2900+ long status = pdset->common.init_record(pcommon);
2901
2902 if (status)
2903 return status;
2904@@ -211,7 +200,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
2905 static long process(struct dbCommon *pcommon)
2906 {
2907 struct histogramRecord *prec = (struct histogramRecord *)pcommon;
2908- struct histogramdset *pdset = (struct histogramdset *) prec->dset;
2909+ histogramdset *pdset = (histogramdset *) prec->dset;
2910 int pact = prec->pact;
2911 long status;
2912
2913@@ -380,7 +369,7 @@ static long clear_histogram(histogramRecord *prec)
2914
2915 static long readValue(histogramRecord *prec)
2916 {
2917- struct histogramdset *pdset = (struct histogramdset *) prec->dset;
2918+ histogramdset *pdset = (histogramdset *) prec->dset;
2919 long status = 0;
2920
2921 if (!prec->pact) {
2922diff --git a/modules/database/src/std/rec/histogramRecord.dbd b/modules/database/src/std/rec/histogramRecord.dbd
2923index 304038b..e615d29 100644
2924--- a/modules/database/src/std/rec/histogramRecord.dbd
2925+++ b/modules/database/src/std/rec/histogramRecord.dbd
2926@@ -14,6 +14,16 @@ menu(histogramCMD) {
2927 }
2928 recordtype(histogram) {
2929 include "dbCommon.dbd"
2930+ %
2931+ %/* Declare Device Support Entry Table */
2932+ %struct histogramRecord;
2933+ %typedef struct histogramdset {
2934+ % dset common; /*init_record returns: (-1,0)=>(failure,success)*/
2935+ % long (*read_histogram)(struct histogramRecord *prec); /*(0,2)=> success and add_count, don't add_count); if add_count then sgnl added to array*/
2936+ % long (*special_linconv)(struct histogramRecord *prec, int after);
2937+ %} histogramdset;
2938+ %#define HAS_histogramdset
2939+ %
2940 field(VAL,DBF_NOACCESS) {
2941 prompt("Value")
2942 asl(ASL0)
2943diff --git a/modules/database/src/std/rec/int64inRecord.c b/modules/database/src/std/rec/int64inRecord.c
2944index 8ce2410..cb4d853 100644
2945--- a/modules/database/src/std/rec/int64inRecord.c
2946+++ b/modules/database/src/std/rec/int64inRecord.c
2947@@ -83,14 +83,6 @@ rset int64inRSET={
2948 epicsExportAddress(rset,int64inRSET);
2949
2950
2951-struct int64indset { /* int64in input dset */
2952- long number;
2953- DEVSUPFUN dev_report;
2954- DEVSUPFUN init;
2955- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
2956- DEVSUPFUN get_ioint_info;
2957- DEVSUPFUN read_int64in; /*returns: (-1,0)=>(failure,success)*/
2958-};
2959 static void checkAlarms(int64inRecord *prec, epicsTimeStamp *timeLast);
2960 static void monitor(int64inRecord *prec);
2961 static long readValue(int64inRecord *prec);
2962@@ -99,7 +91,7 @@ static long readValue(int64inRecord *prec);
2963 static long init_record(dbCommon *pcommon, int pass)
2964 {
2965 int64inRecord *prec = (int64inRecord*)pcommon;
2966- struct int64indset *pdset;
2967+ int64indset *pdset;
2968 long status;
2969
2970 if (pass == 0) return 0;
2971@@ -108,17 +100,17 @@ static long init_record(dbCommon *pcommon, int pass)
2972 recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
2973 recGblInitConstantLink(&prec->siol, DBF_INT64, &prec->sval);
2974
2975- if(!(pdset = (struct int64indset *)(prec->dset))) {
2976+ if(!(pdset = (int64indset *)(prec->dset))) {
2977 recGblRecordError(S_dev_noDSET,(void *)prec,"int64in: init_record");
2978 return(S_dev_noDSET);
2979 }
2980 /* must have read_int64in function defined */
2981- if( (pdset->number < 5) || (pdset->read_int64in == NULL) ) {
2982+ if ((pdset->common.number < 5) || (pdset->read_int64in == NULL)) {
2983 recGblRecordError(S_dev_missingSup,(void *)prec,"int64in: init_record");
2984 return(S_dev_missingSup);
2985 }
2986- if( pdset->init_record ) {
2987- if((status=(*pdset->init_record)(prec))) return(status);
2988+ if (pdset->common.init_record) {
2989+ if ((status = pdset->common.init_record(pcommon))) return status;
2990 }
2991 prec->mlst = prec->val;
2992 prec->alst = prec->val;
2993@@ -129,7 +121,7 @@ static long init_record(dbCommon *pcommon, int pass)
2994 static long process(dbCommon *pcommon)
2995 {
2996 int64inRecord *prec = (int64inRecord*)pcommon;
2997- struct int64indset *pdset = (struct int64indset *)(prec->dset);
2998+ int64indset *pdset = (int64indset *)(prec->dset);
2999 long status;
3000 unsigned char pact=prec->pact;
3001 epicsTimeStamp timeLast;
3002@@ -397,7 +389,7 @@ static void monitor(int64inRecord *prec)
3003
3004
3005 static long readValue(int64inRecord *prec)
3006 {
3007- struct int64indset *pdset = (struct int64indset *) prec->dset;
3008+ int64indset *pdset = (int64indset *) prec->dset;
3009 long status = 0;
3010
3011 if (!prec->pact) {
3012diff --git a/modules/database/src/std/rec/int64inRecord.dbd.pod b/modules/database/src/std/rec/int64inRecord.dbd.pod
3013index edb19a7..01dc289 100644
3014--- a/modules/database/src/std/rec/int64inRecord.dbd.pod
3015+++ b/modules/database/src/std/rec/int64inRecord.dbd.pod
3016@@ -111,6 +111,15 @@ monitoring deadband functionality.
3017 =cut
3018
3019 include "dbCommon.dbd"
3020+ %
3021+ %/* Declare Device Support Entry Table */
3022+ %struct int64inRecord;
3023+ %typedef struct int64indset {
3024+ % dset common;
3025+ % long (*read_int64in)(struct int64inRecord *prec);
3026+ %} int64indset;
3027+ %#define HAS_int64indset
3028+ %
3029 field(VAL,DBF_INT64) {
3030 prompt("Current value")
3031 promptgroup("40 - Input")
3032diff --git a/modules/database/src/std/rec/int64outRecord.c b/modules/database/src/std/rec/int64outRecord.c
3033index e9170f9..c90518e 100644
3034--- a/modules/database/src/std/rec/int64outRecord.c
3035+++ b/modules/database/src/std/rec/int64outRecord.c
3036@@ -80,14 +80,6 @@ rset int64outRSET={
3037 epicsExportAddress(rset,int64outRSET);
3038
3039
3040-struct int64outdset { /* int64out input dset */
3041- long number;
3042- DEVSUPFUN dev_report;
3043- DEVSUPFUN init;
3044- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
3045- DEVSUPFUN get_ioint_info;
3046- DEVSUPFUN write_int64out;/*(-1,0)=>(failure,success*/
3047-};
3048 static void checkAlarms(int64outRecord *prec);
3049 static void monitor(int64outRecord *prec);
3050 static long writeValue(int64outRecord *prec);
3051@@ -97,19 +89,19 @@ static void convert(int64outRecord *prec, epicsInt64 value);
3052 static long init_record(dbCommon *pcommon, int pass)
3053 {
3054 int64outRecord *prec = (int64outRecord*)pcommon;
3055- struct int64outdset *pdset;
3056+ int64outdset *pdset;
3057 long status=0;
3058
3059 if (pass == 0) return 0;
3060
3061 recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
3062
3063- if(!(pdset = (struct int64outdset *)(prec->dset))) {
3064+ if(!(pdset = (int64outdset *)(prec->dset))) {
3065 recGblRecordError(S_dev_noDSET,(void *)prec,"int64out: init_record");
3066 return(S_dev_noDSET);
3067 }
3068 /* must have write_int64out functions defined */
3069- if( (pdset->number < 5) || (pdset->write_int64out == NULL) ) {
3070+ if ((pdset->common.number < 5) || (pdset->write_int64out == NULL)) {
3071 recGblRecordError(S_dev_missingSup,(void *)prec,"int64out: init_record");
3072 return(S_dev_missingSup);
3073 }
3074@@ -117,8 +109,8 @@ static long init_record(dbCommon *pcommon, int pass)
3075 if(recGblInitConstantLink(&prec->dol,DBF_INT64,&prec->val))
3076 prec->udf=FALSE;
3077 }
3078- if( pdset->init_record ) {
3079- if((status=(*pdset->init_record)(prec))) return(status);
3080+ if (pdset->common.init_record) {
3081+ if ((status = pdset->common.init_record(pcommon))) return status;
3082 }
3083 prec->mlst = prec->val;
3084 prec->alst = prec->val;
3085@@ -129,7 +121,7 @@ static long init_record(dbCommon *pcommon, int pass)
3086 static long process(dbCommon *pcommon)
3087 {
3088 int64outRecord *prec = (int64outRecord*)pcommon;
3089- struct int64outdset *pdset = (struct int64outdset *)(prec->dset);
3090+ int64outdset *pdset = (int64outdset *)(prec->dset);
3091 long status=0;
3092 epicsInt64 value;
3093 unsigned char pact=prec->pact;
3094@@ -377,7 +369,7 @@ static void monitor(int64outRecord *prec)
3095
3096 static long writeValue(int64outRecord *prec)
3097 {
3098- struct int64outdset *pdset = (struct int64outdset *) prec->dset;
3099+ int64outdset *pdset = (int64outdset *) prec->dset;
3100 long status = 0;
3101
3102 if (!prec->pact) {
3103diff --git a/modules/database/src/std/rec/int64outRecord.dbd.pod b/modules/database/src/std/rec/int64outRecord.dbd.pod
3104index 1b5003e..78244fb 100644
3105--- a/modules/database/src/std/rec/int64outRecord.dbd.pod
3106+++ b/modules/database/src/std/rec/int64outRecord.dbd.pod
3107@@ -137,6 +137,15 @@ monitoring deadband functionality.
3108 =cut
3109
3110 include "dbCommon.dbd"
3111+ %
3112+ %/* Declare Device Support Entry Table */
3113+ %struct int64outRecord;
3114+ %typedef struct int64outdset {
3115+ % dset common;
3116+ % long (*write_int64out)(struct int64outRecord *prec);
3117+ %} int64outdset;
3118+ %#define HAS_int64outdset
3119+ %
3120 field(VAL,DBF_INT64) {
3121 prompt("Desired Output")
3122 promptgroup("50 - Output")
3123diff --git a/modules/database/src/std/rec/longinRecord.c b/modules/database/src/std/rec/longinRecord.c
3124index d524641..299cfb8 100644
3125--- a/modules/database/src/std/rec/longinRecord.c
3126+++ b/modules/database/src/std/rec/longinRecord.c
3127@@ -83,15 +83,6 @@ rset longinRSET={
3128 };
3129 epicsExportAddress(rset,longinRSET);
3130
3131-
3132-struct longindset { /* longin input dset */
3133- long number;
3134- DEVSUPFUN dev_report;
3135- DEVSUPFUN init;
3136- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
3137- DEVSUPFUN get_ioint_info;
3138- DEVSUPFUN read_longin; /*returns: (-1,0)=>(failure,success)*/
3139-};
3140 static void checkAlarms(longinRecord *prec, epicsTimeStamp *timeLast);
3141 static void monitor(longinRecord *prec);
3142 static long readValue(longinRecord *prec);
3143@@ -100,7 +91,7 @@ static long readValue(longinRecord *prec);
3144 static long init_record(struct dbCommon *pcommon, int pass)
3145 {
3146 struct longinRecord *prec = (struct longinRecord *)pcommon;
3147- struct longindset *pdset = (struct longindset *) prec->dset;
3148+ longindset *pdset = (longindset *) prec->dset;
3149
3150 if (pass == 0) return 0;
3151
3152@@ -113,13 +104,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
3153 }
3154
3155 /* must have read_longin function defined */
3156- if ((pdset->number < 5) || (pdset->read_longin == NULL)) {
3157+ if ((pdset->common.number < 5) || (pdset->read_longin == NULL)) {
3158 recGblRecordError(S_dev_missingSup, prec, "longin: init_record");
3159 return S_dev_missingSup;
3160 }
3161
3162- if (pdset->init_record) {
3163- long status = pdset->init_record(prec);
3164+ if (pdset->common.init_record) {
3165+ long status = pdset->common.init_record(pcommon);
3166
3167 if (status)
3168 return status;
3169@@ -134,7 +125,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3170 static long process(struct dbCommon *pcommon)
3171 {
3172 struct longinRecord *prec = (struct longinRecord *)pcommon;
3173- struct longindset *pdset = (struct longindset *)(prec->dset);
3174+ longindset *pdset = (longindset *)(prec->dset);
3175 long status;
3176 unsigned char pact=prec->pact;
3177 epicsTimeStamp timeLast;
3178@@ -405,7 +396,7 @@ static void monitor(longinRecord *prec)
3179
3180
3181 static long readValue(longinRecord *prec)
3182 {
3183- struct longindset *pdset = (struct longindset *) prec->dset;
3184+ longindset *pdset = (longindset *) prec->dset;
3185 long status = 0;
3186
3187 if (!prec->pact) {
3188diff --git a/modules/database/src/std/rec/longinRecord.dbd.pod b/modules/database/src/std/rec/longinRecord.dbd.pod
3189index cf2a3a3..51f74bc 100644
3190--- a/modules/database/src/std/rec/longinRecord.dbd.pod
3191+++ b/modules/database/src/std/rec/longinRecord.dbd.pod
3192@@ -305,6 +305,15 @@ sets UDF to FALSE. read_longin returns the status of C<recGblGetLinkValue>.
3193 =cut
3194
3195 include "dbCommon.dbd"
3196+ %
3197+ %/* Declare Device Support Entry Table */
3198+ %struct longinRecord;
3199+ %typedef struct longindset {
3200+ % dset common; /*init_record returns: (-1,0)=>(failure,success)*/
3201+ % long (*read_longin)(struct longinRecord *prec); /*returns: (-1,0)=>(failure,success)*/
3202+ %} longindset;
3203+ %#define HAS_longindset
3204+ %
3205 field(VAL,DBF_LONG) {
3206 prompt("Current value")
3207 promptgroup("40 - Input")
3208diff --git a/modules/database/src/std/rec/longoutRecord.c b/modules/database/src/std/rec/longoutRecord.c
3209index 06e3b6e..238fb69 100644
3210--- a/modules/database/src/std/rec/longoutRecord.c
3211+++ b/modules/database/src/std/rec/longoutRecord.c
3212@@ -80,15 +80,6 @@ rset longoutRSET={
3213 };
3214 epicsExportAddress(rset,longoutRSET);
3215
3216-
3217-struct longoutdset { /* longout input dset */
3218- long number;
3219- DEVSUPFUN dev_report;
3220- DEVSUPFUN init;
3221- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
3222- DEVSUPFUN get_ioint_info;
3223- DEVSUPFUN write_longout;/*(-1,0)=>(failure,success*/
3224-};
3225 static void checkAlarms(longoutRecord *prec);
3226 static void monitor(longoutRecord *prec);
3227 static long writeValue(longoutRecord *prec);
3228@@ -97,7 +88,7 @@ static void convert(longoutRecord *prec, epicsInt32 value);
3229 static long init_record(struct dbCommon *pcommon, int pass)
3230 {
3231 struct longoutRecord *prec = (struct longoutRecord *)pcommon;
3232- struct longoutdset *pdset = (struct longoutdset *) prec->dset;
3233+ longoutdset *pdset = (longoutdset *) prec->dset;
3234
3235 if (pass == 0) return 0;
3236
3237@@ -109,7 +100,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3238 }
3239
3240 /* must have write_longout functions defined */
3241- if ((pdset->number < 5) || (pdset->write_longout == NULL)) {
3242+ if ((pdset->common.number < 5) || (pdset->write_longout == NULL)) {
3243 recGblRecordError(S_dev_missingSup, prec, "longout: init_record");
3244 return S_dev_missingSup;
3245 }
3246@@ -117,8 +108,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
3247 if (recGblInitConstantLink(&prec->dol, DBF_LONG, &prec->val))
3248 prec->udf=FALSE;
3249
3250- if (pdset->init_record) {
3251- long status = pdset->init_record(prec);
3252+ if (pdset->common.init_record) {
3253+ long status = pdset->common.init_record(pcommon);
3254
3255 if (status)
3256 return status;
3257@@ -133,7 +124,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3258 static long process(struct dbCommon *pcommon)
3259 {
3260 struct longoutRecord *prec = (struct longoutRecord *)pcommon;
3261- struct longoutdset *pdset = (struct longoutdset *)(prec->dset);
3262+ longoutdset *pdset = (longoutdset *)(prec->dset);
3263 long status=0;
3264 epicsInt32 value;
3265 unsigned char pact=prec->pact;
3266@@ -382,7 +373,7 @@ static void monitor(longoutRecord *prec)
3267
3268
3269 static long writeValue(longoutRecord *prec)
3270 {
3271- struct longoutdset *pdset = (struct longoutdset *) prec->dset;
3272+ longoutdset *pdset = (longoutdset *) prec->dset;
3273 long status = 0;
3274
3275 if (!prec->pact) {
3276diff --git a/modules/database/src/std/rec/longoutRecord.dbd.pod b/modules/database/src/std/rec/longoutRecord.dbd.pod
3277index 276f304..f5e8b75 100644
3278--- a/modules/database/src/std/rec/longoutRecord.dbd.pod
3279+++ b/modules/database/src/std/rec/longoutRecord.dbd.pod
3280@@ -96,6 +96,15 @@ and database links.
3281 =cut
3282
3283 include "dbCommon.dbd"
3284+ %
3285+ %/* Declare Device Support Entry Table */
3286+ %struct longoutRecord;
3287+ %typedef struct longoutdset {
3288+ % dset common; /*init_record returns: (-1,0)=>(failure,success)*/
3289+ % long (*write_longout)(struct longoutRecord *prec); /*(-1,0)=>(failure,success*/
3290+ %} longoutdset;
3291+ %#define HAS_longoutdset
3292+ %
3293 field(VAL,DBF_LONG) {
3294 prompt("Desired Output")
3295 promptgroup("50 - Output")
3296diff --git a/modules/database/src/std/rec/lsiRecord.c b/modules/database/src/std/rec/lsiRecord.c
3297index 7396946..6d5b9db 100644
3298--- a/modules/database/src/std/rec/lsiRecord.c
3299+++ b/modules/database/src/std/rec/lsiRecord.c
3300@@ -66,13 +66,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
3301 }
3302
3303 /* must have a read_string function */
3304- if (pdset->number < 5 || !pdset->read_string) {
3305+ if (pdset->common.number < 5 || !pdset->read_string) {
3306 recGblRecordError(S_dev_missingSup, prec, "lsi: init_record");
3307 return S_dev_missingSup;
3308 }
3309
3310- if (pdset->init_record) {
3311- long status = pdset->init_record(prec);
3312+ if (pdset->common.init_record) {
3313+ long status = pdset->common.init_record(pcommon);
3314
3315 if (status)
3316 return status;
3317@@ -221,7 +221,7 @@ static void monitor(lsiRecord *prec)
3318
3319 static long readValue(lsiRecord *prec)
3320 {
3321- struct lsidset *pdset = (struct lsidset *) prec->dset;
3322+ lsidset *pdset = (lsidset *) prec->dset;
3323 long status = 0;
3324
3325 if (!prec->pact) {
3326diff --git a/modules/database/src/std/rec/lsiRecord.dbd b/modules/database/src/std/rec/lsiRecord.dbd
3327index 21f2ba4..4bc3080 100644
3328--- a/modules/database/src/std/rec/lsiRecord.dbd
3329+++ b/modules/database/src/std/rec/lsiRecord.dbd
3330@@ -7,17 +7,14 @@
3331
3332 recordtype(lsi) {
3333 include "dbCommon.dbd"
3334- %#include "devSup.h"
3335 %
3336 %/* Declare Device Support Entry Table */
3337+ %struct lsiRecord;
3338 %typedef struct lsidset {
3339- % long number;
3340- % DEVSUPFUN report;
3341- % DEVSUPFUN init;
3342- % DEVSUPFUN init_record;
3343- % DEVSUPFUN get_ioint_info;
3344- % DEVSUPFUN read_string;
3345+ % dset common;
3346+ % long (*read_string)(struct lsiRecord *prec);
3347 %} lsidset;
3348+ %#define HAS_lsidset
3349 %
3350 field(VAL,DBF_NOACCESS) {
3351 prompt("Current Value")
3352diff --git a/modules/database/src/std/rec/lsoRecord.c b/modules/database/src/std/rec/lsoRecord.c
3353index 9485e38..4fa6bb7 100644
3354--- a/modules/database/src/std/rec/lsoRecord.c
3355+++ b/modules/database/src/std/rec/lsoRecord.c
3356@@ -70,15 +70,15 @@ static long init_record(struct dbCommon *pcommon, int pass)
3357 }
3358
3359 /* must have a write_string function defined */
3360- if (pdset->number < 5 || !pdset->write_string) {
3361+ if (pdset->common.number < 5 || !pdset->write_string) {
3362 recGblRecordError(S_dev_missingSup, prec, "lso: init_record");
3363 return S_dev_missingSup;
3364 }
3365
3366 dbLoadLinkLS(&prec->dol, prec->val, prec->sizv, &prec->len);
3367
3368- if (pdset->init_record) {
3369- long status = pdset->init_record(prec);
3370+ if (pdset->common.init_record) {
3371+ long status = pdset->common.init_record(pcommon);
3372
3373 if (status)
3374 return status;
3375diff --git a/modules/database/src/std/rec/lsoRecord.dbd b/modules/database/src/std/rec/lsoRecord.dbd
3376index 880139a..345885e 100644
3377--- a/modules/database/src/std/rec/lsoRecord.dbd
3378+++ b/modules/database/src/std/rec/lsoRecord.dbd
3379@@ -7,17 +7,14 @@
3380
3381 recordtype(lso) {
3382 include "dbCommon.dbd"
3383- %#include "devSup.h"
3384 %
3385 %/* Declare Device Support Entry Table */
3386+ %struct lsoRecord;
3387 %typedef struct lsodset {
3388- % long number;
3389- % DEVSUPFUN report;
3390- % DEVSUPFUN init;
3391- % DEVSUPFUN init_record;
3392- % DEVSUPFUN get_ioint_info;
3393- % DEVSUPFUN write_string;
3394+ % dset common;
3395+ % long (*write_string)(struct lsoRecord *prec);
3396 %} lsodset;
3397+ %#define HAS_lsodset
3398 %
3399 field(VAL,DBF_NOACCESS) {
3400 prompt("Current Value")
3401diff --git a/modules/database/src/std/rec/mbbiDirectRecord.c b/modules/database/src/std/rec/mbbiDirectRecord.c
3402index 88d805c..d351511 100644
3403--- a/modules/database/src/std/rec/mbbiDirectRecord.c
3404+++ b/modules/database/src/std/rec/mbbiDirectRecord.c
3405@@ -81,15 +81,6 @@ rset mbbiDirectRSET={
3406 };
3407 epicsExportAddress(rset,mbbiDirectRSET);
3408
3409-struct mbbidset { /* multi bit binary input dset */
3410- long number;
3411- DEVSUPFUN dev_report;
3412- DEVSUPFUN init;
3413- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure, success)*/
3414- DEVSUPFUN get_ioint_info;
3415- DEVSUPFUN read_mbbi; /*returns: (0,2)=>(success, success no convert)*/
3416-};
3417-
3418 static void monitor(mbbiDirectRecord *);
3419 static long readValue(mbbiDirectRecord *);
3420
3421@@ -98,7 +89,7 @@ static long readValue(mbbiDirectRecord *);
3422 static long init_record(struct dbCommon *pcommon, int pass)
3423 {
3424 struct mbbiDirectRecord *prec = (struct mbbiDirectRecord *)pcommon;
3425- struct mbbidset *pdset = (struct mbbidset *) prec->dset;
3426+ mbbidirectdset *pdset = (mbbidirectdset *) prec->dset;
3427 long status = 0;
3428
3429 if (pass == 0) return 0;
3430@@ -108,7 +99,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3431 return S_dev_noDSET;
3432 }
3433
3434- if ((pdset->number < 5) || (pdset->read_mbbi == NULL)) {
3435+ if ((pdset->common.number < 5) || (pdset->read_mbbi == NULL)) {
3436 recGblRecordError(S_dev_missingSup, prec, "mbbiDirect: init_record");
3437 return S_dev_missingSup;
3438 }
3439@@ -120,8 +111,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
3440 if (prec->mask == 0 && prec->nobt <= 32)
3441 prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
3442
3443- if (pdset->init_record) {
3444- status = pdset->init_record(prec);
3445+ if (pdset->common.init_record) {
3446+ status = pdset->common.init_record(pcommon);
3447 if (status == 0) {
3448 epicsUInt32 val = prec->val;
3449 epicsUInt8 *pBn = &prec->b0;
3450@@ -141,7 +132,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3451 static long process(struct dbCommon *pcommon)
3452 {
3453 struct mbbiDirectRecord *prec = (struct mbbiDirectRecord *)pcommon;
3454- struct mbbidset *pdset = (struct mbbidset *) prec->dset;
3455+ mbbidirectdset *pdset = (mbbidirectdset *) prec->dset;
3456 long status;
3457 int pact = prec->pact;
3458
3459@@ -248,7 +239,7 @@ static void monitor(mbbiDirectRecord *prec)
3460
3461 static long readValue(mbbiDirectRecord *prec)
3462 {
3463- struct mbbidset *pdset = (struct mbbidset *) prec->dset;
3464+ mbbidirectdset *pdset = (mbbidirectdset *) prec->dset;
3465 long status = 0;
3466
3467 if (!prec->pact) {
3468diff --git a/modules/database/src/std/rec/mbbiDirectRecord.dbd.pod b/modules/database/src/std/rec/mbbiDirectRecord.dbd.pod
3469index 5b1c4da..fa5d40f 100644
3470--- a/modules/database/src/std/rec/mbbiDirectRecord.dbd.pod
3471+++ b/modules/database/src/std/rec/mbbiDirectRecord.dbd.pod
3472@@ -85,6 +85,14 @@ description (DESC) fields.
3473 =cut
3474
3475 include "dbCommon.dbd"
3476+ %/* Declare Device Support Entry Table */
3477+ %struct mbbiDirectRecord;
3478+ %typedef struct mbbidirectdset {
3479+ % dset common; /* init_record returns: (-1,0) => (failure, success)*/
3480+ % long (*read_mbbi)(struct mbbiDirectRecord *prec); /* (0, 2) => (success, success no convert)*/
3481+ %} mbbidirectdset;
3482+ %#define HAS_mbbidirectdset
3483+ %
3484 field(VAL,DBF_LONG) {
3485 prompt("Current Value")
3486 promptgroup("40 - Input")
3487diff --git a/modules/database/src/std/rec/mbbiRecord.c b/modules/database/src/std/rec/mbbiRecord.c
3488index 0202594..ba24d52 100644
3489--- a/modules/database/src/std/rec/mbbiRecord.c
3490+++ b/modules/database/src/std/rec/mbbiRecord.c
3491@@ -83,15 +83,6 @@ rset mbbiRSET = {
3492 };
3493 epicsExportAddress(rset,mbbiRSET);
3494
3495-struct mbbidset { /* multi bit binary input dset */
3496- long number;
3497- DEVSUPFUN dev_report;
3498- DEVSUPFUN init;
3499- DEVSUPFUN init_record; /* returns: (-1,0) => (failure, success)*/
3500- DEVSUPFUN get_ioint_info;
3501- DEVSUPFUN read_mbbi;/* (0, 2) => (success, success no convert)*/
3502-};
3503-
3504 static void checkAlarms(mbbiRecord *, epicsTimeStamp *);
3505 static void monitor(mbbiRecord *);
3506 static long readValue(mbbiRecord *);
3507@@ -115,18 +106,17 @@ static void init_common(mbbiRecord *prec)
3508 static long init_record(struct dbCommon *pcommon, int pass)
3509 {
3510 struct mbbiRecord *prec = (struct mbbiRecord *)pcommon;
3511- struct mbbidset *pdset = (struct mbbidset *) prec->dset;
3512+ mbbidset *pdset = (mbbidset *) prec->dset;
3513 long status = 0;
3514
3515 if (pass == 0) return 0;
3516
3517- pdset = (struct mbbidset *) prec->dset;
3518 if (!pdset) {
3519 recGblRecordError(S_dev_noDSET, prec, "mbbi: init_record");
3520 return S_dev_noDSET;
3521 }
3522
3523- if ((pdset->number < 5) || (pdset->read_mbbi == NULL)) {
3524+ if ((pdset->common.number < 5) || (pdset->read_mbbi == NULL)) {
3525 recGblRecordError(S_dev_missingSup, prec, "mbbi: init_record");
3526 return S_dev_missingSup;
3527 }
3528@@ -138,8 +128,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
3529 if (prec->mask == 0 && prec->nobt <= 32)
3530 prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
3531
3532- if (pdset->init_record)
3533- status = pdset->init_record(prec);
3534+ if (pdset->common.init_record)
3535+ status = pdset->common.init_record(pcommon);
3536
3537 init_common(prec);
3538
3539@@ -152,7 +142,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3540 static long process(struct dbCommon *pcommon)
3541 {
3542 struct mbbiRecord *prec = (struct mbbiRecord *)pcommon;
3543- struct mbbidset *pdset = (struct mbbidset *) prec->dset;
3544+ mbbidset *pdset = (mbbidset *) prec->dset;
3545 long status;
3546 int pact = prec->pact;
3547 epicsTimeStamp timeLast;
3548@@ -380,7 +370,7 @@ static void monitor(mbbiRecord *prec)
3549
3550 static long readValue(mbbiRecord *prec)
3551 {
3552- struct mbbidset *pdset = (struct mbbidset *) prec->dset;
3553+ mbbidset *pdset = (mbbidset *) prec->dset;
3554 long status = 0;
3555
3556 if (!prec->pact) {
3557diff --git a/modules/database/src/std/rec/mbbiRecord.dbd.pod b/modules/database/src/std/rec/mbbiRecord.dbd.pod
3558index b4ab1b4..5f0e08e 100644
3559--- a/modules/database/src/std/rec/mbbiRecord.dbd.pod
3560+++ b/modules/database/src/std/rec/mbbiRecord.dbd.pod
3561@@ -119,6 +119,14 @@ description (DESC) fields.
3562 =cut
3563
3564 include "dbCommon.dbd"
3565+ %/* Declare Device Support Entry Table */
3566+ %struct mbbiRecord;
3567+ %typedef struct mbbidset {
3568+ % dset common; /* init_record returns: (-1,0) => (failure, success)*/
3569+ % long (*read_mbbi)(struct mbbiRecord *prec); /* (0, 2) => (success, success no convert)*/
3570+ %} mbbidset;
3571+ %#define HAS_mbbidset
3572+ %
3573 field(VAL,DBF_ENUM) {
3574 prompt("Current Value")
3575 promptgroup("40 - Input")
3576diff --git a/modules/database/src/std/rec/mbboDirectRecord.c b/modules/database/src/std/rec/mbboDirectRecord.c
3577index 5c2dd94..2f92819 100644
3578--- a/modules/database/src/std/rec/mbboDirectRecord.c
3579+++ b/modules/database/src/std/rec/mbboDirectRecord.c
3580@@ -81,16 +81,6 @@ rset mbboDirectRSET = {
3581 };
3582 epicsExportAddress(rset, mbboDirectRSET);
3583
3584-struct mbbodset { /* multi bit binary output dset */
3585- long number;
3586- DEVSUPFUN dev_report;
3587- DEVSUPFUN init;
3588- DEVSUPFUN init_record; /*returns: (0, 2)=>(success, success no convert)*/
3589- DEVSUPFUN get_ioint_info;
3590- DEVSUPFUN write_mbbo; /*returns: (0, 2)=>(success, success no convert)*/
3591-};
3592-
3593-
3594 static void convert(mbboDirectRecord *);
3595 static void monitor(mbboDirectRecord *);
3596 static long writeValue(mbboDirectRecord *);
3597@@ -100,7 +90,7 @@ static long writeValue(mbboDirectRecord *);
3598 static long init_record(struct dbCommon *pcommon, int pass)
3599 {
3600 struct mbboDirectRecord *prec = (struct mbboDirectRecord *)pcommon;
3601- struct mbbodset *pdset = (struct mbbodset *) prec->dset;
3602+ mbbodirectdset *pdset = (mbbodirectdset *) prec->dset;
3603 long status = 0;
3604
3605 if (pass == 0) return 0;
3606@@ -110,7 +100,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3607 return S_dev_noDSET;
3608 }
3609
3610- if ((pdset->number < 5) || (pdset->write_mbbo == NULL)) {
3611+ if ((pdset->common.number < 5) || (pdset->write_mbbo == NULL)) {
3612 recGblRecordError(S_dev_missingSup, prec, "mbboDirect: init_record");
3613 return S_dev_missingSup;
3614 }
3615@@ -124,8 +114,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
3616 if (prec->mask == 0 && prec->nobt <= 32)
3617 prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
3618
3619- if (pdset->init_record) {
3620- status = pdset->init_record(prec);
3621+ if (pdset->common.init_record) {
3622+ status = pdset->common.init_record(pcommon);
3623 if (status == 0) {
3624 /* Convert initial read-back */
3625 epicsUInt32 rval = prec->rval;
3626@@ -162,7 +152,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3627 static long process(struct dbCommon *pcommon)
3628 {
3629 struct mbboDirectRecord *prec = (struct mbboDirectRecord *)pcommon;
3630- struct mbbodset *pdset = (struct mbbodset *)(prec->dset);
3631+ mbbodirectdset *pdset = (mbbodirectdset *)(prec->dset);
3632 long status = 0;
3633 int pact = prec->pact;
3634
3635@@ -356,7 +346,7 @@ static void convert(mbboDirectRecord *prec)
3636
3637 static long writeValue(mbboDirectRecord *prec)
3638 {
3639- struct mbbodset *pdset = (struct mbbodset *) prec->dset;
3640+ mbbodirectdset *pdset = (mbbodirectdset *) prec->dset;
3641 long status = 0;
3642
3643 if (!prec->pact) {
3644diff --git a/modules/database/src/std/rec/mbboDirectRecord.dbd.pod b/modules/database/src/std/rec/mbboDirectRecord.dbd.pod
3645index ca49bcd..01402db 100644
3646--- a/modules/database/src/std/rec/mbboDirectRecord.dbd.pod
3647+++ b/modules/database/src/std/rec/mbboDirectRecord.dbd.pod
3648@@ -90,6 +90,14 @@ description (DESC) fields.
3649 =cut
3650
3651 include "dbCommon.dbd"
3652+ %/* Declare Device Support Entry Table */
3653+ %struct mbboDirectRecord;
3654+ %typedef struct mbbodirectdset {
3655+ % dset common; /*init_record returns: (0, 2)=>(success, success no convert)*/
3656+ % long (*write_mbbo)(struct mbboDirectRecord *prec); /*returns: (0, 2)=>(success, success no convert)*/
3657+ %} mbbodirectdset;
3658+ %#define HAS_mbbodirectdset
3659+ %
3660 field(VAL,DBF_LONG) {
3661 prompt("Word")
3662 promptgroup("50 - Output")
3663diff --git a/modules/database/src/std/rec/mbboRecord.c b/modules/database/src/std/rec/mbboRecord.c
3664index 2488552..b54988d 100644
3665--- a/modules/database/src/std/rec/mbboRecord.c
3666+++ b/modules/database/src/std/rec/mbboRecord.c
3667@@ -82,15 +82,6 @@ rset mbboRSET = {
3668 };
3669 epicsExportAddress(rset,mbboRSET);
3670
3671-struct mbbodset { /* multi bit binary output dset */
3672- long number;
3673- DEVSUPFUN dev_report;
3674- DEVSUPFUN init;
3675- DEVSUPFUN init_record; /*returns: (0, 2) => (success, success no convert)*/
3676- DEVSUPFUN get_ioint_info;
3677- DEVSUPFUN write_mbbo; /*returns: (0, 2) => (success, success no convert)*/
3678-};
3679-
3680
3681 static void checkAlarms(mbboRecord *);
3682 static void convert(mbboRecord *);
3683@@ -117,7 +108,7 @@ static void init_common(mbboRecord *prec)
3684 static long init_record(struct dbCommon *pcommon, int pass)
3685 {
3686 struct mbboRecord *prec = (struct mbboRecord *)pcommon;
3687- struct mbbodset *pdset;
3688+ mbbodset *pdset;
3689 long status;
3690
3691 if (pass == 0) {
3692@@ -125,13 +116,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
3693 return 0;
3694 }
3695
3696- pdset = (struct mbbodset *) prec->dset;
3697+ pdset = (mbbodset *) prec->dset;
3698 if (!pdset) {
3699 recGblRecordError(S_dev_noDSET, prec, "mbbo: init_record");
3700 return S_dev_noDSET;
3701 }
3702
3703- if ((pdset->number < 5) || (pdset->write_mbbo == NULL)) {
3704+ if ((pdset->common.number < 5) || (pdset->write_mbbo == NULL)) {
3705 recGblRecordError(S_dev_missingSup, prec, "mbbo: init_record");
3706 return S_dev_missingSup;
3707 }
3708@@ -145,8 +136,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
3709 if (prec->mask == 0 && prec->nobt <= 32)
3710 prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
3711
3712- if (pdset->init_record) {
3713- status = pdset->init_record(prec);
3714+ if (pdset->common.init_record) {
3715+ status = pdset->common.init_record(pcommon);
3716 init_common(prec);
3717 if (status == 0) {
3718 /* Convert initial read-back */
3719@@ -194,7 +185,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3720 static long process(struct dbCommon *pcommon)
3721 {
3722 struct mbboRecord *prec = (struct mbboRecord *)pcommon;
3723- struct mbbodset *pdset = (struct mbbodset *) prec->dset;
3724+ mbbodset *pdset = (mbbodset *) prec->dset;
3725 long status = 0;
3726 int pact = prec->pact;
3727
3728@@ -439,7 +430,7 @@ static void convert(mbboRecord *prec)
3729
3730 static long writeValue(mbboRecord *prec)
3731 {
3732- struct mbbodset *pdset = (struct mbbodset *) prec->dset;
3733+ mbbodset *pdset = (mbbodset *) prec->dset;
3734 long status = 0;
3735
3736 if (!prec->pact) {
3737diff --git a/modules/database/src/std/rec/mbboRecord.dbd.pod b/modules/database/src/std/rec/mbboRecord.dbd.pod
3738index 2196aa5..ff5cd7e 100644
3739--- a/modules/database/src/std/rec/mbboRecord.dbd.pod
3740+++ b/modules/database/src/std/rec/mbboRecord.dbd.pod
3741@@ -173,6 +173,14 @@ mode fields.
3742 =cut
3743
3744 include "dbCommon.dbd"
3745+ %/* Declare Device Support Entry Table */
3746+ %struct mbboRecord;
3747+ %typedef struct mbbodset {
3748+ % dset common; /*init_record returns: (0, 2) => (success, success no convert)*/
3749+ % long (*write_mbbo)(struct mbboRecord *prec); /*returns: (0, 2) => (success, success no convert)*/
3750+ %} mbbodset;
3751+ %#define HAS_mbbodset
3752+ %
3753 field(VAL,DBF_ENUM) {
3754 prompt("Desired Value")
3755 promptgroup("50 - Output")
3756diff --git a/modules/database/src/std/rec/printfRecord.c b/modules/database/src/std/rec/printfRecord.c
3757index 576b963..8a8edb1 100644
3758--- a/modules/database/src/std/rec/printfRecord.c
3759+++ b/modules/database/src/std/rec/printfRecord.c
3760@@ -336,13 +336,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
3761 if (!pdset)
3762 return 0; /* Device support is optional */
3763
3764- if (pdset->number < 5) {
3765+ if (pdset->common.number < 5) {
3766 recGblRecordError(S_dev_missingSup, prec, "printf::init_record");
3767 return S_dev_missingSup;
3768 }
3769
3770- if (pdset->init_record) {
3771- long status = pdset->init_record(prec);
3772+ if (pdset->common.init_record) {
3773+ long status = pdset->common.init_record(pcommon);
3774 if (status)
3775 return status;
3776 }
3777@@ -368,7 +368,7 @@ static long process(struct dbCommon *pcommon)
3778 /* Call device support */
3779 pdset = (printfdset *) prec->dset;
3780 if (pdset &&
3781- pdset->number >= 5 &&
3782+ pdset->common.number >= 5 &&
3783 pdset->write_string) {
3784 status = pdset->write_string(prec);
3785
3786diff --git a/modules/database/src/std/rec/printfRecord.dbd b/modules/database/src/std/rec/printfRecord.dbd
3787index 4fd63ef..b13608f 100644
3788--- a/modules/database/src/std/rec/printfRecord.dbd
3789+++ b/modules/database/src/std/rec/printfRecord.dbd
3790@@ -7,17 +7,14 @@
3791
3792 recordtype(printf) {
3793 include "dbCommon.dbd"
3794- %#include "devSup.h"
3795 %
3796 %/* Declare Device Support Entry Table */
3797+ %struct printfRecord;
3798 %typedef struct printfdset {
3799- % long number;
3800- % DEVSUPFUN report;
3801- % DEVSUPFUN init;
3802- % DEVSUPFUN init_record;
3803- % DEVSUPFUN get_ioint_info;
3804- % DEVSUPFUN write_string;
3805+ % dset common;
3806+ % long (*write_string)(struct printfRecord *prec);
3807 %} printfdset;
3808+ %#define HAS_printfdset
3809 %
3810 field(VAL,DBF_NOACCESS) {
3811 prompt("Result")
3812diff --git a/modules/database/src/std/rec/stringinRecord.c b/modules/database/src/std/rec/stringinRecord.c
3813index fdc1f26..3c67762 100644
3814--- a/modules/database/src/std/rec/stringinRecord.c
3815+++ b/modules/database/src/std/rec/stringinRecord.c
3816@@ -80,14 +80,6 @@ rset stringinRSET={
3817 };
3818 epicsExportAddress(rset,stringinRSET);
3819
3820-struct stringindset { /* stringin input dset */
3821- long number;
3822- DEVSUPFUN dev_report;
3823- DEVSUPFUN init;
3824- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
3825- DEVSUPFUN get_ioint_info;
3826- DEVSUPFUN read_stringin; /*returns: (-1,0)=>(failure,success)*/
3827-};
3828 static void monitor(stringinRecord *);
3829 static long readValue(stringinRecord *);
3830
3831@@ -97,7 +89,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3832 struct stringinRecord *prec = (struct stringinRecord *)pcommon;
3833 STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
3834 STATIC_ASSERT(sizeof(prec->sval)==sizeof(prec->val));
3835- struct stringindset *pdset = (struct stringindset *) prec->dset;
3836+ stringindset *pdset = (stringindset *) prec->dset;
3837
3838 if (pass == 0) return 0;
3839
3840@@ -110,13 +102,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
3841 }
3842
3843 /* must have read_stringin function defined */
3844- if ((pdset->number < 5) || (pdset->read_stringin == NULL)) {
3845+ if ((pdset->common.number < 5) || (pdset->read_stringin == NULL)) {
3846 recGblRecordError(S_dev_missingSup, prec, "stringin: init_record");
3847 return S_dev_missingSup;
3848 }
3849
3850- if (pdset->init_record) {
3851- long status = pdset->init_record(prec);
3852+ if (pdset->common.init_record) {
3853+ long status = pdset->common.init_record(pcommon);
3854
3855 if (status)
3856 return status;
3857@@ -130,7 +122,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3858 static long process(struct dbCommon *pcommon)
3859 {
3860 struct stringinRecord *prec = (struct stringinRecord *)pcommon;
3861- struct stringindset *pdset = (struct stringindset *)(prec->dset);
3862+ stringindset *pdset = (stringindset *)(prec->dset);
3863 long status;
3864 unsigned char pact=prec->pact;
3865
3866@@ -196,7 +188,7 @@ static void monitor(stringinRecord *prec)
3867
3868
3869 static long readValue(stringinRecord *prec)
3870 {
3871- struct stringindset *pdset = (struct stringindset *) prec->dset;
3872+ stringindset *pdset = (stringindset *) prec->dset;
3873 long status = 0;
3874
3875 if (!prec->pact) {
3876diff --git a/modules/database/src/std/rec/stringinRecord.dbd.pod b/modules/database/src/std/rec/stringinRecord.dbd.pod
3877index 17e0c10..c633b31 100644
3878--- a/modules/database/src/std/rec/stringinRecord.dbd.pod
3879+++ b/modules/database/src/std/rec/stringinRecord.dbd.pod
3880@@ -24,6 +24,15 @@ menu(stringinPOST) {
3881 }
3882 recordtype(stringin) {
3883 include "dbCommon.dbd"
3884+ %
3885+ %/* Declare Device Support Entry Table */
3886+ %struct stringinRecord;
3887+ %typedef struct stringindset {
3888+ % dset common; /*init_record returns: (-1,0)=>(failure,success)*/
3889+ % long (*read_stringin)(struct stringinRecord *prec); /*returns: (-1,0)=>(failure,success)*/
3890+ %} stringindset;
3891+ %#define HAS_stringindset
3892+ %
3893 field(VAL,DBF_STRING) {
3894 prompt("Current Value")
3895 promptgroup("40 - Input")
3896diff --git a/modules/database/src/std/rec/stringoutRecord.c b/modules/database/src/std/rec/stringoutRecord.c
3897index ddf3028..786d295 100644
3898--- a/modules/database/src/std/rec/stringoutRecord.c
3899+++ b/modules/database/src/std/rec/stringoutRecord.c
3900@@ -82,14 +82,6 @@ rset stringoutRSET={
3901 };
3902 epicsExportAddress(rset,stringoutRSET);
3903
3904-struct stringoutdset { /* stringout input dset */
3905- long number;
3906- DEVSUPFUN dev_report;
3907- DEVSUPFUN init;
3908- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
3909- DEVSUPFUN get_ioint_info;
3910- DEVSUPFUN write_stringout;/*(-1,0)=>(failure,success)*/
3911-};
3912 static void monitor(stringoutRecord *);
3913 static long writeValue(stringoutRecord *);
3914
3915@@ -99,7 +91,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3916 struct stringoutRecord *prec = (struct stringoutRecord *)pcommon;
3917 STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
3918 STATIC_ASSERT(sizeof(prec->ivov)==sizeof(prec->val));
3919- struct stringoutdset *pdset = (struct stringoutdset *) prec->dset;
3920+ stringoutdset *pdset = (stringoutdset *) prec->dset;
3921
3922 if (pass == 0) return 0;
3923
3924@@ -111,7 +103,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3925 }
3926
3927 /* must have write_stringout functions defined */
3928- if ((pdset->number < 5) || (pdset->write_stringout == NULL)) {
3929+ if ((pdset->common.number < 5) || (pdset->write_stringout == NULL)) {
3930 recGblRecordError(S_dev_missingSup, prec, "stringout: init_record");
3931 return S_dev_missingSup;
3932 }
3933@@ -120,8 +112,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
3934 if (recGblInitConstantLink(&prec->dol, DBF_STRING, prec->val))
3935 prec->udf = FALSE;
3936
3937- if (pdset->init_record) {
3938- long status = pdset->init_record(prec);
3939+ if (pdset->common.init_record) {
3940+ long status = pdset->common.init_record(pcommon);
3941
3942 if(status)
3943 return status;
3944@@ -133,7 +125,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
3945 static long process(struct dbCommon *pcommon)
3946 {
3947 struct stringoutRecord *prec = (struct stringoutRecord *)pcommon;
3948- struct stringoutdset *pdset = (struct stringoutdset *)(prec->dset);
3949+ stringoutdset *pdset = (stringoutdset *)(prec->dset);
3950 long status=0;
3951 unsigned char pact=prec->pact;
3952
3953@@ -228,7 +220,7 @@ static void monitor(stringoutRecord *prec)
3954
3955
3956 static long writeValue(stringoutRecord *prec)
3957 {
3958- struct stringoutdset *pdset = (struct stringoutdset *) prec->dset;
3959+ stringoutdset *pdset = (stringoutdset *) prec->dset;
3960 long status = 0;
3961
3962 if (!prec->pact) {
3963diff --git a/modules/database/src/std/rec/stringoutRecord.dbd.pod b/modules/database/src/std/rec/stringoutRecord.dbd.pod
3964index 0d63d5f..1c843ed 100644
3965--- a/modules/database/src/std/rec/stringoutRecord.dbd.pod
3966+++ b/modules/database/src/std/rec/stringoutRecord.dbd.pod
3967@@ -24,6 +24,15 @@ menu(stringoutPOST) {
3968 }
3969 recordtype(stringout) {
3970 include "dbCommon.dbd"
3971+ %
3972+ %/* Declare Device Support Entry Table */
3973+ %struct stringoutRecord;
3974+ %typedef struct stringoutdset {
3975+ % dset common; /*init_record returns: (-1,0)=>(failure,success)*/
3976+ % long (*write_stringout)(struct stringoutRecord *prec); /*(-1,0)=>(failure,success)*/
3977+ %} stringoutdset;
3978+ %#define HAS_stringoutdset
3979+ %
3980 field(VAL,DBF_STRING) {
3981 prompt("Current Value")
3982 promptgroup("50 - Output")
3983diff --git a/modules/database/src/std/rec/subArrayRecord.c b/modules/database/src/std/rec/subArrayRecord.c
3984index 6de5147..00eed31 100644
3985--- a/modules/database/src/std/rec/subArrayRecord.c
3986+++ b/modules/database/src/std/rec/subArrayRecord.c
3987@@ -82,15 +82,6 @@ rset subArrayRSET={
3988 };
3989 epicsExportAddress(rset,subArrayRSET);
3990
3991-struct sadset { /* subArray dset */
3992- long number;
3993- DEVSUPFUN dev_report;
3994- DEVSUPFUN init;
3995- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
3996- DEVSUPFUN get_ioint_info;
3997- DEVSUPFUN read_sa; /*returns: (-1,0)=>(failure,success)*/
3998-};
3999-
4000 static void monitor(subArrayRecord *prec);
4001 static long readValue(subArrayRecord *prec);
4002
4003@@ -98,7 +89,7 @@ static long readValue(subArrayRecord *prec);
4004 static long init_record(struct dbCommon *pcommon, int pass)
4005 {
4006 struct subArrayRecord *prec = (struct subArrayRecord *)pcommon;
4007- struct sadset *pdset;
4008+ sadset *pdset;
4009
4010 if (pass==0){
4011 if (prec->malm <= 0)
4012@@ -114,19 +105,19 @@ static long init_record(struct dbCommon *pcommon, int pass)
4013 }
4014
4015 /* must have dset defined */
4016- if (!(pdset = (struct sadset *)(prec->dset))) {
4017+ if (!(pdset = (sadset *)(prec->dset))) {
4018 recGblRecordError(S_dev_noDSET,(void *)prec,"sa: init_record");
4019 return S_dev_noDSET;
4020 }
4021
4022 /* must have read_sa function defined */
4023- if ( (pdset->number < 5) || (pdset->read_sa == NULL) ) {
4024+ if ( (pdset->common.number < 5) || (pdset->read_sa == NULL) ) {
4025 recGblRecordError(S_dev_missingSup,(void *)prec,"sa: init_record");
4026 return S_dev_missingSup;
4027 }
4028
4029- if (pdset->init_record)
4030- return pdset->init_record(prec);
4031+ if (pdset->common.init_record)
4032+ return pdset->common.init_record(pcommon);
4033
4034 return 0;
4035 }
4036@@ -134,7 +125,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
4037 static long process(struct dbCommon *pcommon)
4038 {
4039 struct subArrayRecord *prec = (struct subArrayRecord *)pcommon;
4040- struct sadset *pdset = (struct sadset *)(prec->dset);
4041+ sadset *pdset = (sadset *)(prec->dset);
4042 long status;
4043 unsigned char pact=prec->pact;
4044
4045@@ -309,7 +300,7 @@ static void monitor(subArrayRecord *prec)
4046 static long readValue(subArrayRecord *prec)
4047 {
4048 long status;
4049- struct sadset *pdset = (struct sadset *) (prec->dset);
4050+ sadset *pdset = (sadset *) (prec->dset);
4051
4052 if (prec->nelm > prec->malm)
4053 prec->nelm = prec->malm;
4054diff --git a/modules/database/src/std/rec/subArrayRecord.dbd.pod b/modules/database/src/std/rec/subArrayRecord.dbd.pod
4055index c47f2d0..fa4a410 100644
4056--- a/modules/database/src/std/rec/subArrayRecord.dbd.pod
4057+++ b/modules/database/src/std/rec/subArrayRecord.dbd.pod
4058@@ -315,6 +315,15 @@ INP is expected to point to a waveform record.
4059 =cut
4060
4061 include "dbCommon.dbd"
4062+ %
4063+ %/* Declare Device Support Entry Table */
4064+ %struct subArrayRecord;
4065+ %typedef struct sadset {
4066+ % dset common; /*init_record returns: (-1,0)=>(failure,success)*/
4067+ % long (*read_sa)(struct subArrayRecord *prec); /*returns: (-1,0)=>(failure,success)*/
4068+ %} sadset;
4069+ %#define HAS_sadset
4070+ %
4071 field(VAL,DBF_NOACCESS) {
4072 prompt("Value")
4073 asl(ASL0)
4074diff --git a/modules/database/src/std/rec/waveformRecord.c b/modules/database/src/std/rec/waveformRecord.c
4075index 8d21018..69a36f4 100644
4076--- a/modules/database/src/std/rec/waveformRecord.c
4077+++ b/modules/database/src/std/rec/waveformRecord.c
4078@@ -80,14 +80,6 @@ rset waveformRSET={
4079 get_alarm_double
4080 };
4081 epicsExportAddress(rset,waveformRSET);
4082-struct wfdset { /* waveform dset */
4083- long number;
4084- DEVSUPFUN dev_report;
4085- DEVSUPFUN init;
4086- DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
4087- DEVSUPFUN get_ioint_info;
4088- DEVSUPFUN read_wf; /*returns: (-1,0)=>(failure,success)*/
4089-};
4090
4091 static void monitor(waveformRecord *);
4092 static long readValue(waveformRecord *);
4093@@ -95,7 +87,7 @@ static long readValue(waveformRecord *);
4094 static long init_record(struct dbCommon *pcommon, int pass)
4095 {
4096 struct waveformRecord *prec = (struct waveformRecord *)pcommon;
4097- struct wfdset *pdset;
4098+ wfdset *pdset;
4099
4100 if (pass == 0) {
4101 if (prec->nelm <= 0)
4102@@ -111,25 +103,25 @@ static long init_record(struct dbCommon *pcommon, int pass)
4103 recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
4104
4105 /* must have dset defined */
4106- if (!(pdset = (struct wfdset *)(prec->dset))) {
4107+ if (!(pdset = (wfdset *)(prec->dset))) {
4108 recGblRecordError(S_dev_noDSET,(void *)prec,"wf: init_record");
4109 return S_dev_noDSET;
4110 }
4111 /* must have read_wf function defined */
4112- if ((pdset->number < 5) || (pdset->read_wf == NULL)) {
4113+ if ((pdset->common.number < 5) || (pdset->read_wf == NULL)) {
4114 recGblRecordError(S_dev_missingSup,(void *)prec,"wf: init_record");
4115 return S_dev_missingSup;
4116 }
4117- if (!pdset->init_record)
4118+ if (!pdset->common.init_record)
4119 return 0;
4120
4121- return pdset->init_record(prec);
4122+ return pdset->common.init_record(pcommon);
4123 }
4124
4125 static long process(struct dbCommon *pcommon)
4126 {
4127 struct waveformRecord *prec = (struct waveformRecord *)pcommon;
4128- struct wfdset *pdset = (struct wfdset *)(prec->dset);
4129+ wfdset *pdset = (wfdset *)(prec->dset);
4130 unsigned char pact=prec->pact;
4131 long status;
4132
4133@@ -328,7 +320,7 @@ static void monitor(waveformRecord *prec)
4134
4135 static long readValue(waveformRecord *prec)
4136 {
4137- struct wfdset *pdset = (struct wfdset *) prec->dset;
4138+ wfdset *pdset = (wfdset *) prec->dset;
4139 long status = 0;
4140
4141 if (!prec->pact) {
4142diff --git a/modules/database/src/std/rec/waveformRecord.dbd.pod b/modules/database/src/std/rec/waveformRecord.dbd.pod
4143index ce488ef..06f38b6 100644
4144--- a/modules/database/src/std/rec/waveformRecord.dbd.pod
4145+++ b/modules/database/src/std/rec/waveformRecord.dbd.pod
4146@@ -397,6 +397,15 @@ NORD is set to the number of values returned and read_wf returns.
4147 =cut
4148
4149 include "dbCommon.dbd"
4150+ %
4151+ %/* Declare Device Support Entry Table */
4152+ %struct waveformRecord;
4153+ %typedef struct wfdset {
4154+ % dset common; /*init_record returns: (-1,0)=>(failure,success)*/
4155+ % long (*read_wf)(struct waveformRecord *prec); /*returns: (-1,0)=>(failure,success)*/
4156+ %} wfdset;
4157+ %#define HAS_wfdset
4158+ %
4159 field(VAL,DBF_NOACCESS) {
4160 prompt("Value")
4161 asl(ASL0)

Subscribers

People subscribed via source and target branches