Move db_post_events(waveform, NORD) into recordType.

Dirk pointed out that existing device support authors aren't
going to add this themselves; it's much better if the record
does it all for itself.
This commit is contained in:
Andrew Johnson
2013-04-04 14:18:35 -05:00
parent f661299a81
commit fabc8d06a9
3 changed files with 13 additions and 9 deletions

View File

@@ -322,10 +322,10 @@ that number of seconds.</p>
<h3>Post events on Waveform record's NORD field</h3>
<p>When the record type or soft device support modify the NORD field of a
waveform record they now also post a DBE_VALUE and DBE_LOG event, signalling the
array length change to any clients monitoring the NORD field. Input device
support routines should be modified to do this as well.</p>
<p>When the record type or device support modify the NORD field of a waveform
record, the record support code now posts DBE_VALUE and DBE_LOG events for that
field, signalling the array length change to any client monitoring the NORD
field.</p>
<h3>Attributes of Non-VAL Fields</h3>

View File

@@ -76,8 +76,6 @@ static long read_wf(waveformRecord *prec)
if (prec->tsel.type == CONSTANT &&
prec->tse == epicsTimeEventDeviceTime)
dbGetTimeStamp(&prec->inp, &prec->time);
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
}
return 0;
}

View File

@@ -1,5 +1,5 @@
/*************************************************************************\
* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
* Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
@@ -318,16 +318,22 @@ static long readValue(waveformRecord *prec)
return status;
if (prec->simm == menuYesNoNO){
return (*pdset->read_wf)(prec);
epicsUInt32 nord = prec->nord;
status = (*pdset->read_wf)(prec);
if (nord != prec->nord)
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
return status;
}
if (prec->simm == menuYesNoYES){
long nRequest = prec->nelm;
status = dbGetLink(&(prec->siol), prec->ftvl, prec->bptr, 0, &nRequest);
/* nord set only for db links: needed for old db_access */
if (prec->siol.type != CONSTANT) {
prec->nord = nRequest;
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
if (status == 0)
prec->udf=FALSE;
}