[opcuaclient] OpcUaClient — Per-tag advanced subscription tuning incl. deadband #332
Reference in New Issue
Block a user
Delete Branch "auto/opcuaclient/2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Per-tag advanced subscription tuning on
ISubscribable, with cross-driver back-compat preserved via default-impl.Core.Abstractions/ISubscribable.cs:MonitoredTagSpecrecord:TagName+ nullableSamplingIntervalMs/QueueSize/DiscardOldest/MonitoringMode/DataChangeFilter.DataChangeFilterSpecsub-record:Trigger+DeadbandType+DeadbandValue.DataChangeTrigger(Status / StatusValue / StatusValueTimestamp),DeadbandType(None / Absolute / Percent),SubscriptionMonitoringMode(Disabled / Sampling / Reporting).SubscribeAsync(IReadOnlyList<MonitoredTagSpec>, ...)overload with a default interface implementation that delegates to the legacy string-based overload. Modbus / S7 / TwinCAT / FOCAS / Galaxy.Proxy / AbCip / AbLegacy compile unchanged.Driver.OpcUaClient/OpcUaClientDriver.cs:SubscribeAsync(IReadOnlyList<string>, ...)now routes through the new overload.BuildMonitoredItemhelper maps every per-tag knob onto the SDK'sMonitoredItemoptions (Filter =new DataChangeFilter { Trigger, DeadbandType, DeadbandValue }).PercentDeadband'sBadFilterNotAllowedis caught aroundCreateItemsAsyncso other items in the batch still create.Disambiguated three pre-existing
cref="ISubscribable.SubscribeAsync"doc comments to silence ambiguous-reference errors underTreatWarningsAsErrors.Test plan
dotnet build— Core.Abstractions + OpcUaClient + 7 sibling drivers (Modbus/S7/TwinCAT/FOCAS/AbLegacy/AbCip/Galaxy.Proxy) all clean (0 / 0)dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Tests— 95 / 95 passed (12 new inOpcUaClientMonitoredTagSpecTests: defaults match legacy, sampling/queue/discard overrides, MonitoringMode mapping theory, absolute + percent deadband filter, trigger/deadband enum round-trips, default-impl routing through StubSubscribableDriver)dotnet test tests/ZB.MOM.WW.OtOpcUa.Core.Abstractions.Tests— 37 / 37 passed🤖 Auto-generated by the Mode-B execution loop. Closes #274.
Closes #274