micropython_read_stream
Read stream output from a connected MicroPython device for a set duration, stopping early on idle timeout or byte limit.
Instructions
接続中のデバイスから一定時間ストリーム出力を読み取る
Args:
duration: 読み取りを続ける最大秒数
idle_timeout: この秒数だけ無通信なら早期終了
max_bytes: 読み取る最大バイト数。超えると truncated=True
Returns:
ok: 成功 True
stdout: 読み取ったテキスト
truncated: max_bytes で打ち切られたら True
bytes_read: 実際に読んだバイト数
error: エラー時のメッセージ
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| duration | Yes | ||
| max_bytes | No | ||
| idle_timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | Yes | ||
| stdout | Yes | ||
| truncated | Yes | ||
| bytes_read | Yes |