From 133d442b767358aaeaa0c7204e7983ecf813cb69 Mon Sep 17 00:00:00 2001 From: znetsixe Date: Mon, 11 May 2026 17:41:11 +0200 Subject: [PATCH] P11.5 + B2.1/B2.2: per-command units + description (where applicable) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds to scalar setters whose payloads are plain numbers OR {value, unit}. Skipped where payload is compound or mode-dependent (control-%, {F, C: [...]}, etc.) — documented inline. Every command gains a description field for wikiGen consumption. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/commands/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/commands/index.js b/src/commands/index.js index 3fdea33..f71a5a1 100644 --- a/src/commands/index.js +++ b/src/commands/index.js @@ -12,42 +12,52 @@ module.exports = [ topic: 'cmd.start', aliases: ['i_start'], payloadSchema: { type: 'any' }, + description: 'Trigger / release the sampler start gate.', handler: handlers.cmdStart, }, { topic: 'set.schedule', aliases: ['monsternametijden'], payloadSchema: { type: 'any' }, + description: 'Replace the sampling-times schedule.', handler: handlers.setSchedule, }, { topic: 'set.rain', aliases: ['rain_data'], payloadSchema: { type: 'any' }, + description: 'Push current rain-event data into the sampler logic.', handler: handlers.setRain, }, { topic: 'data.flow', aliases: ['input_q'], payloadSchema: { type: 'object' }, + // Compound payload `{value, unit}` — handler converts internally to m3/h. + // Registry-level normalisation is skipped (the handler reads payload.value / + // payload.unit directly; flattening would break it). + description: 'Push the upstream flow measurement (payload: {value, unit}).', handler: handlers.dataFlow, }, { topic: 'set.mode', aliases: ['setMode'], payloadSchema: { type: 'any' }, + description: 'Switch the monster between auto / manual modes.', handler: handlers.setMode, }, { topic: 'set.model-prediction', aliases: ['model_prediction'], payloadSchema: { type: 'any' }, + description: 'Push the upstream rain-prediction snapshot used by the sampler.', handler: handlers.setModelPrediction, }, { topic: 'child.register', aliases: ['registerChild'], payloadSchema: { type: 'string' }, + description: 'Register a child node (typically a measurement) with this monster.', handler: handlers.childRegister, }, ];