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:
Andrew Johnson
2019-11-30 00:17:23 -06:00
parent 6eaef18347
commit 5407a25775
9 changed files with 56 additions and 78 deletions

View File

@@ -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);