using ZB.MOM.WW.OtOpcUa.Core.Abstractions; namespace ZB.MOM.WW.OtOpcUa.Core.AlarmHistorian; /// /// The event shape the historian sink consumes — source-agnostic across scripted /// alarms + Galaxy-native + AB CIP ALMD + any future IAlarmSource per Phase 7 plan /// decision #15 (sink scope = all alarm sources, not just scripted). A per-alarm /// HistorizeToAveva toggle on the producer side gates which events flow. /// /// Stable condition identity. /// UNS path of the Equipment node the alarm hangs under. Doubles as the "SourceNode" in Historian's alarm schema. /// Human-readable alarm name. /// Concrete Part 9 subtype — "LimitAlarm" / "DiscreteAlarm" / "OffNormalAlarm" / "AlarmCondition". Used as the Historian "AlarmType" column. /// Mapped to Historian's numeric priority on the sink side. /// /// Which state transition this event represents — "Activated" / "Cleared" / /// "Acknowledged" / "Confirmed" / "Shelved" / "Unshelved" / "Disabled" / "Enabled" / /// "CommentAdded". Free-form string because different alarm sources use different /// vocabularies; the Galaxy.Host handler maps to the historian's enum on the wire. /// /// Fully-rendered message text — template tokens already resolved upstream. /// Operator who triggered the transition. "system" for engine-driven events (shelving expiry, predicate change). /// Operator-supplied free-form text, if any. /// When the transition occurred. public sealed record AlarmHistorianEvent( string AlarmId, string EquipmentPath, string AlarmName, string AlarmTypeName, AlarmSeverity Severity, string EventKind, string Message, string User, string? Comment, DateTime TimestampUtc);