P11.5 + B2.1/B2.2: per-command units + description (where applicable)
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user