handle state alarms in mbbo update
This commit is contained in:
@ -79,6 +79,15 @@ static long readData(dbCommon *record, format_t *format)
|
|||||||
if (record->pact) return DO_NOT_CONVERT;
|
if (record->pact) return DO_NOT_CONVERT;
|
||||||
/* In @init handler, no processing, enforce monitor updates. */
|
/* In @init handler, no processing, enforce monitor updates. */
|
||||||
monitor_mask = recGblResetAlarms(record);
|
monitor_mask = recGblResetAlarms(record);
|
||||||
|
if (mbbo->val > 15) {
|
||||||
|
recGblSetSevr(record, STATE_ALARM, mbbo->unsv);
|
||||||
|
} else {
|
||||||
|
recGblSetSevr(record, STATE_ALARM, (&(mbbo->zrsv))[mbbo->val]);
|
||||||
|
}
|
||||||
|
mbbo->lalm = mbbo->val;
|
||||||
|
if (mbbo->val != mbbo->lalm) {
|
||||||
|
if (!recGblSetSevr(record, COS_ALARM, mbbo->cosv)) mbbo->lalm = mbbo->val;
|
||||||
|
}
|
||||||
if (mbbo->mlst != mbbo->val)
|
if (mbbo->mlst != mbbo->val)
|
||||||
{
|
{
|
||||||
monitor_mask |= (DBE_VALUE | DBE_LOG);
|
monitor_mask |= (DBE_VALUE | DBE_LOG);
|
||||||
|
Reference in New Issue
Block a user