Adjust record and device support for array constants
This commit is contained in:
@@ -52,8 +52,11 @@ epicsExportAddress(dset,devAaiSoft);
|
||||
|
||||
static long init_record(aaiRecord *prec)
|
||||
{
|
||||
long nRequest = prec->nelm;
|
||||
|
||||
if (prec->inp.type == CONSTANT) {
|
||||
prec->nord = 0;
|
||||
dbLoadLinkArray(&prec->inp, prec->ftvl, prec->bptr, &nRequest);
|
||||
prec->nord = (nRequest > 0) ? nRequest : 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -49,22 +49,23 @@ epicsExportAddress(dset, devWfSoft);
|
||||
|
||||
static long init_record(waveformRecord *prec)
|
||||
{
|
||||
if (prec->inp.type == CONSTANT) {
|
||||
prec->nord = 0;
|
||||
}
|
||||
return 0;
|
||||
long nelm = prec->nelm;
|
||||
long status = dbLoadLinkArray(&prec->inp, prec->ftvl, prec->bptr, &nelm);
|
||||
|
||||
prec->nord = !status && (nelm > 0) ? nelm : 0;
|
||||
return status;
|
||||
}
|
||||
|
||||
static long read_wf(waveformRecord *prec)
|
||||
{
|
||||
long nRequest = prec->nelm;
|
||||
long status = dbGetLink(&prec->inp, prec->ftvl, prec->bptr, 0, &nRequest);
|
||||
|
||||
dbGetLink(&prec->inp, prec->ftvl, prec->bptr, 0, &nRequest);
|
||||
if (nRequest > 0) {
|
||||
if (!status && nRequest > 0) {
|
||||
prec->nord = nRequest;
|
||||
if (prec->tsel.type == CONSTANT &&
|
||||
prec->tse == epicsTimeEventDeviceTime)
|
||||
dbGetTimeStamp(&prec->inp, &prec->time);
|
||||
}
|
||||
return 0;
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user