using ZB.MOM.WW.ScadaBridge.Commons.Messages.Streaming; namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Instance; /// /// Request for the Instance Actor's CURRENT alarm-condition snapshot, backing the /// script-facing Alarms.CurrentAsync() accessor (MES alarm-status API §5.2). /// /// /// A dedicated message rather than a reuse of DebugSnapshotRequest: the script /// accessor needs only the alarm rows, and the debug snapshot additionally materialises /// every attribute value on every call. Same local Ask path as /// — the script runs against its own Instance Actor, so /// there is no cross-cluster hop. /// /// /// Application-level correlation id echoed on the response. /// Unique name of the instance whose alarms are requested. /// When the request was issued (UTC). public record GetAlarmSnapshotRequest( string CorrelationId, string InstanceUniqueName, DateTimeOffset Timestamp); /// /// The Instance Actor's reply to a — the same /// enriched alarm rows the Debug View snapshot carries (computed alarms, mirrored native /// conditions, and configured-but-quiet native binding placeholders), projected to /// ScriptAlarm by the accessor rather than by the actor so the message stays a /// plain mirror of the internal state. /// /// Correlation id from the originating request. /// Unique name of the instance the snapshot belongs to. /// The instance's current alarm rows. /// When the snapshot was taken (UTC). public record GetAlarmSnapshotResponse( string CorrelationId, string InstanceUniqueName, IReadOnlyList Alarms, DateTimeOffset Timestamp);