Table of Contents
marserver - communication server for mar345 IP-scanner and mardtb (desktop
beamline)
marserver [ OPTION ] [ hostname ] port
marserver
is a daemon-like program that talks (i.e. opens TCP/IP-sockets) to either
the mar345 Imaging Plate Detector System or the marresearch desktop beamline
on one side and to a suitable client program (e.g. program ’mar345dtb’) on
the other side. The main purpose of the program is to replicate TCP/IP-sockets
of the of the mar345 and mardtb controllers, respectively. This is a fix
to the problem, that the mar345 and mardtb hardware cannot talk to more
than one client at the time. If another client tries to open a new connection
to the hardware, the previous socket is closed and control is lost. Program
marserver opens only one socket to the corresponding port of the mar
hardware but accepts multiple instances (up to 10) of connections from
programs like mar345dtb. Thus, other applications that want to get the status
information or native controller messages may connect to program marserver
(rather than to the actual hardware) without affecting an active session
of the data collection program.
- -h, --help
- Provides usage information
- -v, --verbose
- Increase verbosity level
- --debug NUMBER
- Sets an undocumented
flag for debugging purposes.
Default: --debug 0
- -dtb, --base
- Connect to host 192.0.2.3 (mardtb). This is the
default.
- -mar, --scanner
- Connect to host 192.0.2.1 (mar345)
- -port #|STAT|COMM|DATA|MESS|ALL
- Connect to port no. ’#’ or one or more of STATUS, COMMAND, DATA or MESSAGE
ports.
Default: 4451 to 4454 (ALL)
- -a, --add NUMBER
- Accept client requests on hardware
port + NUMBER
Default: --add 1000
- --all
- Connect to all available hardware ports (COMM, STAT,
DATA, MESS). This is the default.
- -s, --status
- Connect to STATUS port only
- -c, --comm
- Connect to COMMAND port only
- -d, --data
- Connect to DATA port only
- -m, --mess
- Connect to MESSAGE port only
- --nostat
- Do not connect to STATUS
port
- --nocomm
- Do not connect to COMMAND port
- --nodata
- Do not connect to DATA
port
- --nomess
- Do not connect to MESSAGE port
- -s, --swap
- Force swapping of
bytes when transferring bytes to/from mar hardware
Default: don’t
Program marserver may open one socket
to either of the available ports of the mar hardware. If the mar hardware
becomes unavailable, all hardware sockets are closed and the program pings
the hardware and reopens the sockets as soon as the hardware becomes available.
This would NOT affect the client sockets.
Hardware | Port no. | Type | fIDescription |
dtb | 4451 | COMMAND | Reads hardware commands |
dtb | 4452 | STATUS | Send hardware status |
dtb | 4453 | DATA | Send ion. chamber data during
alignment |
dtb | 4454 | MESSAGE | Send native controller messages |
mar345 | 4441 | COMMAND | Reads
hardware commands |
mar345 | 4442 | STATUS | Send hardware status |
mar345 | 4443 | DATA | Send
scan data |
mar345 | 4444 | MESSAGE | Send native controller messages |
Program
marserver listens for connections of client programs on certain ports,
depending on the target hardware. Up to 10 simultaneous sockets are available
on each port. If a connection is closed, the program keeps listening to
the port for a new connection. The client ports can be altered by command
line argument -add N.
Hardware | Port no. | Type | Description |
dtb | 5451 | COMMAND | Reads
hardware commands |
dtb | 5452 | STATUS | Send hardware status |
dtb | 5453 | DATA | Send ion.
chamber data during alignment |
dtb | 5454 | MESSAGE | Send native controller messages |
mar345 | 5441 | COMMAND | Reads hardware commands |
mar345 | 5442 | STATUS | Send hardware
status |
mar345 | 5443 | DATA | Send scan data |
mar345 | 5444 | MESSAGE | Send native controller
messages |
Run marserver with mardtb hardware:
marserver -dtb
Run marserver with mar345 hardware, replicate the STATUS
port only and listen to clients on port 9442 (4442+5000)
marserver -mar -s -a 5000
mar345, mar345dtb, scan345
Claudio
Klein, marXperts GmbH, Norderstedt, Germany
© Copyright 2004 marXperts
GmbH, Norderstedt, Germany
marXperts GmbH | Phone: +49 - (40) - 529
884-0 |
Werkstr. 3 | FAX: +49 - (40) - 529 884-20 |
D-22844 Norderstedt - GERMANY | E-mail:
info@marXperts.com |
| http://www.marXperts.com
|
Table of Contents