abstractions+driver+client.shared: extend AlarmEventArgs with rich payload (PR E.7) #415

Merged
dohertj2 merged 1 commits from track-e7-alarm-event-args-extension into master 2026-04-30 17:49:21 -04:00
Owner

Summary

Fourteenth PR of the alarms-over-gateway epic (docs/plans/alarms-over-gateway.md). Depends on PR B.2 (#413, merged) and B.3 (#414, merged).

Three new optional fields on Core.Abstractions.AlarmEventArgs:

  • OperatorComment — populated by the driver-native gateway path on Acknowledge transitions. Null on raise / clear, and null on the sub-attribute fallback path where the comment collapses into a single string write.
  • OriginalRaiseTimestampUtc — preserved across Acknowledge so OPC UA Part 9 conditions keep the original raise time.
  • AlarmCategory — taxonomy bucket from the upstream alarm system. Maps to ConditionClassName downstream when a class mapping is configured.

GalaxyDriver.OnPumpAlarmTransition populates the new fields from GalaxyAlarmTransition (PR B.1). Empty strings collapse to null so consumers can use is-null rather than is-null-or-empty checks.

Client.Shared mirror DTO (Client.Shared/Models/AlarmEventArgs) gains the same three properties so Client.UI / Client.CLI surfaces can reflect the rich payload — the actual UI/CLI verbose-output and Show-Details rendering ship as a follow-up PR; this PR locks in the payload contract.

Test plan

  • 2 new tests in Driver.Galaxy.Tests pin populated-vs-null behaviour for full-payload Acknowledge and bare-bones Raise
  • Solution build clean

Follow-up

  • Client.UI / Client.CLI verbose / --json flag for the new fields (separate PR; this PR locks the payload contract).
  • DriverNodeManager Part 9 field population using the new fields (Comment, Time, ConditionClassName) lands when AlarmConditionService gains the binding — covered alongside the deploy-rig validation in D.1.
## Summary Fourteenth PR of the **alarms-over-gateway** epic (docs/plans/alarms-over-gateway.md). Depends on PR B.2 (#413, merged) and B.3 (#414, merged). Three new optional fields on `Core.Abstractions.AlarmEventArgs`: - **OperatorComment** — populated by the driver-native gateway path on Acknowledge transitions. Null on raise / clear, and null on the sub-attribute fallback path where the comment collapses into a single string write. - **OriginalRaiseTimestampUtc** — preserved across Acknowledge so OPC UA Part 9 conditions keep the original raise time. - **AlarmCategory** — taxonomy bucket from the upstream alarm system. Maps to ConditionClassName downstream when a class mapping is configured. `GalaxyDriver.OnPumpAlarmTransition` populates the new fields from `GalaxyAlarmTransition` (PR B.1). Empty strings collapse to null so consumers can use is-null rather than is-null-or-empty checks. `Client.Shared` mirror DTO (`Client.Shared/Models/AlarmEventArgs`) gains the same three properties so `Client.UI` / `Client.CLI` surfaces can reflect the rich payload — the actual UI/CLI verbose-output and Show-Details rendering ship as a follow-up PR; this PR locks in the payload contract. ## Test plan - [x] 2 new tests in `Driver.Galaxy.Tests` pin populated-vs-null behaviour for full-payload Acknowledge and bare-bones Raise - [x] Solution build clean ## Follow-up - Client.UI / Client.CLI verbose / `--json` flag for the new fields (separate PR; this PR locks the payload contract). - DriverNodeManager Part 9 field population using the new fields (Comment, Time, ConditionClassName) lands when AlarmConditionService gains the binding — covered alongside the deploy-rig validation in D.1.
dohertj2 added 1 commit 2026-04-30 17:49:17 -04:00
Fourteenth PR of the alarms-over-gateway epic
(docs/plans/alarms-over-gateway.md). Depends on PR B.2 (GalaxyDriver
implements IAlarmSource, merged) and B.3 (DriverNodeManager prefers
driver-native ack, merged).

Three new optional fields on Core.Abstractions.AlarmEventArgs:

- OperatorComment — populated by the driver-native gateway path on
  Acknowledge transitions. Null on raise / clear, and null on the
  sub-attribute fallback path where the comment collapses into a
  single string write.
- OriginalRaiseTimestampUtc — preserved across Acknowledge so OPC
  UA Part 9 conditions keep the original raise time.
- AlarmCategory — taxonomy bucket from the upstream alarm system.
  Maps to ConditionClassName downstream when a class mapping is
  configured.

GalaxyDriver.OnPumpAlarmTransition populates the new fields from
GalaxyAlarmTransition (PR B.1). Empty strings collapse to null so
consumers can use is-null rather than is-null-or-empty checks.

Client.Shared mirror DTO (Client.Shared/Models/AlarmEventArgs)
gains the same three properties so the Client.UI / Client.CLI
surfaces can reflect the rich payload — the actual UI/CLI
verbose-output and Show-Details rendering ship as a follow-up
PR; this PR locks in the payload contract.

Tests:
- 2 new tests in Driver.Galaxy.Tests pin the populated-vs-null
  behaviour for full-payload Acknowledge and bare-bones Raise
  transitions respectively.
- Solution build clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dohertj2 merged commit 2baca785ad into master 2026-04-30 17:49:21 -04:00
dohertj2 deleted branch track-e7-alarm-event-args-extension 2026-04-30 17:49:21 -04:00
Sign in to join this conversation.