Comtoudp Test Code Comtoudp: Program Synopsis Description
Comtoudp Test Code Comtoudp: Program Synopsis Description
Program
ComToUdp
Version
1.0
Synopsis
comtoudp [iniFile]
Description
ComToUdp is a utility program which receives NMXP data packets via a serial port, and forwards
them to NaqsServer via UDP. It will also receive command messages (retransmission request and
calibration commands) from NaqsServer via UDP, and forward them via the serial port. It is
intended for use in small acquisition systems comprising a single digitizer with one acquisition
computer.
Options
inifile the path to the ComToUdp configuration file. If no inifile parameter is
specified, ComToUdp looks for a file called ComToUdp.ini in its working
directory. The format of the configuration file is described below.
Running ComToUdp
Starting ComToUdp
To start ComToUdp from the command line, type
ComToUdp or ComToUdp inifile
where inifile is the path to the ComToUdp configuration file.
Stopping ComToUdp
It is important that ComToUdp be shutdown properly in order for the application to release its
system resources. To stop ComToUdp properly, type
quit <enter>
in the ComToUdp command window.
[ NetworkInterface ]
This section defines the UDP connection to NaqsServer.
Host = 224.1.11.3
Definition: the IP address to which incoming packets should be forwarded. This should
be either the IP address o f the Naqs machine, or a multicast address to which
NaqsServer subscribes.
Port = 1213
Definition: the UDP port to which incoming packets should be forwarded. This should
be the same as the port on which NaqsServer receives packets.
LocalPort = 0
Definition: the UDP port used to receive command packets from NaqsServer. This may
usually be set to zero; the system will then assign an arbitrary available port
number.
[ SerialInterface ]
This section defines the configuration of the serial port on which packets are to be received.
Port = COM1
Definition: the serial port on which packets are to be received (COM1 ... COM12).
Baud = 38400
Definition: the baud rate of the incoming data. This should be set equal to the baud
rate setting on the digitizer.
Scrambled = No
Definition: indicates if serial data are scrambled for transmission. Data are usually
scrambled when sent via radio. This setting should be the same as the
corresponding setting on the digitizer.
MaxPacketLength = 300
Definition: the maximum length in bytes of packets carried on the serial line.
ComToUdp will receive packets of any length up to this maximum; packets
need not all be the same length. For most efficient operation and quickest
recovery after transmission errors, this should be set equal to the length of
the longest packet expected from the digitizer.
[ Log ]
This section defines the location, name and verbosity of the ComToUdp log file.
LogFilename = ComToUdp.log
Definition: the name of the ComToUdp log file.
LogDirectory = logs
Definition: Pathname for the directory in which to store the ComToUdp log file.
This should NOT include the trailing slash.
Verbosity = Debug
Definition: The startup verbosity of the ComToUdp log file
(DEBUG, VERBOSE or INFO). Normal value is INFO.
Example of Inifile
// ComToUdp.ini
// Config file for the ComToUdp program
// Modified November 20, 2000
[ NetworkInterface ]
Host = 224.3.11.1
Port = 32000
LocalPort = 0
[ SerialInterface ]
Port = COM1
Baud = 38400
Scrambled = No
MaxPacketLength = 300
[ Log ]
LogFilename = ComToUdp.log
LogDirectory = logs
Verbosity = Debug