Devserv: A Device Controller

SYNOPSIS
devserv [-d debug_level]  [-s N|n]  [-m S]  [-t ttl]  [-v video_address/video_port/video_ttl]  [-h video_host]  [-f file]  [--version]  [--help]


DESCRIPTION
devserv is a server for controlling video devices. The program is meant to be used in conjunction with a client program such as camclnt. devserv listens on the network for requests from clients and carries out these requests to drive the devices connected to the host computer. The devices that are currently supported are the Sony EVI-D30, Canon VC-C1, and Canon VC-C3 cameras in conjunction with the Panasonic WJ-MX50 Digital A/V Mixer. devserv supports requests to pan, tilt, and zoom the cameras, select the input source to the mixer/switcher, and do picture-in-picture. Although intended for remote control of video devices, devserv can be used for local control (in case it is inconvenient to use the hand-held remote controller unit). Requests are sent and received by UDP unicast and IP multicast. Devserv multicasts description messages when a client requests them, when any client request has been processed, or if 7.5 minutes have elapsed since the last description message was sent. Any client may send requests as long as they conform to the "Camera Remote Control Command Language" (see COMMAND SET).

OPTIONS
-d
Use debug_level to specify what is displayed on the terminal. 0: nothing is displayed; 1: initialization and termination status and error messages (if any) are displayed; 2: network events are displayed; 3: communication between the devices and devserv are displayed; 4: everything at levels 1, 2, and 3 is displayed. (The default level is 1.)
-s
Specify "N" or "n" to suppress turning off the devices when the program is terminated.
-m
Specify "S" to run in simulated mode. This means that actual RS232 communication is turned off while devserv behaves as though it were on. This feature may be useful for developing/testing other features or applications.
-t
Use ttl to specify an integer for the time-to-live for multicast messages. (The default value is 1.)
-v
Use video_address/video_port/video_ttl to specify the address, port, and time-to-live used by the video tool. This information is included in description messages. The default value is 0.0.0.0/0/0.
-h
Use video_host to specify the computer that is the source of the camera feed. This information is included in description messages. The default value is the local host.
-f
Use file to specify the name of the configuration file to use instead of the default. This file must reside in the home directory.
--version
Use this option to display the version number and quit.
--help
Use this option to display the command line synopsis and quit.
ENVIRONMENT

OPERATION
Since the device controller is a server, it is intended to be run in the background, without a graphical user interface. To operate the program, under UNIX, launch it from the command line. Under Windows, launch from the DOS shell command line (if you wish the options described above) or click on the devserv.exe icon (to run with default options). To quit, type "control-C".

Make sure that the main power switches of all attached devices are "on". On the Sony EVI-D30 and Panasonic WJ-MX50, the main power switches are on the back of the unit. Also make sure that the camera control and pan and tilter units of the Canon VC-C3 camera are turned on. The Canon VC-C1, Sony EVI-D30, and Panasonic WJ-MX50 allow the power to be turned on and off via remote control. However, the Canon VC-C3 does not have this capability. Therefore, devserv turns on the power for the Canon VC-C1, Sony EVI-D30, and Panasonic WJ-MX50 at startup (as long as the main power is turned on) and turns off the power when you quit the program (unless the -s option is used). devserv reads a file at startup to determine the hardware configuration. This file can also be used to set network addresses if you wish to override the default values. (See CONFIGURATION FILE and NETWORK COMMUNICATION below.)


HARDWARE CONFIGURATION

Since the current version of devserv (v1.x) supports RS232 devices, the RS232 cables for the cameras and video switcher must be connected to the appropriate serial ports (e.g., port A and/or B on a SPARCstation and COM1 through COM4 on a PC). Sony EVI-D30 cameras can be daisy-chained with up to 7 cameras per port. Refer to the user manuals for the specific devices for connections and configuration. Note that the Panasonic WJ-MX50 has an "RS422/RS232C Selection Switch" above the "Editing Control Connector" on its back panel. Set the selection switch to "RS232C." You must also set the SW701 switch to meet modem requirements. This is described in the Operating Instructions Manual for the Panasonic WJ-MX50.

CONFIGURATION FILE

