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

/// <summary>
///     Enumerates the driver-capability surface points guarded by Phase 6.1 resilience pipelines.
///     Each value corresponds to one method (or tightly-related method group) on the
///     <c>Core.Abstractions</c> capability interfaces (<see cref="IReadable"/>, <see cref="IWritable"/>,
///     <see cref="ITagDiscovery"/>, <see cref="ISubscribable"/>, <see cref="IHostConnectivityProbe"/>,
///     <see cref="IAlarmSource"/>, <see cref="IHistoryProvider"/>).
/// </summary>
/// <remarks>
///     Per the per-capability retry policy in <c>docs/v2/plan.md</c>: Read / HistoryRead /
///     Discover / Probe / AlarmSubscribe auto-retry; <see cref="Write"/> does NOT retry unless the
///     tag-definition carries <see cref="WriteIdempotentAttribute"/>. Alarm-acknowledge is treated
///     as a write for retry semantics (an alarm-ack is not idempotent at the plant-floor acknowledgement
///     level even if the OPC UA spec permits re-issue).
/// </remarks>
public enum DriverCapability
{
    /// <summary>Batch <see cref="IReadable.ReadAsync"/>. Retries by default.</summary>
    Read,

    /// <summary>Batch <see cref="IWritable.WriteAsync"/>. Does not retry unless tag is <see cref="WriteIdempotentAttribute">idempotent</see>.</summary>
    Write,

    /// <summary><see cref="ITagDiscovery.DiscoverAsync"/>. Retries by default.</summary>
    Discover,

    /// <summary><see cref="ISubscribable.SubscribeAsync"/> and unsubscribe. Retries by default.</summary>
    Subscribe,

    /// <summary><see cref="IHostConnectivityProbe"/> probe loop. Retries by default.</summary>
    Probe,

    /// <summary><see cref="IAlarmSource.SubscribeAlarmsAsync"/>. Retries by default.</summary>
    AlarmSubscribe,

    /// <summary><see cref="IAlarmSource.AcknowledgeAsync"/>. Does NOT retry — ack is a write-shaped operation.</summary>
    AlarmAcknowledge,

    /// <summary><see cref="IHistoryProvider"/> reads (Raw/Processed/AtTime/Events). Retries by default.</summary>
    HistoryRead,
}
