Auto: twincat-3.1 — per-tag MaxDelay tuning

Closes #313
This commit is contained in:
Joseph Doherty
2026-04-26 01:45:12 -04:00
parent 621de94126
commit fb57717f6f
11 changed files with 261 additions and 9 deletions
@@ -96,6 +96,13 @@ public interface ITwinCATClient : IDisposable
/// <param name="type">Declared type; drives the native layout + callback value boxing.</param>
/// <param name="bitIndex">For BOOL-within-word tags — the bit to extract from the parent word.</param>
/// <param name="cycleTime">Minimum interval between change notifications (native-floor depends on target).</param>
/// <param name="maxDelayMs">
/// Per-tag <c>MaxDelay</c> in milliseconds — the upper bound on how long the runtime can
/// buffer / coalesce change events before dispatching them (PR 3.1 / issue #313).
/// <c>0</c> means "fire ASAP, no coalescing" (the pre-PR-3.1 default behaviour); larger
/// values let the runtime coalesce bursty high-frequency changes so the OPC UA queue
/// downstream doesn't flood. Plumbs straight into <c>NotificationSettings(mode, cycleTime, maxDelay)</c>.
/// </param>
/// <param name="onChange">Invoked with <c>(symbolPath, boxedValue)</c> per notification.</param>
/// <param name="cancellationToken">Cancels the initial registration; does not tear down an established notification.</param>
Task<ITwinCATNotificationHandle> AddNotificationAsync(
@@ -103,6 +110,7 @@ public interface ITwinCATClient : IDisposable
TwinCATDataType type,
int? bitIndex,
TimeSpan cycleTime,
int maxDelayMs,
Action<string, object?> onChange,
CancellationToken cancellationToken);