pylabrobot.hamilton.transport.text_tcp.HamiltonTextTCP#

class pylabrobot.hamilton.transport.text_tcp.HamiltonTextTCP(host: str, port: int = 24652, write_timeout: float = 30, read_timeout: float = 3600)#

Bases: IOBase

A TCP connection to a Hamilton machine that speaks the text protocol.

A command is sent as one line and a reply, or a message the machine sends unasked, comes back as one line. There is no handshake and no keepalive. The connection must be opened with setup before it is read or written.

read and write deal in whole lines without their terminator, so a reply split across several TCP segments is returned once complete, and several replies in one segment are returned one by one.

Parameters: