Phase 7 follow-up #244 — DriverSubscriptionBridge #192
Reference in New Issue
Block a user
Delete Branch "phase-7-fu-244-driver-bridge"
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?
Pumps live driver
OnDataChangenotifications intoCachedTagUpstreamSourcesoctx.GetTagin user scripts sees the freshest driver value. The last missing piece between #243 (composition kernel) and #246 (Program.cs wire-in).DriverSubscriptionBridgeIAsyncDisposable. PerDriverFeed: groups all paths for oneISubscribableinto a singleSubscribeAsynccall (consolidating polled drivers' work + giving native-subscription drivers one watch list), keeps a per-feed reverse map from driver-opaque fullRef back to script-side UNS path, hooksOnDataChangeto translate + push into the cache.DisposeAsyncawaitsUnsubscribeAsyncper active subscription + unhooks every handler so events post-dispose are silent.Empty
PathToFullRefmap → feed skipped. Subscribe failure on any feed unhooks that feed's handler + propagates so misconfiguration aborts bridge start cleanly. Double-StartAsyncthrows; double-DisposeAsyncis idempotent.OTOPCUA0001suppressed at the twoISubscribablecall sites with comments explaining the carve-out: bridge is the lifecycle-coordinator for Phase 7 subscriptions (one Subscribe at engine compose, one Unsubscribe at shutdown), not the per-call hot-path. DriverReaddispatch still goes throughCapabilityInvokerviaDriverNodeManager.Tests — 9 new = 29 Phase 7 tests total
DriverSubscriptionBridgeTestscovers: SubscribeAsync called with distinct fullRefs, OnDataChange pushes to cache keyed by UNS path, unmapped fullRef ignored, empty PathToFullRef skips Subscribe, DisposeAsync unsubscribes + unhooks (post-dispose events don't push), StartAsync called twice throws, DisposeAsync idempotent, Subscribe failure unhooks handler + propagates, ctor null guards.Phase 7 production wiring chain status
Program.csCompose call +SqliteStoreAndForwardSinklifecycle