using Opc.Ua;
namespace ZB.MOM.WW.LmxOpcUa.Client.Shared.Adapters;
///
/// Abstracts OPC UA subscription and monitored item management.
///
internal interface ISubscriptionAdapter : IDisposable
{
uint SubscriptionId { get; }
///
/// Adds a data-change monitored item and returns its client handle for tracking.
///
/// The node to monitor.
/// The sampling interval in milliseconds.
/// Callback when data changes. Receives (nodeIdString, DataValue).
/// Cancellation token.
/// A client handle that can be used to remove the item.
Task AddDataChangeMonitoredItemAsync(NodeId nodeId, int samplingIntervalMs, Action onDataChange, CancellationToken ct = default);
///
/// Removes a previously added monitored item by its client handle.
///
Task RemoveMonitoredItemAsync(uint clientHandle, CancellationToken ct = default);
///
/// Adds an event monitored item with the given event filter.
///
/// The node to monitor for events.
/// The sampling interval.
/// The event filter defining which fields to select.
/// Callback when events arrive. Receives the event field list.
/// Cancellation token.
/// A client handle for the monitored item.
Task AddEventMonitoredItemAsync(NodeId nodeId, int samplingIntervalMs, EventFilter filter, Action onEvent, CancellationToken ct = default);
///
/// Requests a condition refresh for this subscription.
///
Task ConditionRefreshAsync(CancellationToken ct = default);
///
/// Removes all monitored items and deletes the subscription.
///
Task DeleteAsync(CancellationToken ct = default);
}