/* devBldSoft.c */ /* Example device support module */ #include #include #include #include #include "alarm.h" #include "cvtTable.h" #include "dbDefs.h" #include "dbAccess.h" #include "recGbl.h" #include "recSup.h" #include "devSup.h" #include "link.h" #include "bldRecord.h" #include "epicsExport.h" /*Create the dset for devBldSoft */ static long init_record(); static long read_bld(); struct { long number; DEVSUPFUN report; DEVSUPFUN init; DEVSUPFUN init_record; DEVSUPFUN get_ioint_info; DEVSUPFUN read_bld; }devBldSoft={ 5, NULL, NULL, init_record, NULL, read_bld, }; epicsExportAddress(dset,devBldSoft); static long init_record(pbld) struct bldRecord *pbld; { if(recGblInitConstantLink(&pbld->inp,DBF_DOUBLE,&pbld->val)) pbld->udf = FALSE; return(0); } static long read_bld(pbld) struct bldRecord *pbld; { long status; status = dbGetLink(&(pbld->inp),DBF_DOUBLE, &(pbld->val),0,0); /*If return was succesful then set undefined false*/ if(!status) pbld->udf = FALSE; return(0); }