using ZB.MOM.WW.OtOpcUa.Driver.AbLegacy.PlcFamilies; namespace ZB.MOM.WW.OtOpcUa.Driver.AbLegacy; /// /// AB Legacy (PCCC) driver configuration. One instance supports N devices (SLC 500 / /// MicroLogix / PLC-5 / LogixPccc). Per plan decision #41 AbLegacy ships separately from /// AbCip because PCCC's file-based addressing (N7:0) and Logix's symbolic addressing /// (Motor1.Speed) pull the abstraction in different directions. /// public sealed class AbLegacyDriverOptions { public IReadOnlyList Devices { get; init; } = []; public IReadOnlyList Tags { get; init; } = []; public AbLegacyProbeOptions Probe { get; init; } = new(); public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(2); } public sealed record AbLegacyDeviceOptions( string HostAddress, AbLegacyPlcFamily PlcFamily = AbLegacyPlcFamily.Slc500, string? DeviceName = null); /// /// One PCCC-backed OPC UA variable. is the canonical PCCC /// file-address string that parses via . /// public sealed record AbLegacyTagDefinition( string Name, string DeviceHostAddress, string Address, AbLegacyDataType DataType, bool Writable = true, bool WriteIdempotent = false); public sealed class AbLegacyProbeOptions { public bool Enabled { get; init; } = true; public TimeSpan Interval { get; init; } = TimeSpan.FromSeconds(5); public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(2); /// Probe address — defaults to S:0 (status file, first word) when null. public string? ProbeAddress { get; init; } = "S:0"; }