Phase 7 Stream G follow-up — DriverNodeManager dispatch routing by NodeSourceKind #186
Reference in New Issue
Block a user
Delete Branch "phase-7-stream-g-followup-dispatch"
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?
Honors the ADR-002 discriminator at OPC UA Read/Write dispatch time. Virtual tag reads route to the
VirtualTagEngine-backedIReadable; scripted alarm reads route to theScriptedAlarmEngine-backedIReadable; driver reads continue to route to the driver's ownIReadable— no regression for any existing driver test.Changes
DriverNodeManagerctor gains optionalvirtualReadable+scriptedAlarmReadableparameters. When callers omit them (every existing driver test) the manager behaves exactly as before.NodeSourceKindtracked in_sourceByFullRefduringVariable()registration alongside the existing_writeIdempotentByFullRef/_securityByFullRefmaps.OnReadValuepicks theIReadableby source kind via the new internalSelectReadablehelper. When the engine-backedIReadableisn't wired (virtual tag node but no engine provided) the read returnsBadNotFoundrather than silently falling back to the driver — surfaces a misconfiguration instead of masking it.OnWriteValuegates onIsWriteAllowedBySourcewhich returns true only forDriver. Plan decision #6: virtual tags + scripted alarms reject direct OPC UA writes withBadUserAccessDenied. Scripts write virtual tags viactx.SetVirtualTag; operators ack alarms via the Part 9 method nodes.Tests — 7/7
DriverNodeManagerSourceDispatchTests(internal helpers viaInternalsVisibleTo):Driversource routes to driverIReadableVirtualsource routes to virtualIReadableScriptedAlarmsource routes to alarmIReadableVirtualsource with null virtualIReadablereturns null (→BadNotFound)ScriptedAlarmsource with null alarmIReadablereturns nullDriversource with null driverIReadablereturns null (preservesBadNotReadable)IsWriteAllowedBySource: onlyDriver=true(Virtual=false,ScriptedAlarm=false)Full solution builds clean. Phase 7 test total 197 green.
Next
Stream H (exit gate) — SealedBootstrap composition root for VirtualTagEngine + ScriptedAlarmEngine + historian sink, compliance script, full-solution baseline.