Auto: abcip-4.2 — write deadband / write-on-change

Closes #239
This commit is contained in:
Joseph Doherty
2026-04-26 02:31:50 -04:00
parent 9202ebe5ef
commit da9936f7f0
9 changed files with 855 additions and 5 deletions

View File

@@ -279,6 +279,20 @@ public enum AddressingMode
/// <c>ScanRateMs &lt; 100</c> is clamped up. UDT member tags inherit the parent tag's
/// <c>ScanRateMs</c> at member-fan-out time. See
/// <c>docs/drivers/AbCip-Operability.md</c> §"Per-tag scan rate".</param>
/// <param name="WriteDeadband">PR abcip-4.2 — optional numeric write deadband. When set and both
/// the previous successfully-written value and the new write are numeric, the driver suppresses
/// the next write if <c>|new - last| &lt; WriteDeadband</c>. Suppressed writes still return
/// <c>Good</c> so the OPC UA write semantics observed by clients are unchanged — the driver
/// simply skips the wire round-trip. Mirrors Kepware's "Deadband (write)" knob and is the
/// write-side companion to the read-side deadband already shipped at the OPC UA monitored-item
/// layer. NaN / Infinity values bypass suppression (let the wire decide). See
/// <c>docs/drivers/AbCip-Operability.md</c> §"Write deadband / write-on-change".</param>
/// <param name="WriteOnChange">PR abcip-4.2 — optional write-on-change gate. When <c>true</c> and
/// the new write equals the previous successfully-written value, the driver suppresses the
/// write (returns <c>Good</c> without hitting the wire). Combines with <see cref="WriteDeadband"/>
/// for numeric tags — the deadband test takes priority for numerics, equality is the fallback
/// for non-numeric types (BOOL setpoints, STRING constants, etc.). Default <c>false</c> —
/// legacy behaviour where every write goes to the wire.</param>
public sealed record AbCipTagDefinition(
string Name,
string DeviceHostAddress,
@@ -290,7 +304,9 @@ public sealed record AbCipTagDefinition(
bool SafetyTag = false,
int? StringLength = null,
string? Description = null,
int? ScanRateMs = null);
int? ScanRateMs = null,
double? WriteDeadband = null,
bool WriteOnChange = false);
/// <summary>
/// One declared member of a UDT tag. Name is the member identifier on the PLC (e.g. <c>Speed</c>,