Adamserver
Adamserver is an RPC (remote procedure call) process, which runs on the
ISFF base system. A remote procedure is a like a standard procedure
or function in a computer language, except that it can be called from a
separate process running on the same host or from a separate host on the
network. This is the method that is used to transfer information
between the ISFF base system and the data acquistion computers (ADAMS).
Remote Procedure Call Basics
Each RPC program is assigned a program number. This number uniquely
identifies that RPC program on a given server. When an RPC process
starts, it registers its program number with the system RPC process, rpcbind.
Each RPC program may support one or more remote procedures.
A client process which wants to invoke a remote procedure of an
RPC program on a server, must know the program's RPC number. The client
contacts rpcbind on the server requesting a connection to a given program
number. Once that connection is established, the client can invoke a procedure
on the RPC program. Any necessary parameters are passed over a socket to
server, which executes the function and passes the results back over the
socket to the client.
RPC Errors
RPC: Port mapper failure - RPC: Timed out
The client cannot contact the system rpc program on the server. The network
is probably down between the client and the server.
RPC: Program not registered
The requested RPC program is not running on the given server.
Adamserver Environment and Input Data Files
Many of adamserver's remote procedures return information that is contained
in the ISFF configuration files. The location of these files is defined
by the values of the ASTER, PROJECT and OPS environment variables, which
must be defined when adamserver is started.
-
ASTER
-
Root of ASTER software tree on the server, usually something like /usr/local/aster,
/net/aster or /home/aster.
-
PROJECT
-
Name of the current project. A directory called $ASTER/projects/$PROJECT
must exist on the server.
-
OPS
-
Name of an "operations period". The file $ASTER/projects/$PROJECT/ops.config
defines the operations periods for a given project. (Provide link)
-
Adamserver Remote Procedures
-
hosts Returns a list of hostnames and
their internet addresses. Adamserver reads this data from a file called
$ASTER/config/hosts, or, if that file is not found, from /etc/hosts.
Usually an ADAM does not need to know any hostnames and internet addresses
other than its own and the server's, which are set in its boot parameters,
so the file $ASTER/config/hosts can usually be empty.
-
getsiocfg Returns a data structure
detailing the serial port configuration of a given adam. The serial
port configuration describes which serial ports on the ADAM should be enabled,
along with the baud rates, parity, etc. Adamserver reads the serial
port configuration from the files $ASTER/projects/$PROJECT/$OPS/channel_config,
$ASTER/config/sio_converters and $ASTER/config/sio_msg_fmts.
-
configint The client passes a parameter
name as as string. Adamserver searches the file $ASTER/config/adats_config
for the given parameter and if found, and returns its integer value.
-
configstring Same as configint, except the parameter value is returned
as a character string.
-
rdate The server returns the current date
and time, as a 32 bit integer number of seconds, since Jan 1, 1970, 00:00
GMT. This is used to synchronize the clocks between the server and ADAM.
-
rgmtsecs The server returns the current time
as a number of milliseconds since midnight, GMT. This provides a more accurate
time of day synchronization.
-
getadamserverenv The server returns the value of a shell environment
variable, as a string.
-
getanalogcfg Returns a data structure
detailing the analog sampling configuration of a given adam, indicating
which ports and sampling rates. This information is read from $ASTER/projects/$PROJECT/$OPS/channel_config.
-
startblazingtape, stopblazingtape, startblazingdisk, stopblazingtape,
getblazingstatus These routines cause adamserver to make an RPC call
to the adamstatus program on the ADAM, requesting that it start or stop
the "blazing" (up to 20KHz) analog sampling process.
-
get_ttl_output_cfg This procedure
returns the ttl output configuration for a given ADAM. Three
output ports are available on each adam, which can be programmed to generate
ttl-level voltages on a given time schedule. This ttl information is also
read from $ASTER/projects/$PROJECT/$OPS/channel_config.