namespace ZB.MOM.WW.OtOpcUa.Core.ScriptedAlarms;

/// <summary>
///     The concrete OPC UA Part 9 alarm subtype a scripted alarm materializes as. The
///     engine's internal state machine is identical regardless of kind — the
///     <c>AlarmKind</c> only affects how the alarm node appears to OPC UA clients
///     (which ObjectType it maps to) and what diagnostic fields are populated.
/// </summary>
public enum AlarmKind
{
    /// <summary>Base AlarmConditionType — no numeric or discrete interpretation.</summary>
    AlarmCondition,
    /// <summary>LimitAlarmType — the condition reflects a numeric setpoint / threshold breach.</summary>
    LimitAlarm,
    /// <summary>DiscreteAlarmType — the condition reflects a specific discrete value match.</summary>
    DiscreteAlarm,
    /// <summary>OffNormalAlarmType — the condition reflects deviation from a configured "normal" state.</summary>
    OffNormalAlarm,
}

/// <summary>OPC UA Part 9 EnabledState — operator-controlled alarm enable/disable.</summary>
public enum AlarmEnabledState { Enabled, Disabled }

/// <summary>OPC UA Part 9 ActiveState — reflects the current predicate truth.</summary>
public enum AlarmActiveState { Inactive, Active }

/// <summary>OPC UA Part 9 AckedState — operator has acknowledged the active transition.</summary>
public enum AlarmAckedState { Unacknowledged, Acknowledged }

/// <summary>OPC UA Part 9 ConfirmedState — operator has confirmed the clear transition.</summary>
public enum AlarmConfirmedState { Unconfirmed, Confirmed }

/// <summary>
///     OPC UA Part 9 shelving mode.
///     <see cref="OneShot"/> suppresses the next active transition; once cleared
///     the shelving expires and the alarm returns to normal behavior.
///     <see cref="Timed"/> suppresses until a configured expiry timestamp passes.
///     <see cref="Unshelved"/> is the default state — no suppression.
/// </summary>
public enum ShelvingKind { Unshelved, OneShot, Timed }
