41 lines
2.4 KiB
C#
41 lines
2.4 KiB
C#
namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions;
|
|
|
|
/// <summary>
|
|
/// Optional physical acquisition capability. Successful establishment acknowledges the current
|
|
/// revision and supported nominal cadence; it does not guarantee actual device timing.
|
|
/// Unsupported drivers must not claim this capability.
|
|
/// </summary>
|
|
public interface IAcknowledgedAcquisitionSource
|
|
{
|
|
/// <summary>
|
|
/// Installs the complete reference set and callback. The callback may run before this task
|
|
/// completes. It delivers fresh acquisition results, not replayed cache values. The caller
|
|
/// must fence revisions and synchronously copy mutable values into bounded owned storage
|
|
/// before returning; the producer retains ownership until then. Failed or superseded
|
|
/// establishment must release any returned physical subscription handle.
|
|
/// </summary>
|
|
Task<AcquisitionSubscriptionResult> SubscribeAcquisitionAsync(AcquisitionSubscriptionRequest request,
|
|
Action<AcquisitionBatch> onAcquired, CancellationToken cancellationToken);
|
|
}
|
|
|
|
/// <summary>
|
|
/// An acknowledged acquisition that can replace the ordinary baseline subscription.
|
|
/// The returned handle produces the same initial and subsequent native value and status
|
|
/// change events as <see cref="ISubscribable.SubscribeAsync"/>, while the acquisition
|
|
/// callback reports every physical acquisition, including unchanged successful reads.
|
|
/// A driver must explicitly implement this capability only when both feeds describe the
|
|
/// same physical subscription and preserve their ordinary handle and ownership semantics.
|
|
/// </summary>
|
|
public interface IAcknowledgedBaselineAcquisitionSource : IAcknowledgedAcquisitionSource { }
|
|
|
|
/// <summary>Complete physical interest and revision fence for one producer incarnation.</summary>
|
|
public sealed record AcquisitionSubscriptionRequest(IReadOnlyList<string> FullReferences,
|
|
TimeSpan RequestedSamplingInterval, long DesiredRevision, long ProducerIncarnation);
|
|
|
|
/// <summary>The installed physical handle, supported nominal cadence, and acknowledged fence.</summary>
|
|
public sealed record AcquisitionSubscriptionResult(ISubscriptionHandle Handle, TimeSpan NominalSamplingInterval,
|
|
long DesiredRevision, long ProducerIncarnation);
|
|
|
|
/// <summary>Fresh device acquisition results under a specific desired revision and producer incarnation.</summary>
|
|
public sealed record AcquisitionBatch(long DesiredRevision, long ProducerIncarnation, IReadOnlyList<DataChangeItem> Items);
|