slmsuite.hardware.remote.Server#
- class Server(hardware, port=5025, timeout=0.5, allowlist=None)[source]#
Bases:
objectServer for handling client commands and interfacing with hardware.
Methods
identify_hardwareBlocking command to listen for client commands and process them once they are given.
- __init__(hardware, port=5025, timeout=0.5, allowlist=None)[source]#
Initializes a server to host slmsuite hardware: cameras and SLMs. Interface with this server using
RemoteSLMandRemoteCamera.- Parameters:
hardware (
List[object]) – List of hardware objects to serve.port (
int) – Port number to serve on. Defaults to5025(commonly used for instrument control).timeout (
float) – Timeout in seconds for the server to wait for a client.allowlist (
Optional[List[str]]) – List of IP addresses to allow to connect. Defaults toNone(allow all). Keep in mind that IP addresses can be spoofed, so thisallowlistprovides only modest security.