Installation Instructions

Hardware Installation
RVP8 Users Manual
September 2005
2–27
2.3.7 Socket Interface
The RVP8 as shipped is configured to listen on a network port. It is ready to interface to a host
computer via the network using a program called DspExport. It is also ready to run some
commands on the RVP8 itself. The RVP8 comes with some built–in SIGMET supplied utilities
such as setup, dspx and ascope. These utilities are described in the IRIS Utilities Manual.
Because the RVP8 can only have one program controlling it at a time, use of a local program
like dspx will block network access, and vice versa.
How DspExport Works
DspExport is a daemon program which is normally configured to run all the time. When it
receives a socket connection request it will establish a connection to the RVP8. At this point,
multiple connections are allowed. It will only handle the “INFO”, “SETU” and “OPEN”
commands. Once the “OPEN” command is sent, an exclusive connection for I/O to the RVP8 is
established. If a second OPEN request comes in while the first is still active, it will fail, and
return the message “Device allocated to another user”. To see if it is running on your RVP8, try
typing
$ ps –aef | grep DspExport
During development, it can always be started up manually by typing “DspExport” at a shell
prompt. It can be started with the “–v” option for more detailed logging. It defaults to using
port 30740. If you wish to use another port, start it with an option such as “–port:12345”. The
command line option “–help” lists these options.
Source Examples
The source code for DspExport and for the dsp library is supplied on the RVP8 release cdrom.
This can be optionally installed as part of the upgrade procedure as discussed in Software
Installation manual. You will find DspExport in ${IRIS_ROOT}utils/dsp, and you will find
the dsp library in ${IRIS_ROOT}libs/dsp. In the library, you will find example code which
talks to DspExport in file OpenSocket.c, dsp_read.c and dsp_write.c. Search for the string
“SOCKET”, and you can see how the code differs between SCSI interface and socket interface.
Socket protocol
The socket interface basically supports all the “Host Computer Commands” in chapter 6. There
are a few layers of formatting on top of that. All messages going both ways consist at the lowest
level of an 8-character decimal ASCII number, followed by a block of data. The decimal
number indicates how many bytes follow. Generally, all data transfers are initiated by the host
computer by sending a block of data which consists of a command word followed by the “|”
character, followed by optional data.
It will respond to all commands with either an “Ack|” indicating acknowledgment that the
command was OK, or “Nak|” indicating that there was an error. For Nak, the reply will always
include a string indicating what the error was. For Ack there is optional data following.
On initial socket connection request DspExport will provide a response of either Nak indicating
the connection failed, and why, or Ack followed by some connection information. This Ack
string is in the form of name/value pairs, and will look something like: