Covers Engine 2.0.0
Commanding and Control
Understand automatic ownership, manual override, and observe-only channels.
RAPID enforces value-write authority inside the engine. The interface, clients, DCode, and plugins all use this authority model.
Policies
| Policy | Who can update the value? |
|---|---|
free | Any normal writer. |
automatic | The active automatic controller. |
automatic_override | The active safety/interlock controller; it supersedes ordinary automation. |
manual_override | The operator recorded as active controller. |
observe_only | The owning runtime source; operators cannot write the value. |
control_owner identifies the automatic owner, such as task:tasks_fill. active_controller identifies who currently controls the channel. commanded_by records the trusted origin of the last accepted value write, not who could write next.
Claim from DCode
task_sequence docs_demo_command:
claim |demo_output|
command |demo_output| = 25
free |demo_output|claim takes automatic ownership without changing the value. command claims a free channel and writes it. A plain assignment such as |demo_output| = 25 does not claim a free channel.
Use set for runtime-owned, observe-only values:
task_sequence docs_demo_status:
set |demo_status| = 1C++ plugin tasks and loops use the matching claimChannel, commandChannel, setChannel, and freeChannel SDK methods. Task and loop origins are tracked by the engine.
Automatic override
Use override for an explicit safety or interlock action that must supersede
ordinary automation without making calculations generally command-capable.
It is available to CAESAR code, calculations, and declared-event reactions:
on_firing:
if value == 1:
override |fuel_valve| = 0
if value == 0:
free |fuel_valve|The newest automatic override is active. Its free restores the policy and
controller present before the first automatic override. Manual operator control
still wins; releasing it returns to the automatic override, not directly to
the ordinary task.
Take manual control
Use the interface’s explicit manual-control action to override an automatically owned channel. The engine must classify the connection as an operator, and the channel must have an automatic owner. Headless clients can make normal writes allowed by the channel policy, but cannot take or release operator manual override.
The engine preserves control_owner and changes active_controller to the operator. Automation cannot continue overwriting the value during that override. Release manual control through the interface to restore the automatic owner’s permission to write; inspect the next accepted value rather than assuming a particular output value was restored.
Stop and cleanup
When a task stops or a loop is removed, its automatic channels return to free, including those currently under manual override. The stored output value is not itself a stop command. Implement the intended final output explicitly in task/driver shutdown logic.
Observe-only channels established by set remain protected after the controller stops. An explicit free releases that policy.
Task handles such as _running, _hold, and _target_frequency are intentionally writable controls. Measured diagnostics such as _actual_frequency are observe-only.
If a command does not work
Inspect the channel in Channel Search. Check its policy, owner, active controller, and provenance. Rejected writes leave the value unchanged. For remote channels, confirm the node qualifier; authority is enforced by the owning runtime.
An accepted value write can execute inline calculations, but physical actuation depends on the driver and hardware. Check independent feedback when available.