@@ -90,7 +90,9 @@ public static class S7DriverFactoryExtensions
|
||||
Writable: t.Writable ?? true,
|
||||
StringLength: t.StringLength ?? 254,
|
||||
WriteIdempotent: t.WriteIdempotent ?? false,
|
||||
ScanGroup: string.IsNullOrWhiteSpace(t.ScanGroup) ? null : t.ScanGroup);
|
||||
ScanGroup: string.IsNullOrWhiteSpace(t.ScanGroup) ? null : t.ScanGroup,
|
||||
DeadbandAbsolute: t.DeadbandAbsolute,
|
||||
DeadbandPercent: t.DeadbandPercent);
|
||||
|
||||
private static T ParseEnum<T>(string? raw, string driverInstanceId, string field,
|
||||
string? tagName = null, T? fallback = null) where T : struct, Enum
|
||||
@@ -167,6 +169,23 @@ public static class S7DriverFactoryExtensions
|
||||
/// default publishing interval).
|
||||
/// </summary>
|
||||
public string? ScanGroup { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// PR-S7-C4 — optional absolute deadband threshold. Numeric tags whose
|
||||
/// <c>|new - prev|</c> is strictly less than this value are suppressed at
|
||||
/// the driver layer before <c>OnDataChange</c> fires. Ignored for non-numeric
|
||||
/// types. NaN / ±Infinity samples bypass the filter and always publish.
|
||||
/// </summary>
|
||||
public double? DeadbandAbsolute { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// PR-S7-C4 — optional percent deadband (0..100). Numeric tags whose
|
||||
/// <c>|new - prev|</c> is strictly less than <c>|prev| * pct / 100</c> are
|
||||
/// suppressed. Falls back to <see cref="DeadbandAbsolute"/> when
|
||||
/// <c>|prev| < 1e-6</c> (near-zero baseline rule). When both deadbands are
|
||||
/// set the filters are OR'd — publish if EITHER threshold triggers.
|
||||
/// </summary>
|
||||
public double? DeadbandPercent { get; init; }
|
||||
}
|
||||
|
||||
internal sealed class S7ProbeDto
|
||||
|
||||
Reference in New Issue
Block a user