Skip to content

Instrument.state

Beta: This API may change shape in 0.1.x. It is not a frozen 1.0 contract.

Fetch live instrument state via WebSocket.

Sends get_instrument_state to the orb and waits for instrument_state.

Signature

state(sections: list[str] | None=None, timeout: float=15.0, **kwargs: Any) -> dict[str, Any]

Parameters

Name Type Required Default
sections list[str] \| None no None
timeout float no 15.0
**kwargs Any no -

Fields

Field
sections
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.state(sections=["timebase", "trigger"])
if result["success"]:
    print(result["state"]["timebase"])