This is a minimal fork of py-ws7 relying on Telnet for the server / client communication.
This directly implements a server thread running continuously in the Wavemeter class allowing any client to connect and query the wavelength / frequency as long as one instance is running.
For the Telnet server it relies on TelnetServer.
- Clone the repository on the computer with the Wavemeter.
- run
python tests/TestServerWlm.py
- Clone the repository on the computer with the client.
- run
python tests/TestClientWlm.py
- run
python examples/SimpleServer.pyto launch the dummy server on the default port 1234. - In a second terminal run
python examples/SimpleClient.pyto verify the server is running correctly.
- run
python tests/TestServerWlm.pyto launch the server with dummy data (or the real one if you are on the Windows machine and you have the DLL) - In a second terminal, run
python tests/TestClientWlm.pyto connect to the server and query the wavelength / frequency. - Update this
print(client.get_wavelength(2))in the client to get the desired channel.