Compare commits
1 Commits
1a16f9c4f1
...
b0e8bbb95d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0e8bbb95d |
@@ -13,14 +13,14 @@
|
||||
|
||||
The registry lives in `src/commands/index.js`. Each descriptor maps a canonical `msg.topic` to a handler; aliases emit a one-time deprecation warning the first time they fire.
|
||||
|
||||
<!-- BEGIN AUTOGEN: topic-contract — populate via wiki-gen tool (TODO) -->
|
||||
<!-- BEGIN AUTOGEN: topic-contract -->
|
||||
|
||||
| Canonical topic | Aliases | Payload | Unit | Effect |
|
||||
|:---|:---|:---|:---|:---|
|
||||
| `set.simulator` | `simulator` | (ignored) | — | Toggles `source.toggleSimulation()` — flips `config.simulation.enabled`. |
|
||||
| `set.outlier-detection` | `outlierDetection` | (ignored) | — | Toggles `source.toggleOutlierDetection()` — flips `config.outlierDetection.enabled` and propagates the new value to `analogChannel.outlierDetection.enabled`. |
|
||||
| `cmd.calibrate` | `calibrate` | (ignored) | — | Calls `source.calibrate()` — if the rolling window is stable, captures the current output as the new `config.scaling.offset`. Aborts with a warn when unstable or when the calibration baseline is missing. |
|
||||
| `data.measurement` | `measurement` | mode-dependent (see below) | per channel (configured) | Push a raw sensor reading into the pipeline. Mode-dispatched in `handlers.dataMeasurement`: **analog** expects a number / numeric string → `source.inputValue = parsed`; **digital** expects an object keyed by channel name → `source.handleDigitalPayload(payload)`. Wrong shape for the configured mode logs a hint suggesting the other mode. |
|
||||
|---|---|---|---|---|
|
||||
| `set.simulator` | `simulator` | any | — | Toggle the built-in simulator on / off. |
|
||||
| `set.outlier-detection` | `outlierDetection` | any | — | Toggle / configure outlier detection on the measurement pipeline. |
|
||||
| `cmd.calibrate` | `calibrate` | any | — | Trigger a one-shot calibration of the measurement. |
|
||||
| `data.measurement` | `measurement` | any | — | Push a raw measurement (analog: number; digital: per-channel object). |
|
||||
|
||||
<!-- END AUTOGEN: topic-contract -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user