using ZB.MOM.WW.OtOpcUa.Core.Abstractions;
namespace ZB.MOM.WW.OtOpcUa.Driver.MTConnect;
///
/// Driver-internal identity of one /sample subscription, matching the sibling drivers'
/// shape (Galaxy's GalaxySubscriptionHandle, the shared PollGroupEngine's
/// PollSubscriptionHandle): a monotonic per-driver id plus a diagnostic string that
/// carries it into logs.
///
///
///
/// Every handle shares ONE Agent stream. Unlike a polled driver, where each
/// subscription owns a loop, MTConnect's /sample long poll is per-Agent: the driver
/// opens exactly one and fans each chunk out to whichever handles subscribe the reporting
/// DataItem. The handle is therefore purely an identity — it owns no connection, no task,
/// and no cursor — and dropping one only stops the stream when it was the last.
///
///
/// A for value equality on the id, so a handle that has round-tripped
/// through the caller still resolves. The id is never reused within a driver instance.
///
///
/// The monotonic per-driver subscription id.
internal sealed record MTConnectSampleHandle(long SubscriptionId) : ISubscriptionHandle
{
///
public string DiagnosticId => $"mtconnect-sub-{SubscriptionId}";
}