Skip to content

Commit

Permalink
Don't process writeComplete on struct elements that have not been wri…
Browse files Browse the repository at this point in the history
…tten

If writing to an optstruct or union, processing the records for all elements,
not only the one that has been written to, with a writeComplete callback
would clear errors for non-existing options and not selected choices.
This clears the INVALID alarm for those elements.
This becomes visible only if the value did not change and thus the optsruct
or union did not send back a monitor update.
  • Loading branch information
dirk-zimoch committed Oct 24, 2024
1 parent ce0cf38 commit b4d2cdb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions devOpcuaSup/RecordConnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ void processCallback (epicsCallback *pcallback, const ProcessReason reason)
prec = static_cast<dbCommon *>(pUsr);
if (!prec || !prec->dpvt) return;

// Do not process writeComplete on struct elements that have not been written
if (reason == writeComplete && !prec->pact)
return;

RecordConnector *pvt = static_cast<RecordConnector*>(prec->dpvt);
dbScanLock(prec);
ProcessReason oldreason = pvt->reason;
Expand Down

0 comments on commit b4d2cdb

Please sign in to comment.