P2 wave 2: convert pumpingStation orchestrator to BaseDomain + BaseNodeAdapter
specificClass.js: 860 → 245 lines.
PumpingStation extends BaseDomain. configure() wires basin / flow /
measurement / safety / control modules. tick() is the orchestration
trio: flowAggregator.tick() → safety.evaluate() → control.dispatch()
→ state snapshot → notifyOutputChanged().
Public surface preserved for tests: machines / stations /
machineGroups remain plain id-keyed dicts (registry is still source
of truth via ChildRouter; see OPEN_QUESTIONS.md 2026-05-10), legacy
delegates _controlLevelBased / _calc{Volume,Level}From* / percControl
getter+setter all retained. Calibration + setManualInflow forward to
the calibration module.
nodeClass.js: 263 → 45 lines.
Extends BaseNodeAdapter. static DomainClass = PumpingStation, static
commands = require('./commands'), static tickInterval = 1000 (predicted
volume integrator needs delta-time), static statusInterval = 1000.
buildDomainConfig maps the Node-RED uiConfig fields onto the domain
slice (basin / hydraulics / control / safety).
102 / 102 basic tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1011
src/specificClass.js
1011
src/specificClass.js
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user