namespace ZB.MOM.WW.OtOpcUa.Commons.OpcUa; /// /// Shared DPS topic for inbound alarm commands (). Publishers — the /// OPC UA node-manager seam (T18) and the AdminUI path via AdminOperationsActor (T21) — /// and the subscriber (ScriptedAlarmHostActor, T19) reference this single constant so a /// rename can't silently desynchronise them. Mirrors the /// pattern; ScriptedAlarmHostActor /// re-exports this as its AlarmCommandsTopic const. /// public static class AlarmCommandsTopic { /// The cluster DistributedPubSub topic name inbound alarm commands are published on. public const string Name = "alarm-commands"; } /// /// Commons-level command carried from an inbound OPC UA Part 9 alarm method call /// (Acknowledge / Confirm / Shelve / AddComment …) back to the scripted-alarm engine. The SDK /// node manager builds one of these in its condition method-handler delegates after the /// AlarmAck role gate passes, then the host routes it onto the cluster /// alarm-commands DistributedPubSub topic; T19's engine-side subscriber consumes it and /// drives the matching Part9StateMachine.Apply* transition. This is a pure DTO — it makes /// no auth decision and holds no SDK/Akka handle. /// /// /// The alarm's ScriptedAlarmId — equal to the materialised condition node's NodeId identifier /// (T14 aligned the condition NodeId to the ScriptedAlarmId). The engine keys its domain state by /// this id. /// /// /// The Part 9 operation, one of: Acknowledge, Confirm, OneShotShelve, /// TimedShelve, Unshelve, Enable, Disable, AddComment. These map /// 1:1 onto the engine's Part9StateMachine.Apply* calls on the consuming side (T19). /// All of Acknowledge/Confirm/AddComment/Shelve/TimedUnshelve/ /// Enable/Disable are wired at the node-manager seam; the Enable/Disable /// operations are produced by the condition's OnEnableDisable delegate. /// /// The acting user — the authenticated session identity's display/name. /// /// The free-text comment supplied with the call (the OPC UA LocalizedText payload's text), /// or null when none was provided. /// /// /// For TimedShelve, the absolute UTC instant the shelve auto-expires /// (DateTime.UtcNow + shelvingTime, where the OPC UA Duration shelvingTime is /// in milliseconds); null for every other operation. /// public sealed record AlarmCommand( string AlarmId, string Operation, string User, string? Comment, DateTime? UnshelveAtUtc);