scope_decode_read
Read decoded serial data from the scope's SerialDecode subsystem and export to a .npz file. Compatible with UART, I2C, SPI, CAN, and other serial protocols. Returns file path and metadata.
Instructions
Read decoded serial data from the scope's SerialDecode subsystem.
The scope must already have a serial decode active (configured via its UI or scope_decode_configure_uart). Works with UART/RS-232, I2C, SPI, CAN, and any other protocol supported by the Decode option.
Reads the decoded table row-by-row using the VBS Table API and saves the result to a timestamped .npz file so the raw data is not embedded in the response. The file contains: time_s — float array, timestamp for each decoded frame/byte data — uint8 array, decoded byte values
Returns JSON with the file path and metadata. Load in Python with: import numpy as np d = np.load('/path/to/file.npz') times, data_bytes = d['time_s'], d['data']
Note: row-by-row VBS queries are slow (~0.05 s each). Decodes with hundreds of rows will take 10–20 s. Keep this in mind for large captures.
Args: decoder: Decode slot number — 1 or 2 (default 1)
Transport: VBS (app.SerialDecode.Decode{n}.Out.Result.*)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| decoder | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |