Phase 7 follow-up #245 — ScriptedAlarmReadable adapter over engine state #191
Reference in New Issue
Block a user
Delete Branch "phase-7-fu-245-alarm-readable"
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?
Exposes each scripted alarm's current
ActiveStateasIReadableso OPC UA variable reads onSource=ScriptedAlarmnodes return the live predicate truth instead ofBadNotFound.ScriptedAlarmReadableWraps
ScriptedAlarmEngine+ implementsIReadable:DataValueSnapshot(true, Good)DataValueSnapshot(false, Good)DataValueSnapshot(null, BadNodeIdUnknown)— surfaces misconfiguration rather than silently reading falsePhase7EngineComposer.Composenow returns this asScriptedAlarmReadablewhenScriptedAlarmrows are present.ScriptedAlarmSource(theIAlarmSourcefor the event stream) stays in place — theIReadableis a separate adapter over the same engine.Tests — 6 new + 1 updated composer test = 19 Phase 7 tests
ScriptedAlarmReadableTestscovers: inactive + active predicate → bool snapshot, unknown alarm id →BadNodeIdUnknown, batch order preservation, null-engine + null-fullReferences guards. The active-predicate test usesctx.GetTagon a seeded upstream value to drive a real cascade through the engine.Updated
Phase7EngineComposerTeststo assertScriptedAlarmReadableis non-null when alarms compose, null when only virtual tags.Remaining Phase 7 production wiring
CachedTagUpstreamSourcefrom live driver subscriptionsProgram.csCompose call +SqliteStoreAndForwardSinklifecycle + Galaxy.Host IPC writerTask #240 (live E2E smoke) unblocks once both land.