@@ -13,13 +13,35 @@ public sealed class AbLegacyDriverOptions
|
||||
public IReadOnlyList<AbLegacyDeviceOptions> Devices { get; init; } = [];
|
||||
public IReadOnlyList<AbLegacyTagDefinition> Tags { get; init; } = [];
|
||||
public AbLegacyProbeOptions Probe { get; init; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Driver-wide default per-operation timeout. Applies to every device unless that device
|
||||
/// overrides it via <see cref="AbLegacyDeviceOptions.Timeout"/> (PR 9).
|
||||
/// </summary>
|
||||
public TimeSpan Timeout { get; init; } = TimeSpan.FromSeconds(2);
|
||||
|
||||
/// <summary>
|
||||
/// PR 9 — driver-wide default retry count for transient
|
||||
/// <c>BadCommunicationError</c> reads. <c>null</c> ≡ <c>0</c> (single attempt). Applies
|
||||
/// to every device unless that device overrides it via
|
||||
/// <see cref="AbLegacyDeviceOptions.Retries"/>.
|
||||
/// </summary>
|
||||
public int? Retries { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Per-device options for the AB Legacy driver. PR 9 added optional <see cref="Timeout"/>
|
||||
/// and <see cref="Retries"/> overrides — chassis families have very different per-operation
|
||||
/// latency floors (SLC 5/01 RS-232 ~5 s; SLC 5/05 ~2 s; ML1100 ~3 s) so a single driver-wide
|
||||
/// timeout always misfires on at least one device. Both fields are optional and fall back
|
||||
/// to the driver-wide default on <see cref="AbLegacyDriverOptions"/>.
|
||||
/// </summary>
|
||||
public sealed record AbLegacyDeviceOptions(
|
||||
string HostAddress,
|
||||
AbLegacyPlcFamily PlcFamily = AbLegacyPlcFamily.Slc500,
|
||||
string? DeviceName = null);
|
||||
string? DeviceName = null,
|
||||
TimeSpan? Timeout = null,
|
||||
int? Retries = null);
|
||||
|
||||
/// <summary>
|
||||
/// One PCCC-backed OPC UA variable. <c>Address</c> is the canonical PCCC file-address
|
||||
|
||||
Reference in New Issue
Block a user