TCPIPClient¶
- class lsst.ts.tunablelaser.TCPIPClient(host, port, timeout=1)¶
Bases:
object
Implements the TCP/IP connection for the TunableLaser
- Parameters:
- Attributes:
Attributes Summary
Return True if a client is connected to this server.
Methods Summary
connect
()Connect to the server.
Disconnect from the server.
parse_reply
(reply)Return the parsed reply.
send_command
(message)Send a command to server and receive a reply.
Attributes Documentation
- connected¶
Return True if a client is connected to this server.
- Returns:
- bool
Methods Documentation
- async connect()¶
Connect to the server.
- async disconnect()¶
Disconnect from the server.
Safe to call even if disconnected.
- parse_reply(reply)¶
Return the parsed reply.
- async send_command(message)¶
Send a command to server and receive a reply.
- Parameters:
- message
str
The command to send to the server.
- message
- Returns:
- reply
bytes
The reply from the server.
- reply
- Raises:
RuntimeError
Raised if the client is not connected.