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
+7 -18
View File
@@ -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;