Phase 7 Stream G — Address-space integration (NodeSourceKind + walker emits VirtualTag/ScriptedAlarm) #184

Merged
dohertj2 merged 1 commits from phase-7-stream-g-addressspace-integration into v2 2026-04-20 19:43:10 -04:00
Owner

Per ADR-002, adds the Driver/Virtual/ScriptedAlarm discriminator to DriverAttributeInfo so the DriverNodeManager dispatch layer can route Read/Write/Subscribe to the right runtime subsystem — drivers (unchanged), VirtualTagEngine (Phase 7 Stream B), or ScriptedAlarmEngine (Phase 7 Stream C). All existing call sites keep working because every new parameter defaults.

Changes

  • NodeSourceKind enum added to Core.AbstractionsDriver=0 / Virtual=1 / ScriptedAlarm=2.
  • DriverAttributeInfo gains Source / VirtualTagId / ScriptedAlarmId parameters; defaults preserve existing driver call sites.
  • EquipmentNamespaceContent gains optional VirtualTags + ScriptedAlarms collections.
  • EquipmentNodeWalker emits:
    • Virtual-tag variablesSource=Virtual, VirtualTagId set, Historize flag honored from the DB row.
    • Scripted-alarm variablesSource=ScriptedAlarm, ScriptedAlarmId set, IsAlarm=true (triggers the node-manager's AlarmConditionState materialization path that Galaxy + AB CIP ALMD already use).
    • Disabled VirtualTag / ScriptedAlarm rows skipped.

Tests — 13/13 in EquipmentNodeWalkerTests (5 new)

  • Virtual-tag variables carry Source=Virtual + VirtualTagId + Historize flag
  • Scripted-alarm variables carry Source=ScriptedAlarm + IsAlarm=true + Boolean data type
  • Disabled rows skipped
  • Null VirtualTags / ScriptedAlarms collections safe (back-compat for non-Phase-7 callers)
  • Driver tags default Source=Driver (pins the no-discriminator-regression contract)

Full solution builds clean.

Next (Stream G follow-up)

  • DriverNodeManager dispatch — switch (attr.Source) routing Read/Write/Subscribe to IVirtualTagSource (Stream B) or IScriptedAlarmSource (Stream C) instead of the driver
  • SealedBootstrap composition — load VirtualTag + ScriptedAlarm rows alongside existing Tag rows, hand to the walker + engines
  • End-to-end integration test — OPC UA client browses + reads a virtual tag, acknowledges a scripted alarm
Per ADR-002, adds the `Driver`/`Virtual`/`ScriptedAlarm` discriminator to `DriverAttributeInfo` so the `DriverNodeManager` dispatch layer can route `Read`/`Write`/`Subscribe` to the right runtime subsystem — drivers (unchanged), `VirtualTagEngine` (Phase 7 Stream B), or `ScriptedAlarmEngine` (Phase 7 Stream C). All existing call sites keep working because every new parameter defaults. ## Changes - `NodeSourceKind` enum added to `Core.Abstractions` — `Driver=0` / `Virtual=1` / `ScriptedAlarm=2`. - `DriverAttributeInfo` gains `Source` / `VirtualTagId` / `ScriptedAlarmId` parameters; defaults preserve existing driver call sites. - `EquipmentNamespaceContent` gains optional `VirtualTags` + `ScriptedAlarms` collections. - `EquipmentNodeWalker` emits: - **Virtual-tag variables** — `Source=Virtual`, `VirtualTagId` set, `Historize` flag honored from the DB row. - **Scripted-alarm variables** — `Source=ScriptedAlarm`, `ScriptedAlarmId` set, `IsAlarm=true` (triggers the node-manager's AlarmConditionState materialization path that Galaxy + AB CIP ALMD already use). - Disabled VirtualTag / ScriptedAlarm rows skipped. ## Tests — 13/13 in `EquipmentNodeWalkerTests` (5 new) - Virtual-tag variables carry `Source=Virtual` + `VirtualTagId` + `Historize` flag - Scripted-alarm variables carry `Source=ScriptedAlarm` + `IsAlarm=true` + `Boolean` data type - Disabled rows skipped - Null `VirtualTags` / `ScriptedAlarms` collections safe (back-compat for non-Phase-7 callers) - Driver tags default `Source=Driver` (pins the no-discriminator-regression contract) Full solution builds clean. ## Next (Stream G follow-up) - `DriverNodeManager` dispatch — `switch (attr.Source)` routing `Read`/`Write`/`Subscribe` to `IVirtualTagSource` (Stream B) or `IScriptedAlarmSource` (Stream C) instead of the driver - `SealedBootstrap` composition — load VirtualTag + ScriptedAlarm rows alongside existing Tag rows, hand to the walker + engines - End-to-end integration test — OPC UA client browses + reads a virtual tag, acknowledges a scripted alarm
dohertj2 added 1 commit 2026-04-20 19:43:01 -04:00
Per ADR-002, adds the Driver/Virtual/ScriptedAlarm discriminator to DriverAttributeInfo
so the DriverNodeManager's dispatch layer can route Read/Write/Subscribe to the right
runtime subsystem — drivers (unchanged), VirtualTagEngine (Phase 7 Stream B), or
ScriptedAlarmEngine (Phase 7 Stream C).

## Changes
- NodeSourceKind enum added to Core.Abstractions (Driver=0/Virtual=1/ScriptedAlarm=2).
- DriverAttributeInfo gains Source / VirtualTagId / ScriptedAlarmId parameters — all
  default so existing call sites (every driver) compile unchanged.
- EquipmentNamespaceContent gains VirtualTags + ScriptedAlarms optional collections.
- EquipmentNodeWalker emits:
  - Virtual-tag variables — Source=Virtual, VirtualTagId set, Historize flag honored
  - Scripted-alarm variables — Source=ScriptedAlarm, ScriptedAlarmId set, IsAlarm=true
    (triggers node-manager AlarmConditionState materialization)
  - Skips disabled virtual tags + scripted alarms

## Tests — 13/13 in EquipmentNodeWalkerTests (5 new)
- Virtual-tag variables carry Source=Virtual + VirtualTagId + Historize flag
- Scripted-alarm variables carry Source=ScriptedAlarm + IsAlarm=true + Boolean type
- Disabled rows skipped
- Null VirtualTags/ScriptedAlarms collections safe (back-compat for non-Phase-7 callers)
- Driver tags default Source=Driver (ensures no discriminator regression)

## Next
Stream G follow-up: DriverNodeManager dispatch (Read/Write/Subscribe routing by
NodeSourceKind), SealedBootstrap wiring of VirtualTagEngine + ScriptedAlarmEngine,
end-to-end integration test.
dohertj2 merged commit 4d4f08af0d into v2 2026-04-20 19:43:10 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#184