Compare commits

..

1 Commits

Author SHA1 Message Date
znetsixe
1d5e040af9 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>
2026-05-11 17:41:08 +02:00

View File

@@ -19,22 +19,26 @@ module.exports = [
topic: 'set.mode',
aliases: ['setMode'],
payloadSchema: { type: 'string' },
description: 'Switch the machine between auto / manual control modes.',
handler: handlers.setMode,
},
{
topic: 'cmd.startup',
payloadSchema: { type: 'any' },
description: 'Initiate the machine startup sequence.',
handler: handlers.startup,
},
{
topic: 'cmd.shutdown',
payloadSchema: { type: 'any' },
description: 'Initiate the machine shutdown sequence.',
handler: handlers.shutdown,
},
{
topic: 'cmd.estop',
aliases: ['emergencystop'],
payloadSchema: { type: 'any' },
description: 'Trigger an emergency stop.',
handler: handlers.estop,
},
{
@@ -43,6 +47,7 @@ module.exports = [
// one-time deprecation warning the first time it fires.
topic: 'execSequence',
payloadSchema: { type: 'object' },
description: 'Legacy umbrella that demuxes payload.action to startup / shutdown.',
handler: handlers.execSequenceAlias,
_legacy: true,
},
@@ -50,36 +55,44 @@ module.exports = [
topic: 'set.setpoint',
aliases: ['execMovement'],
payloadSchema: { type: 'object' },
// Control-percent setpoint — no units field (no `percent` measure in convert).
description: 'Move the machine to a control-% setpoint via execMovement.',
handler: handlers.setSetpoint,
},
{
topic: 'set.flow-setpoint',
aliases: ['flowMovement'],
payloadSchema: { type: 'object' },
units: { measure: 'volumeFlowRate', default: 'm3/h' },
description: 'Move the machine to a flow setpoint via flowMovement.',
handler: handlers.setFlowSetpoint,
},
{
topic: 'data.simulate-measurement',
aliases: ['simulateMeasurement'],
payloadSchema: { type: 'object' },
description: 'Inject a simulated sensor reading (pressure/flow/temperature/power).',
handler: handlers.simulateMeasurement,
},
{
topic: 'query.curves',
aliases: ['showWorkingCurves'],
payloadSchema: { type: 'any' },
description: 'Return the working curves for the machine on the reply port.',
handler: handlers.queryCurves,
},
{
topic: 'query.cog',
aliases: ['CoG'],
payloadSchema: { type: 'any' },
description: 'Return the centre-of-gravity (CoG) point on the reply port.',
handler: handlers.queryCog,
},
{
topic: 'child.register',
aliases: ['registerChild'],
payloadSchema: { type: 'string' },
description: 'Register a child measurement with this machine.',
handler: handlers.registerChild,
},
];