Export and use aidset, set USE_TYPED_DSET
I did ai so I can use it as an example in the Release Notes.
This commit is contained in:
@@ -15,7 +15,9 @@ DBD += devSoft.dbd
|
||||
|
||||
dbRecStd_SRCS += devAaiSoft.c
|
||||
dbRecStd_SRCS += devAaoSoft.c
|
||||
devAiSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devAiSoft.c
|
||||
devAiSoftRaw_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devAiSoftRaw.c
|
||||
dbRecStd_SRCS += devAoSoft.c
|
||||
dbRecStd_SRCS += devAoSoftRaw.c
|
||||
@@ -52,8 +54,8 @@ dbRecStd_SRCS += devSASoft.c
|
||||
dbRecStd_SRCS += devSiSoft.c
|
||||
dbRecStd_SRCS += devSoSoft.c
|
||||
dbRecStd_SRCS += devWfSoft.c
|
||||
dbRecStd_SRCS += devGeneralTime.c
|
||||
|
||||
devAiSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devAiSoftCallback.c
|
||||
dbRecStd_SRCS += devBiSoftCallback.c
|
||||
devI64inSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
@@ -77,6 +79,9 @@ devPrintfSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devPrintfSoftCallback.c
|
||||
dbRecStd_SRCS += devSoSoftCallback.c
|
||||
|
||||
devGeneralTime_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devGeneralTime.c
|
||||
devTimestamp_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devTimestamp.c
|
||||
devStdio_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devStdio.c
|
||||
|
||||
@@ -26,30 +26,19 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devAiSoft */
|
||||
static long init_record(aiRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_ai(aiRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_ai;
|
||||
DEVSUPFUN special_linconv;
|
||||
} devAiSoft = {
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_ai,
|
||||
NULL
|
||||
aidset devAiSoft = {
|
||||
{6, NULL, NULL, init_record, NULL},
|
||||
read_ai, NULL
|
||||
};
|
||||
epicsExportAddress(dset, devAiSoft);
|
||||
|
||||
static long init_record(aiRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
aiRecord *prec = (aiRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBF_DOUBLE, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
|
||||
@@ -153,8 +153,10 @@ static long init(int pass)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long init_record(aiRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
aiRecord *prec = (aiRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBF_DOUBLE, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
@@ -213,14 +215,8 @@ static long read_ai(aiRecord *prec)
|
||||
return 2;
|
||||
}
|
||||
|
||||
/* Create the dset for devAiSoftCallback */
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_ai;
|
||||
DEVSUPFUN special_linconv;
|
||||
} devAiSoftCallback = {
|
||||
aidset devAiSoftCallback = {
|
||||
{6, NULL, init, init_record, NULL},
|
||||
read_ai,
|
||||
NULL
|
||||
read_ai, NULL
|
||||
};
|
||||
epicsExportAddress(dset, devAiSoftCallback);
|
||||
|
||||
@@ -25,30 +25,19 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devAiSoftRaw */
|
||||
static long init_record(aiRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_ai(aiRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_ai;
|
||||
DEVSUPFUN special_linconv;
|
||||
} devAiSoftRaw = {
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_ai,
|
||||
NULL
|
||||
aidset devAiSoftRaw = {
|
||||
{6, NULL, NULL, init_record, NULL},
|
||||
read_ai, NULL
|
||||
};
|
||||
epicsExportAddress(dset, devAiSoftRaw);
|
||||
|
||||
static long init_record(aiRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
aiRecord *prec = (aiRecord *)pcommon;
|
||||
|
||||
recGblInitConstantLink(&prec->inp, DBF_LONG, &prec->rval);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -50,8 +50,9 @@ static struct ai_channel {
|
||||
{"TIME", getCurrentTime},
|
||||
};
|
||||
|
||||
static long init_ai(aiRecord *prec)
|
||||
static long init_ai(dbCommon *pcommon)
|
||||
{
|
||||
aiRecord *prec = (aiRecord *)pcommon;
|
||||
int i;
|
||||
|
||||
if (prec->inp.type != INST_IO) {
|
||||
@@ -91,12 +92,9 @@ static long read_ai(aiRecord *prec)
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_write;
|
||||
DEVSUPFUN special_linconv;
|
||||
} devAiGeneralTime = {
|
||||
{6, NULL, NULL, init_ai, NULL}, read_ai, NULL
|
||||
aidset devAiGeneralTime = {
|
||||
{6, NULL, NULL, init_ai, NULL},
|
||||
read_ai, NULL
|
||||
};
|
||||
epicsExportAddress(dset, devAiGeneralTime);
|
||||
|
||||
@@ -114,8 +112,9 @@ static struct bo_channel {
|
||||
{"RSTERRCNT", resetErrors},
|
||||
};
|
||||
|
||||
static long init_bo(boRecord *prec)
|
||||
static long init_bo(dbCommon *pcommon)
|
||||
{
|
||||
boRecord *prec = (boRecord *)pcommon;
|
||||
int i;
|
||||
|
||||
if (prec->out.type != INST_IO) {
|
||||
@@ -173,8 +172,9 @@ static struct li_channel {
|
||||
{"GETERRCNT", errorCount},
|
||||
};
|
||||
|
||||
static long init_li(longinRecord *prec)
|
||||
static long init_li(dbCommon *pcommon)
|
||||
{
|
||||
longinRecord *prec = (longinRecord *)pcommon;
|
||||
int i;
|
||||
|
||||
if (prec->inp.type != INST_IO) {
|
||||
@@ -243,8 +243,9 @@ static struct si_channel {
|
||||
{"BESTTEP", eventProvider},
|
||||
};
|
||||
|
||||
static long init_si(stringinRecord *prec)
|
||||
static long init_si(dbCommon *pcommon)
|
||||
{
|
||||
stringinRecord *prec = (stringinRecord *)pcommon;
|
||||
int i;
|
||||
|
||||
if (prec->inp.type != INST_IO) {
|
||||
|
||||
@@ -40,12 +40,9 @@ static long read_ai(aiRecord *prec)
|
||||
return 2;
|
||||
}
|
||||
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_write;
|
||||
DEVSUPFUN special_linconv;
|
||||
} devTimestampAI = {
|
||||
{6, NULL, initAllow, NULL, NULL}, read_ai, NULL
|
||||
aidset devTimestampAI = {
|
||||
{6, NULL, initAllow, NULL, NULL},
|
||||
read_ai, NULL
|
||||
};
|
||||
epicsExportAddress(dset, devTimestampAI);
|
||||
|
||||
@@ -72,6 +69,7 @@ struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_stringin;
|
||||
} devTimestampSI = {
|
||||
{5, NULL, initAllow, NULL, NULL}, read_stringin
|
||||
{5, NULL, initAllow, NULL, NULL},
|
||||
read_stringin
|
||||
};
|
||||
epicsExportAddress(dset, devTimestampSI);
|
||||
|
||||
Reference in New Issue
Block a user