- Update all submodule URLs from gitea.centraal.wbd-rd.nl to gitea.wbd-rd.nl - Add settler as proper submodule in .gitmodules - Add agent skills, function anchors, decisions, and improvements - Add Docker configuration and scripts - Add manuals and third_party docs - Update .gitignore with secrets and build artifacts - Remove stale .tgz build artifact Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.9 KiB
3.9 KiB
Measurement Function Anchor (Preparation Baseline)
0) Connection Map (At a Glance)
- Node type:
measurement(nodes/measurement/measurement.js:1,nodes/measurement/measurement.html:14) - Consumes topics:
measurement,simulator,outlierDetection,calibrate(nodes/measurement/src/nodeClass.js:147) - Publishes periodic outputs:
- Output
0: process payload (nodes/measurement/src/nodeClass.js:137) - Output
1: influx payload (nodes/measurement/src/nodeClass.js:138) - Output
2: parent registration (registerChild) (nodes/measurement/src/nodeClass.js:118)
- Output
- Cross-node integrations (direct observed):
- Registers as child to parent with
positionVsParentand optionaldistance(nodes/measurement/src/nodeClass.js:118) - Emits measurement updates through
MeasurementContainerinspecificClass(nodes/measurement/src/specificClass.js:479)
- Registers as child to parent with
- Admin/UI endpoints:
GET /measurement/menu.js(nodes/measurement/measurement.js:23)GET /measurement/configData.js(nodes/measurement/measurement.js:33)POST /measurement/asset-reg(nodes/measurement/measurement.js:43)
1) Unit Table (Initial Baseline)
| Signal/Field | Represents | Default Unit | Source of Truth | Produced By | Consumed By | Fallback/Degraded Behavior |
|---|---|---|---|---|---|---|
inputValue |
raw measurement input | asset-dependent | nodes/measurement/src/specificClass.js:30 |
measurement topic or simulator |
scaling/smoothing pipeline | defaults to 0 |
outputAbs (mAbs) |
processed absolute output | config.asset.unit |
nodes/measurement/src/specificClass.js:472 |
updateOutputAbs() |
process/influx outputs + event emitter | constrained to configured abs range |
outputPercent (mPercent) |
normalized percent-like output | % semantic |
nodes/measurement/src/specificClass.js:483 |
updateOutputPercent() |
process/influx outputs | interpolated from abs range or observed min/max |
storedValues |
smoothing window values | same as processed value | nodes/measurement/src/specificClass.js:24 |
applySmoothing() |
smoothing and repeatability checks | capped to smoothWindow length |
simulation.enabled |
internal simulated signal mode | boolean | nodes/measurement/src/specificClass.js:52 |
config/topic toggle | tick() behavior |
off by default |
2) Class Identity
- Runtime registration + endpoints:
nodes/measurement/measurement.js - Node-RED wrapper/routing:
nodes/measurement/src/nodeClass.js - Domain measurement logic:
nodes/measurement/src/specificClass.js - Editor UI/defaults:
nodes/measurement/measurement.html
3) Current Gaps To Resolve Before Declaring Anchor Complete
- Node label precedence can hide fallback text due to expression order:
return this.positionIcon + " " + this.assetType || "Measurement";(nodes/measurement/measurement.html:63)
successvariable is assigned without declaration in editor save path:
success = window.EVOLV.nodes.measurement.assetMenu.saveEditor(this);(nodes/measurement/measurement.html:131)
toggleOutlierDetection()mutates config object to boolean:
this.config.outlierDetection = !this.config.outlierDetection;(nodes/measurement/src/specificClass.js:503)
- Input handler ignores numeric strings for
measurementtopic:
- accepts only
typeof msg.payload === 'number'(nodes/measurement/src/nodeClass.js:152)
4) Standardization Plan (Mirror RotatingMachine)
- Keep this anchor pair (
.md+.html) and evidence file maintained with behavior changes. - Maintain test layout under
nodes/measurement/test/:
basic/,integration/,edge/,helpers/
- Maintain examples package under
nodes/measurement/examples/:
README.md,basic.flow.json,integration.flow.json,edge.flow.json
5) Acceptance Criteria For Completion
- Required anchor artifacts exist and map to current behavior.
- Test suite runs with node-level command.
- Example flow files exist and pass flow-structure tests.