Auto: ablegacy-8 — per-tag deadband / change filter

Closes #251
This commit is contained in:
Joseph Doherty
2026-04-25 23:50:07 -04:00
parent 69069aa3be
commit eb5286148e
9 changed files with 443 additions and 8 deletions

View File

@@ -22,9 +22,21 @@ public sealed record AbLegacyDeviceOptions(
string? DeviceName = null);
/// <summary>
/// One PCCC-backed OPC UA variable. <paramref name="Address"/> is the canonical PCCC
/// file-address string that parses via <see cref="AbLegacyAddress.TryParse(string?)"/>.
/// One PCCC-backed OPC UA variable. <c>Address</c> is the canonical PCCC file-address
/// string that parses via <see cref="AbLegacyAddress.TryParse(string?)"/>.
/// </summary>
/// <remarks>
/// PR 8 deadband fields:
/// <list type="bullet">
/// <item><c>AbsoluteDeadband</c> — when set, suppresses <c>OnDataChange</c> for numeric
/// tags unless <c>|new - prev| &gt;= AbsoluteDeadband</c>.</item>
/// <item><c>PercentDeadband</c> — when set, suppresses unless
/// <c>|new - prev| &gt;= |prev * Percent / 100|</c>; <c>prev == 0</c> always publishes.</item>
/// </list>
/// Booleans bypass deadband entirely (every transition publishes); strings + status
/// changes always publish; first-seen always publishes; both set → logical-OR (Kepware
/// semantics).
/// </remarks>
public sealed record AbLegacyTagDefinition(
string Name,
string DeviceHostAddress,
@@ -32,7 +44,9 @@ public sealed record AbLegacyTagDefinition(
AbLegacyDataType DataType,
bool Writable = true,
bool WriteIdempotent = false,
int? ArrayLength = null);
int? ArrayLength = null,
double? AbsoluteDeadband = null,
double? PercentDeadband = null);
public sealed class AbLegacyProbeOptions
{