perf(s7): span-grouped reads — one PDU per contiguous block instead of one per tag
This commit is contained in:
@@ -69,6 +69,11 @@ public static class S7DriverFactoryExtensions
|
||||
// tags. The driver maps each RawTagEntry's TagConfig blob through S7TagDefinitionFactory
|
||||
// at Initialize; the legacy pre-declared DTO tag path (Name/Address → BuildTag) is retired.
|
||||
RawTags = dto.RawTags is { Count: > 0 } ? [.. dto.RawTags] : [],
|
||||
// Block-read grouping knobs. Mapped explicitly like every other key on this DTO — the
|
||||
// options object is never deserialised directly — so omitting them here would leave the
|
||||
// documented "-1 disables grouping" escape hatch unreachable from a deployed config.
|
||||
SpanReadMaxGapBytes = dto.SpanReadMaxGapBytes ?? S7DriverOptions.DefaultSpanReadMaxGapBytes,
|
||||
SpanReadMaxSpanBytes = dto.SpanReadMaxSpanBytes ?? S7DriverOptions.DefaultSpanReadMaxSpanBytes,
|
||||
Probe = new S7ProbeOptions
|
||||
{
|
||||
Enabled = dto.Probe?.Enabled ?? true,
|
||||
@@ -122,6 +127,11 @@ public static class S7DriverFactoryExtensions
|
||||
public List<RawTagEntry>? RawTags { get; init; }
|
||||
/// <summary>Gets the probe configuration.</summary>
|
||||
public S7ProbeDto? Probe { get; init; }
|
||||
/// <summary>Gets the largest hole the read planner reads through when merging tags into one
|
||||
/// block request; any value below zero disables block-read grouping. Null keeps the default.</summary>
|
||||
public int? SpanReadMaxGapBytes { get; init; }
|
||||
/// <summary>Gets the largest single planned block read in bytes. Null keeps the default.</summary>
|
||||
public int? SpanReadMaxSpanBytes { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>Data transfer object for S7 probe configuration.</summary>
|
||||
|
||||
Reference in New Issue
Block a user