Class AlarmStateMachine

Nested Relationships

Nested Types

Class Documentation

class AlarmStateMachine

Pure, side-effect-free state machine bridging OPC-UA AlarmConditionType state combinations to SOVD fault lifecycle. The poller owns the last_known_status per (ConditionId) and feeds it back as prev_status on every event.

Decision order (first match wins) follows the design table in design/index.rst and issue #386:

  1. BranchId != null -> Suppressed + NoOp (history only)

  2. EnabledState == false -> Suppressed (clear if was active)

  3. ShelvingState != Unshelved -> Suppressed (clear if was active)

  4. ActiveState == true -> Confirmed (idempotent re-report)

  5. ActiveState == false -> Healed or Cleared based on Acked + Confirmed

Retain is intentionally not modeled by this state machine and does not affect compute(). Per Part 9 §5.5.2.10 it controls visibility during ConditionRefresh bursts rather than the lifecycle mapping implemented here. The current EventFilter does not include Retain in its select clauses; if/when ConditionRefresh-with-Retain filtering is added (issue #389), it will live in the poller’s pre-compute path, not in this pure-function table. (Copilot review on PR #387.)

Public Static Functions

static inline Outcome compute(SovdAlarmStatus prev_status, const AlarmEventInput &in)
struct Outcome

Public Members

SovdAlarmStatus next_status
AlarmAction action