namespace ZB.MOM.WW.OtOpcUa.Driver.AbLegacy; /// /// Wire-layer abstraction over a single PCCC tag. Mirrors IAbCipTagRuntime's shape so /// the same test-fake pattern applies; the only meaningful difference is the protocol layer /// underneath (ab_pccc vs ab_eip). /// public interface IAbLegacyTagRuntime : IDisposable { Task InitializeAsync(CancellationToken cancellationToken); Task ReadAsync(CancellationToken cancellationToken); Task WriteAsync(CancellationToken cancellationToken); int GetStatus(); object? DecodeValue(AbLegacyDataType type, int? bitIndex); void EncodeValue(AbLegacyDataType type, int? bitIndex, object? value); } public interface IAbLegacyTagFactory { IAbLegacyTagRuntime Create(AbLegacyTagCreateParams createParams); } public sealed record AbLegacyTagCreateParams( string Gateway, int Port, string CipPath, string LibplctagPlcAttribute, string TagName, TimeSpan Timeout);