namespace ZB.MOM.WW.OtOpcUa.Commons.OpcUa;
///
/// Commons-level projection of an alarm's full OPC UA Part 9 condition state, carried from the
/// Runtime engine to the SDK sink. Commons cannot reference Core.ScriptedAlarms (its
/// domain enums live there), so this DTO is deliberately primitive: every field is a
/// , the Commons-local enum, a
/// severity, or a . The Runtime host maps its Core
/// AlarmConditionState + AlarmSeverity down to this shape; the SDK
/// OtOpcUaNodeManager projects it back up onto a real AlarmConditionState node.
///
/// Whether the alarm condition is currently active (ActiveState).
/// Whether the active transition has been acknowledged (AckedState).
/// Whether the clear transition has been confirmed (ConfirmedState).
/// Whether the alarm is enabled (EnabledState); a disabled alarm reports no events.
/// The shelving mode (ShelvingState): unshelved, one-shot, or timed.
/// OPC UA severity on the 1..1000 scale (the SDK SetSeverity input).
/// The human-readable condition message (LocalizedText payload).
public sealed record AlarmConditionSnapshot(
bool Active,
bool Acknowledged,
bool Confirmed,
bool Enabled,
AlarmShelvingKind Shelving,
ushort Severity,
string Message);
///
/// Commons-local mirror of the Core ShelvingKind enum so this assembly carries no
/// dependency on Core.ScriptedAlarms. = no suppression,
/// = suppress the next active transition, = suppress
/// until a configured expiry. The Runtime host maps the Core enum onto these members; the SDK
/// sink maps them onto the Part 9 SetShelvingState(shelved, oneShot, shelvingTime) flags.
///
public enum AlarmShelvingKind
{
/// No shelving — the alarm behaves normally.
Unshelved,
/// One-shot shelve — suppresses the next active transition, then expires.
OneShot,
/// Timed shelve — suppresses until a configured expiry timestamp passes.
Timed,
}