PR #197 surfaced two integration-level wiring gaps in DriverNodeManager's
MarkAsAlarmCondition path; this commit fixes both and upgrades the integration
test to assert them end-to-end.
Fix 1 — addressable child nodes: AlarmConditionState inherits ~50 typed children
(Severity / Message / ActiveState / AckedState / EnabledState / …). The stack
was leaving them with Foundation-namespace NodeIds (type-declaration defaults) or
shared ns=0 counter allocations, so client Read on a child returned
BadNodeIdUnknown. Pass assignNodeIds=true to alarm.Create, then walk the condition
subtree and rewrite each descendant's NodeId symbolically as
{condition-full-ref}.{symbolic-path}
in the node manager's namespace. Stable, unique, and collision-free across
multiple alarm instances in the same driver.
Fix 2 — event propagation to Server.EventNotifier: OPC UA Part 9 event
propagation relies on the alarm condition being reachable from Objects/Server
via HasNotifier. Call CustomNodeManager2.AddRootNotifier(alarm) after registering
the condition so subscriptions placed on Server-object EventNotifier receive the
ReportEvent calls ConditionSink emits per-transition.
Test upgrades in AlarmSubscribeIntegrationTests:
- Driver_alarm_transition_updates_server_side_AlarmConditionState_node — now
asserts Severity == 700, Message text, and ActiveState.Id == true through
the OPC UA client (previously scoped out as BadNodeIdUnknown).
- New: Driver_alarm_event_flows_to_client_subscription_on_Server_EventNotifier
subscribes an OPC UA event monitor on ObjectIds.Server, fires a driver
transition, and waits for the AlarmConditionType event to be delivered,
asserting Message + Severity fields. Previously scoped out as "Part 9 event
propagation out of reach."
Regression checks: 239 server tests pass (+1 new event-subscription test),
195 Core tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>