set_power
Turn a device's power on, off, or cycle it on a specified Labgrid place, then return the new power state.
Instructions
Drive power on/off/cycle on an acquired place, then return the resulting state.
``action`` must be one of "on", "off", "cycle"; anything else is
rejected with a tool error before the place is even checked or any
driver is touched. ``delay`` (§11.14) sets the off/on gap (in
seconds) ``NetworkPowerDriver.cycle()`` sleeps for; it is only
meaningful for ``action="cycle"`` -- passing it with "on"/"off" is
a tool error (clearer than silently ignoring it), raised alongside
the action check, before ownership or any driver call.
``resource_name`` picks one of several same-class power resources
on the place (§11.14); omit it for a single-power-resource place
(unchanged behavior).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"place": "<place>",
"action": "<action>"
},
"name": "set_power"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| delay | No | ||
| place | Yes | ||
| action | Yes | ||
| resource_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||