Modify lsidset, set USE_TYPED_DSET

This commit is contained in:
Andrew Johnson
2019-11-16 22:18:32 -06:00
parent 23450fcfc8
commit 465ab44606
6 changed files with 13 additions and 12 deletions
+2
View File
@@ -32,6 +32,7 @@ dbRecStd_SRCS += devI64inSoft.c
dbRecStd_SRCS += devI64outSoft.c
dbRecStd_SRCS += devLiSoft.c
dbRecStd_SRCS += devLoSoft.c
devLsiSoft_CFLAGS += -DUSE_TYPED_DSET
dbRecStd_SRCS += devLsiSoft.c
dbRecStd_SRCS += devLsoSoft.c
dbRecStd_SRCS += devMbbiDirectSoft.c
@@ -73,6 +74,7 @@ dbRecStd_SRCS += devSoSoftCallback.c
dbRecStd_SRCS += devTimestamp.c
devStdio_CFLAGS += -DUSE_TYPED_DSET
dbRecStd_SRCS += devStdio.c
devEnviron_CFLAGS += -DUSE_TYPED_DSET
dbRecStd_SRCS += devEnviron.c
dbRecStd_SRCS += asSubRecordFunctions.c
+1 -1
View File
@@ -69,7 +69,7 @@ static long read_lsi(lsiRecord *prec)
}
lsidset devLsiEnviron = {
5, NULL, init_lsi, NULL, NULL, read_lsi
{5, NULL, init_lsi, NULL, NULL }, read_lsi
};
epicsExportAddress(dset, devLsiEnviron);
+3 -2
View File
@@ -17,8 +17,9 @@
#include "lsiRecord.h"
#include "epicsExport.h"
static long init_record(lsiRecord *prec)
static long init_record(dbCommon *common)
{
lsiRecord *prec = (lsiRecord *)common;
dbLoadLinkLS(&prec->inp, prec->val, prec->sizv, &prec->len);
return 0;
@@ -49,6 +50,6 @@ static long read_string(lsiRecord *prec)
}
lsidset devLsiSoft = {
5, NULL, NULL, init_record, NULL, read_string
{ 5, NULL, NULL, init_record, NULL }, read_string
};
epicsExportAddress(dset, devLsiSoft);
+1
View File
@@ -29,6 +29,7 @@ stdRecords += int64inRecord
stdRecords += int64outRecord
stdRecords += longinRecord
stdRecords += longoutRecord
lsiRecord_CFLAGS += -DUSE_TYPED_DSET
stdRecords += lsiRecord
stdRecords += lsoRecord
stdRecords += mbbiRecord
+3 -3
View File
@@ -66,13 +66,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
}
/* must have a read_string function */
if (pdset->number < 5 || !pdset->read_string) {
if (pdset->common.number < 5 || !pdset->read_string) {
recGblRecordError(S_dev_missingSup, prec, "lsi: init_record");
return S_dev_missingSup;
}
if (pdset->init_record) {
long status = pdset->init_record(prec);
if (pdset->common.init_record) {
long status = pdset->common.init_record(pcommon);
if (status)
return status;
+3 -6
View File
@@ -10,13 +10,10 @@ recordtype(lsi) {
%#include "devSup.h"
%
%/* Declare Device Support Entry Table */
%struct lsiRecord;
%typedef struct lsidset {
% long number;
% DEVSUPFUN report;
% DEVSUPFUN init;
% DEVSUPFUN init_record;
% DEVSUPFUN get_ioint_info;
% DEVSUPFUN read_string;
% dset common;
% long (*read_string)(struct lsiRecord *prec);
%} lsidset;
%
field(VAL,DBF_NOACCESS) {