Export and use int64indset, set USE_TYPED_DSET

This commit is contained in:
Andrew Johnson
2019-11-16 22:40:08 -06:00
parent 7893445a2e
commit 7e1d165092
6 changed files with 29 additions and 40 deletions

View File

@@ -28,6 +28,7 @@ dbRecStd_SRCS += devBoDbState.c
dbRecStd_SRCS += devCalcoutSoft.c
dbRecStd_SRCS += devEventSoft.c
dbRecStd_SRCS += devHistogramSoft.c
devI64inSoft_CFLAGS += -DUSE_TYPED_DSET
dbRecStd_SRCS += devI64inSoft.c
dbRecStd_SRCS += devI64outSoft.c
dbRecStd_SRCS += devLiSoft.c
@@ -54,6 +55,7 @@ dbRecStd_SRCS += devGeneralTime.c
dbRecStd_SRCS += devAiSoftCallback.c
dbRecStd_SRCS += devBiSoftCallback.c
devI64inSoftCallback_CFLAGS += -DUSE_TYPED_DSET
dbRecStd_SRCS += devI64inSoftCallback.c
dbRecStd_SRCS += devLiSoftCallback.c
dbRecStd_SRCS += devMbbiDirectSoftCallback.c

View File

@@ -24,29 +24,9 @@
#include "int64inRecord.h"
#include "epicsExport.h"
/* Create the dset for devI64inSoft */
static long init_record(int64inRecord *prec);
static long read_int64in(int64inRecord *prec);
struct {
long number;
DEVSUPFUN report;
DEVSUPFUN init;
DEVSUPFUN init_record;
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_int64in;
} devI64inSoft = {
5,
NULL,
NULL,
init_record,
NULL,
read_int64in
};
epicsExportAddress(dset, devI64inSoft);
static long init_record(int64inRecord *prec)
static long init_record(dbCommon *common)
{
int64inRecord *prec = (int64inRecord *)common;
if (recGblInitConstantLink(&prec->inp, DBF_INT64, &prec->val))
prec->udf = FALSE;
@@ -76,3 +56,11 @@ static long read_int64in(int64inRecord *prec)
return status;
}
/* Create the dset for devI64inSoft */
int64indset devI64inSoft = {
{ 5, NULL, NULL, init_record, NULL }, read_int64in
};
epicsExportAddress(dset, devI64inSoft);

View File

@@ -151,8 +151,9 @@ static long init(int pass)
return 0;
}
static long init_record(int64inRecord *prec)
static long init_record(dbCommon *common)
{
int64inRecord *prec = (int64inRecord *)common;
if (recGblInitConstantLink(&prec->inp, DBR_INT64, &prec->val))
prec->udf = FALSE;
@@ -204,11 +205,7 @@ static long read_int64in(int64inRecord *prec)
}
/* Create the dset for devI64inSoftCallback */
struct {
dset common;
DEVSUPFUN read_int64in;
} devI64inSoftCallback = {
{5, NULL, init, init_record, NULL},
read_int64in
int64indset devI64inSoftCallback = {
{ 5, NULL, init, init_record, NULL }, read_int64in
};
epicsExportAddress(dset, devI64inSoftCallback);