@@ -24,6 +24,16 @@ public sealed class SubscribeCommand : AbLegacyCommandBase
|
||||
"Publishing interval in milliseconds (default 1000).")]
|
||||
public int IntervalMs { get; init; } = 1000;
|
||||
|
||||
[CommandOption("deadband-absolute", Description =
|
||||
"PR 8 — absolute change filter. Suppress notifications until |new - prev| >= this value. " +
|
||||
"Booleans bypass; strings + status changes always publish.")]
|
||||
public double? DeadbandAbsolute { get; init; }
|
||||
|
||||
[CommandOption("deadband-percent", Description =
|
||||
"PR 8 — percent-of-previous change filter. Suppress notifications until " +
|
||||
"|new - prev| >= |prev * pct / 100|. prev=0 always publishes.")]
|
||||
public double? DeadbandPercent { get; init; }
|
||||
|
||||
public override async ValueTask ExecuteAsync(IConsole console)
|
||||
{
|
||||
ConfigureLogging();
|
||||
@@ -35,7 +45,9 @@ public sealed class SubscribeCommand : AbLegacyCommandBase
|
||||
DeviceHostAddress: Gateway,
|
||||
Address: Address,
|
||||
DataType: DataType,
|
||||
Writable: false);
|
||||
Writable: false,
|
||||
AbsoluteDeadband: DeadbandAbsolute,
|
||||
PercentDeadband: DeadbandPercent);
|
||||
var options = BuildOptions([tag]);
|
||||
|
||||
await using var driver = new AbLegacyDriver(options, DriverInstanceId);
|
||||
|
||||
Reference in New Issue
Block a user