namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip;
///
/// Reads the raw Template Object (class 0x6C) blob for a given UDT template instance id
/// off a Logix controller. The default production implementation (see
/// ) uses libplctag's @udt/{id} pseudo-tag.
/// Tests swap in a fake via .
///
public interface IAbCipTemplateReader : IDisposable
{
///
/// Read the raw template bytes for . Returns the
/// full blob the Read Template service produced — the managed
/// parses it into an .
///
/// The device connection parameters.
/// The template instance ID to read.
/// Token to cancel the operation.
/// The raw Template Object blob bytes.
Task ReadAsync(
AbCipTagCreateParams deviceParams,
uint templateInstanceId,
CancellationToken cancellationToken);
}
/// Factory for .
public interface IAbCipTemplateReaderFactory
{
/// Creates a new template reader instance.
/// A new instance.
IAbCipTemplateReader Create();
///
/// Creates a reader meant to serve MANY calls: the native
/// reader then holds one device lease from its first read until it is disposed, so a caller fetching
/// N templates opens one connection rather than one per template. Dispose it when the batch ends.
/// The default is (a transport whose reader has no per-read connection cost).
///
/// A new instance.
IAbCipTemplateReader CreateBatch() => Create();
}