INFO
Syntax
INFO
Description
Returns the complete state of the board in a single line: firmware and protocol versions, state, acquisition, headstage, channels, sampling rate, owner and network address. It is the first command to send when you connect, and the one to send again whenever an event tells you that something changed.
Response
OK INFO fw=<version> proto=<n> stream=<n> state=<state> mode=<mode> acq=<run|stop> setup=<0|1> config_id=<n> hs=<hs-state> chip=<model> hs_channels=<n> channels=<n> fs=<Hz> max_channels=<n> script=<script-state> dest=<ip|none> ip=<ip>
| Field | Description |
|---|---|
fw | Firmware version. |
proto | Version of the text protocol (currently 1). |
stream | Version of the data stream format (currently 1). |
state | Board state: wait_net, wait_headstage, headstage_fault, needs_setup, ready, running, busy. See Session and Ownership. |
mode | Acquisition mode — see SET_CHIP_MODE. |
acq | run while acquisition is running, otherwise stop. |
setup | 1 once SETUP has been done for the current configuration. |
config_id | Identifier of the current settings. Changes whenever a setting really changes. |
hs | Headstage state: ABSENT, DETECTED, READY or FAULT. |
chip | Opaque model identifier of the connected headstage (do not rely on its value). |
hs_channels | Number of channels of the headstage (0 until it is READY). |
channels | Number of channels actually streamed (can be lower than hs_channels, see SET_CHANNELS). |
fs | Sampling rate in Hz, per channel. |
max_channels | Largest channel count the device can stream. |
script | Studio program state: idle, uploading, loaded, running or error. |
dest | IP address of the board's owner (stream and events), or none. |
ip | IP address of the board. |
Replies may carry additional key=value fields. Ignore the ones you do not know.
Example
info.py
from hmcls_udp import Board
board = Board("192.168.1.11")
info = board.request("INFO")
print("state:", info["state"], "- channels:", info["channels"], "- fs:", info["fs"], "Hz")
if info["state"] == "needs_setup":
board.request("SETUP", timeout=5.0)