At SINQ serial devices are connected to a Macintosh computer. This Mac runs a serial port server which allows to read and write data through TCP/IP sockets to a serial port connected to the Mac. This document describes a simple interface for communicating with such serial devices.
The interface to a serial device connected to a Mac is initialised with the
following command given at the Tcl prompt:
Controller name computer port channel
This command opens a connection to the serial port on the Mac and
installs a new command in order to interact with it. The parameters:
Once the connection has been initialised name is available as a new command
in Tcl. Let us assume, MC as the name for the purpose of this description.
MC then can be used as follows:
MC -tmo value
Configures the timeout for the connection to value.
Value is in microseconds.
MC arg1 arg2 ..... argn
Everything after MC is written to the serial port. The reply received from
the port is returned.
All these commands can return errors. Mostly these refer to the wrong device being specified on initialisation. The others are network problems.