fix(worker): hold subtag alarm state on bad quality; keep an initial-sync ack (MXA-005, MXA-007, #254)
ci / windows-x86 (push) Failing after 16m6s
ci / java (push) Failing after 16m33s
ci / portable (push) Failing after 19m4s
ci / windows-x86 (push) Failing after 16m6s
ci / java (push) Failing after 16m33s
ci / portable (push) Failing after 19m4s
LmxSubtagAlarmSource now passes the OnDataChange quality through. The subtag state machine ignores InAlarm/Acked updates that are not good quality or carry no value instead of coercing them to false (which read as a Clear). An Acked=true buffered before the first InAlarm value is the initial state of an already-acked alarm and survives the raise.
This commit is contained in:
@@ -979,6 +979,24 @@ MXAccess does not guarantee the `Acked = false` update arrives before the
|
||||
`InAlarm = false` update. The latch ensures a clear always emits `ACK_RTN`
|
||||
when the alarm was acknowledged at any point during the active episode.
|
||||
|
||||
**Initial sync.** The first `InAlarm` value after subscribe is the alarm's
|
||||
current state, not an observed raise. An alarm that is already active and
|
||||
acknowledged can deliver `Acked = true` before `InAlarm = true`, and no later
|
||||
`Acked` change arrives to correct it. So an `Acked = true` buffered before the
|
||||
first `InAlarm` value is kept when that value is `true`: the raise is reported
|
||||
as `ACK_ALM` (a Raise of an acknowledged alarm) and the latch is set. Any raise
|
||||
after the first `InAlarm` value is a new episode and starts unacknowledged.
|
||||
|
||||
**Quality.** An `InAlarm` or `Acked` update whose MXAccess quality is not good
|
||||
(OPC quality bits `0xC0` not both set — bad or uncertain), or whose value is
|
||||
empty, is ignored and the alarm keeps its last known state. MXAccess reports an
|
||||
engine going off scan or a reference becoming unresolved this way. Coercing the
|
||||
empty value to `false` would report every active alarm on that object as
|
||||
returned to normal, and the gateway's reconcile would confirm it from the
|
||||
standby snapshot. The subtag provider already reports `degraded = true` on every
|
||||
record, so holding state adds no new signal. Priority updates fall back to the
|
||||
last known priority as before.
|
||||
|
||||
`SnapshotActive()` returns one `MxAlarmSnapshotRecord` per currently-active
|
||||
alarm. State mapping:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user