Post monitors on all array-length record fields (often NORD)
when their values get changed.
This commit is contained in:
Andrew Johnson
2018-07-20 23:10:34 -05:00
parent 0f21196670
commit ec351c5e2f
9 changed files with 86 additions and 42 deletions

View File

@@ -4,7 +4,7 @@
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
@@ -71,13 +71,18 @@ static long init_record(aaiRecord *prec)
static long read_aai(aaiRecord *prec)
{
epicsUInt32 nord = prec->nord;
long nRequest = prec->nelm;
dbGetLink(prec->simm == menuYesNoYES ? &prec->siol : &prec->inp,
prec->ftvl, prec->bptr, 0, &nRequest);
if (nRequest > 0) {
prec->nord = nRequest;
prec->udf=FALSE;
if (nord != prec->nord)
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
prec->udf = FALSE;
if (prec->tsel.type == CONSTANT &&
prec->tse == epicsTimeEventDeviceTime)
dbGetTimeStamp(&prec->inp, &prec->time);

View File

@@ -4,7 +4,7 @@
* Copyright (c) 2002 Lawrence Berkeley Laboratory,The Control Systems
* Group, Systems Engineering Department
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
@@ -67,6 +67,7 @@ static long init_record(subArrayRecord *prec)
static long read_sa(subArrayRecord *prec)
{
long nRequest = prec->indx + prec->nelm;
epicsUInt32 nord = prec->nord;
long ecount;
if (nRequest > prec->malm)
@@ -89,6 +90,8 @@ static long read_sa(subArrayRecord *prec)
ecount = 0;
prec->nord = ecount;
if (nord != prec->nord)
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
if (nRequest > 0 &&
prec->tsel.type == CONSTANT &&

View File

@@ -4,7 +4,7 @@
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
@@ -67,11 +67,16 @@ static long init_record(waveformRecord *prec)
static long read_wf(waveformRecord *prec)
{
epicsUInt32 nord = prec->nord;
long nRequest = prec->nelm;
dbGetLink(&prec->inp, prec->ftvl, prec->bptr, 0, &nRequest);
if (nRequest > 0) {
prec->nord = nRequest;
if (nord != prec->nord)
db_post_events(prec, &prec->nord, DBE_VALUE | DBE_LOG);
if (prec->tsel.type == CONSTANT &&
prec->tse == epicsTimeEventDeviceTime)
dbGetTimeStamp(&prec->inp, &prec->time);