25 #include "dbConstLink.h" 30 #include "menuYesNo.h" 31 #include "aaiRecord.h" 36 static long read_aai(aaiRecord *
prec);
46 aaiRecord *
prec = (aaiRecord *)pcommon;
47 DBLINK *plink = &prec->inp;
52 if (dbLinkIsConstant(plink)) {
53 long nRequest = prec->nelm;
59 "devAaiSoft: buffer calloc failed");
62 status = dbLoadLinkArray(plink, prec->ftvl, prec->bptr, &nRequest);
63 if (!status && nRequest > 0) {
64 prec->nord = nRequest;
71 static long readLocked(
struct link *pinp,
void *
dummy)
74 long nRequest = prec->nelm;
75 long status = dbGetLink(pinp, prec->ftvl, prec->bptr, 0, &nRequest);
77 if (!
status && nRequest > 0) {
78 prec->nord = nRequest;
81 if (dbLinkIsConstant(&prec->tsel) &&
83 dbGetTimeStamp(pinp, &prec->time);
88 static long read_aai(aaiRecord *
prec)
91 struct link *pinp = prec->simm == menuYesNoYES ? &prec->siol : &prec->inp;
92 long status = dbLinkDoLocked(pinp, readLocked,
NULL);
94 if (status == S_db_noLSET)
95 status = readLocked(pinp,
NULL);
97 if (!status && nord != prec->nord)
struct dbCommon * precord
Miscellaneous macro definitions.
epicsExportAddress(dset, devAaiSoft)
#define epicsTimeEventDeviceTime
LIBCOM_API void * callocMustSucceed(size_t count, size_t size, const char *msg)
A calloc() that never returns NULL.
epics::pvData::PVStructurePtr dummy
Routines for code that can't continue or return after an error.