diff --git a/wiki/Reference-Contracts.md b/wiki/Reference-Contracts.md index fa3170d..6870d5b 100644 --- a/wiki/Reference-Contracts.md +++ b/wiki/Reference-Contracts.md @@ -16,19 +16,19 @@ The registry lives in `src/commands/index.js`. Each descriptor maps a canonical `msg.topic` to its handler; aliases emit a one-time deprecation warning the first time they fire. - + | Canonical topic | Aliases | Payload | Unit | Effect | -|:---|:---|:---|:---|:---| -| `cmd.start` | `i_start` | `any` (coerced to `Boolean`) | — | Sets `source.i_start`. On the next tick a sampling run begins if `validateFlowBounds` passes. | -| `set.schedule` | `monsternametijden` | array of AQUON rows (`SAMPLE_NAME`, `DESCRIPTION`, `SAMPLED_DATE`, `START_DATE`, `END_DATE`) | — | Stores the schedule and recomputes `nextDate` + `daysPerYear` for the configured `aquonSampleName`. | -| `set.rain` | `rain_data` | per-location rain forecast (Open-Meteo shape) | — | Aggregates hourly precipitation into `sumRain` / `avgRain`. **Skipped while `running=true`.** | -| `data.flow` | `input_q` | `{ value: number, unit: string }` | volumeFlowRate (any unit `convert()` accepts) | Converts to m³/h, pushes into `flow.manual.atequipment`. Blends with measured-child flow in `getEffectiveFlow()`. | -| `set.mode` | `setMode` | any | — | **Reserved.** Handler delegates to `source.setMode()` which is currently undefined; no-op today. | -| `set.model-prediction` | `model_prediction` | any | — | **Reserved.** Handler delegates to `source.setModelPrediction()` which is currently undefined; no-op today. | -| `child.register` | `registerChild` | string (child node id) | — | Register a `measurement` child with this monster. Port 2 wiring does this automatically in normal flows. | +|---|---|---|---|---| +| `cmd.start` | `i_start` | any | — | Trigger / release the sampler start gate. | +| `set.schedule` | `monsternametijden` | any | — | Replace the sampling-times schedule. | +| `set.rain` | `rain_data` | any | — | Push current rain-event data into the sampler logic. | +| `data.flow` | `input_q` | `object` | — | Push the upstream flow measurement (payload: {value, unit}). | +| `set.mode` | `setMode` | any | — | Switch the monster between auto / manual modes. | +| `set.model-prediction` | `model_prediction` | any | — | Push the upstream rain-prediction snapshot used by the sampler. | +| `child.register` | `registerChild` | `string` | — | Register a child node (typically a measurement) with this monster. | - + ### Mode / source / action allow-lists