[opcuaclient] OpcUaClient — Per-subscription tuning #331

Merged
dohertj2 merged 1 commits from auto/opcuaclient/1 into auto/driver-gaps 2026-04-25 15:11:25 -04:00
Owner

Summary

Lifts hard-coded OPC UA subscription parameters into a configurable OpcUaSubscriptionDefaults record on OpcUaClientDriverOptions.Subscriptions:

  • KeepAliveCount = 10
  • LifetimeCount = 1000
  • MaxNotificationsPerPublish = 0 (unlimited per OPC UA spec)
  • Priority = 0 (data subscription)
  • MinPublishingIntervalMs = 50 (replaces the prior 50ms hard-coded floor)
  • AlarmsPriority = 1 (alarm subscription gets a higher priority so alarms aren't starved during data bursts)

Wired into both SubscribeAsync (data path) and SubscribeAlarmsAsync (alarm path). Defaults exactly match prior hard-coded values — zero behavior change for existing deployments.

Test plan

  • dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient — clean (0 / 0)
  • dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Tests80 / 80 passed (2 new in OpcUaClientDriverScaffoldTests: back-compat defaults assertion, overrides-flow-through assertion)
  • Integration tests — skipped (live UA server required)

🤖 Auto-generated by the Mode-B execution loop. Closes #273.

Closes #273

## Summary Lifts hard-coded OPC UA subscription parameters into a configurable `OpcUaSubscriptionDefaults` record on `OpcUaClientDriverOptions.Subscriptions`: - `KeepAliveCount = 10` - `LifetimeCount = 1000` - `MaxNotificationsPerPublish = 0` (unlimited per OPC UA spec) - `Priority = 0` (data subscription) - `MinPublishingIntervalMs = 50` (replaces the prior 50ms hard-coded floor) - `AlarmsPriority = 1` (alarm subscription gets a higher priority so alarms aren't starved during data bursts) Wired into both `SubscribeAsync` (data path) and `SubscribeAlarmsAsync` (alarm path). Defaults exactly match prior hard-coded values — zero behavior change for existing deployments. ## Test plan - [x] `dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient` — clean (0 / 0) - [x] `dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.OpcUaClient.Tests` — **80 / 80 passed** (2 new in `OpcUaClientDriverScaffoldTests`: back-compat defaults assertion, overrides-flow-through assertion) - [ ] Integration tests — skipped (live UA server required) 🤖 Auto-generated by the Mode-B execution loop. Closes #273. Closes #273
dohertj2 added 1 commit 2026-04-25 15:11:21 -04:00
dohertj2 merged commit bf200e813e into auto/driver-gaps 2026-04-25 15:11:25 -04:00
dohertj2 deleted branch auto/opcuaclient/1 2026-04-25 15:11:26 -04:00
Sign in to join this conversation.