record
Capture voltage, current, and power over a set duration to CSV and/or PNG, with optional device power switching and serial console logging for hardware power analysis.
Instructions
Record main voltage [V], current [A] and power [W] for duration_s seconds (0.01..600) into the server's output directory: a CSV file (columns time_s, voltage_v, current_a, power_w; rate_hz rows per second averaged, 1..50000, null = every sample) and/or a PNG plot over time titled with the Otii model and serial number, or with title (plain text, at most 200 characters), with a grey project note at the bottom right: footer replaces it (same limits), footer="" leaves it out. Select csv and png individually or together (at least one). name: plain file name without suffix (default: timestamped). Returns the absolute paths and avg/min/max/std per channel. power_on=true powers the device under test: the main output must be off; it is switched on pre_trigger_s seconds (0..10, less than duration_s) into the recording and off at the end. The time the switch-on command was sent is marked in the plot and in the CSV column output_on; power_on.command_sent_s in the result. serial_port (a /dev/ path) reads the serial console of the device under test at baud (8N1, nothing is sent) and adds a fourth plot panel with each line at its arrival; needs png.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "record"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv | No | ||
| png | No | ||
| baud | No | ||
| name | No | ||
| title | No | ||
| footer | No | ||
| rate_hz | No | ||
| power_on | No | ||
| duration_s | No | ||
| serial_port | No | ||
| pre_trigger_s | No |