Auto: abcip-3.3 — read-strategy selector (WholeUdt / MultiPacket / Auto)
Closes #237
This commit is contained in:
@@ -40,7 +40,10 @@ public static class AbCipDriverFactoryExtensions
|
||||
DeviceName: d.DeviceName,
|
||||
ConnectionSize: d.ConnectionSize,
|
||||
AddressingMode: ParseEnum<AddressingMode>(d.AddressingMode, "device", driverInstanceId,
|
||||
"AddressingMode", fallback: AddressingMode.Auto)))]
|
||||
"AddressingMode", fallback: AddressingMode.Auto),
|
||||
ReadStrategy: ParseEnum<ReadStrategy>(d.ReadStrategy, "device", driverInstanceId,
|
||||
"ReadStrategy", fallback: ReadStrategy.Auto),
|
||||
MultiPacketSparsityThreshold: d.MultiPacketSparsityThreshold ?? 0.25))]
|
||||
: [],
|
||||
Tags = dto.Tags is { Count: > 0 }
|
||||
? [.. dto.Tags.Select(t => BuildTag(t, driverInstanceId))]
|
||||
@@ -137,6 +140,23 @@ public static class AbCipDriverFactoryExtensions
|
||||
/// Micro800 / SLC500 / PLC5 falls back to Symbolic with a warning.
|
||||
/// </summary>
|
||||
public string? AddressingMode { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// PR abcip-3.3 — optional per-device read-strategy override. <c>"Auto"</c>,
|
||||
/// <c>"WholeUdt"</c>, or <c>"MultiPacket"</c>. Defaults to <c>Auto</c> (the planner
|
||||
/// picks per-batch using <see cref="MultiPacketSparsityThreshold"/>). Family
|
||||
/// compatibility is enforced at <see cref="AbCipDriver.InitializeAsync"/>: explicit
|
||||
/// <c>MultiPacket</c> against Micro800 (no
|
||||
/// <see cref="PlcFamilies.AbCipPlcFamilyProfile.SupportsRequestPacking"/>) falls
|
||||
/// back to <c>WholeUdt</c> with a warning.
|
||||
/// </summary>
|
||||
public string? ReadStrategy { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// PR abcip-3.3 — sparsity-threshold knob applied when <see cref="ReadStrategy"/>
|
||||
/// resolves to <c>Auto</c>. Default <c>0.25</c>; clamped to <c>[0..1]</c>.
|
||||
/// </summary>
|
||||
public double? MultiPacketSparsityThreshold { get; init; }
|
||||
}
|
||||
|
||||
internal sealed class AbCipTagDto
|
||||
|
||||
Reference in New Issue
Block a user