This file is stored in the home directory. Under UNIX, this is $HOME/.devserv.config. Under Windows, the file name is "devconfig" and is placed in C:\ (or D:\), whatever is the home directory under Windows. This file specifies the hardware configuration (e.g., what devices are connected to which serial ports, client "handles" for referring to devices, device numbers to indicate order of connection to the serial port. The serial ports are listed by their full pathnames for UNIX or by port name for Windows (e.g., for solaris, use /dev/ttyx (where x = a,b, corresponding to ports A and B, respectively); for freeBSD, use /dev/ttydx (where x=0,1,..., corresponding to COM1, COM2, etc., respectively); for Irix, use /dev/ttydx or /dev/tttmx (where x = 1,2,...); for Windows, just specify COM1, COM2, ... Each device entry is the form:

device make   model  device_number    type    unit_number     port   lens_type
The device number given by "device_number" is used for internal device addressing. The addresses must be numbered 1, 2, 3, etc., in order from closest to the computer to the farthest away. NOTE: For the Sony EVI-D30, this number is NOT the camera number on the back of the camera unit. The camera numbers 1, 2, and 3 on the back of the unit are for use with the hand- held remote commander unit. THIS NUMBER IS INDEPENDENT OF THE unit_number. The type of lens (standard or wide-angle) on a camera is given by the lens_type field. If left blank, the default (standard) is used. If a wide-angle lens is used, specify "w" or "W". Since the client program will refer to the devices by the "handle" assigned by the device controller and this handle consists of the "type" and "unit_number", you must list these values. Sample entries for a SUN workstation are:
device   Sony EVI-D30    1    camera    1    /dev/ttya
device   Sony EVI-D30    2    camera    2    /dev/ttya
device    Panasonic WJ-MX50    1    videoswitch    1    /dev/ttyb
A sample entry for freeBSD where a Canon VC-C3 camera is attached to COM2 would be:
device    Canon VC-C3    1    camera    1    /dev/ttyd1    w
The entry above for Windows would be:
device    Canon VC-C3    1    camera    1    COM2    w
You may use "cam" for "camera" and "vid" for "videoswitch". The client handles in the above entries would be: "cam 1", "cam 2", "cam 3", and "vid 1".

The video information is optional and includes the address, port, and time-to-live used by the video tool, the host that is the source of the video feed, and a text description. Sample entries are:

         video 224.1.2.3/12345/16
         video_host mickey.disneyland.com
         text "Building XXX, Main Conference Room"

All lines that begin with "#" are treated as comments.

NETWORK COMMUNICATION

The device controller uses UDP to receive unicast client requests. The default UDP port is 5555. IP multicast is used by the device controller to send status or description messages. The default address and port are 224.35.36.37 and 5556. To override any or all of these values, make entries in the $HOME/.devserv.config file. Entries must be in the following format:

address    udpPort    port
address    multicastAddress    address
address    multicastPort    port
Example entries are:
address    udpPort    8885
address    multicastAddress    224.1.2.3
address    multicastPort    1234
The standard socket interface is used for this communication.

Users may write their own clients. They can use the standard socket interface for network communication between the clients and the device server or they may use the common communication library developed under the Collaboratory Interoperability Framework (CIF) project. To accommodate clients that utilize the CIF communication library, devserv also listens on a CIF UDP port to receive unicast client requests and transmits status and description messages via a CIF multicast channel. The default values for these communication channels are: udp port = 7775, multicast address = 224.35.36.37, multicast port = 7776. To override these values, make entries in the $HOME/.devserv.config file in the following format:

address    cifUDPPort    port
address    cifUUMAddress    multicast address
address    cifUUMPort    port

COMMAND SET

The device controller communicates with the client using ASCII text messages. While the camclnt program is available, new clients may be written. In order to communicate with devserv, messages must follow the format given by the Camera Remote Control Command Language. NOTE: A timestamp is given in each request. If the timestamp is less than that of the previously accepted command, the command is ignored (except for description requests).

BUGS

devserv may not accurately report whether a device is available or not when there are hardware failures during execution.

AUTHORS


 
Marcia Perry (mperry@george.lbl.gov), Lawrence Berkeley Laboratory, Berkeley, CA

 
Deb Agarwal (deba@george.lbl.gov), University of California, Berkeley and Lawrence Berkeley  Laboratory, Berkeley, CA