Skip to main content

Reply to "Python code to issue TMCC, Legacy, and PDI Commands"

Here is an example screen capture of a client control program sending commands to a server. Again, the server has the serial connection to an LCS SER2. The server is in the top window and the client is in the bottom window:

In the top window, the control program is launched in the normal way:

(legacyEnv) davids@Sprucewood-iMac PyLegacy (master) % src/cli/control.py


In the bottom window, the control program is launched with the special argument -server, which tells it to use client/server mode and send all commands to the program on the server 'localhost':

% src/cli/control.py -server localhost


In practice, you would specify the IP address of your server on your local network, like so:

% src/cli/control.py -server 192.168.3.35


Here, the IP Address 192.168.3.35 is the address of my development machine, an older iMac (from 2021).

This is all checked in, although I still haven't done any packaging nor distributed the code on PyPi. The GitHub sources are here: https://github.com/cdswindell/PyLegacy.

  -- Dave

Attachments

Images (2)
  • mceclip0
  • mceclip1
Last edited by cdswindell
×
×
×
×
×