Instrument.capture¶
Beta: This API may change shape in 0.1.x. It is not a frozen 1.0 contract.
Trigger a capture on this instrument and wait for completion.
Sends a capture_all command to the orb via WebSocket. The orb executes the instrument driver's full capture sequence (waveform, screenshot, measurements) and uploads results to the specified dataset.
Signature¶
capture(dataset_id: str, timeout: float=60.0, **kwargs: Any) -> dict[str, Any]
Parameters¶
| Name | Type | Required | Default |
|---|---|---|---|
dataset_id |
str |
yes | - |
timeout |
float |
no | 60.0 |
**kwargs |
Any |
no | - |
Fields¶
| Field |
|---|
dataset_id |
timeout |
**kwargs |
Return shape¶
dict[str, Any]
Permission¶
This is a local SDK helper. It does not call the CloudSprite HTTP API.
Usage¶
result = scope.capture(dataset_id=ds.id, timeout=30)
if result["success"]:
print(f"Captured {result['completed']}/{result['total']} commands")