Session and Ownership
A board streams its data and sends its events to one PC at a time: the PC whose address was set with DEST. That PC is the board's owner.
| What | Goes to |
|---|---|
| Command replies and data lines | The PC that sent the command |
| Data stream (port 55151) | The owner |
Events (EVT …) | The owner |
Any PC can send commands at any time; ownership only decides who receives the stream and the events.
States of a board
INFO reports the board state in the state field:
state | Meaning |
|---|---|
wait_net | No network address yet |
wait_headstage | No headstage connected |
headstage_fault | A headstage is present but cannot be identified |
needs_setup | Ready to be configured: SETUP is required before START |
ready | Configured; START is accepted |
running | Acquisition is running |
busy | A measurement (impedance scan…) is in progress |
Taking a board over
- Read
destfromINFO(orGET_DEST).nonemeans nobody owns the board. - Send
DEST <your-ip>. - The previous owner receives
EVT dest takenand stops receiving the stream and the events.
Taking over does not interrupt a running acquisition or a Studio program: they simply continue, now streaming to the new owner.
Releasing a board
Send DEST NONE. The acquisition and the program keep running, but nothing is streamed and no event is sent until a new destination is set.
How the HMCLS app uses this
When it connects, the app reads INFO, takes DEST if the board has no owner, and runs SETUP by itself when the state is needs_setup. If another PC already owns the board, the app asks you to take control or to observe only. See Connecting to a Device.