				   SeaIOTest
		    Automated test utility for SeaIO cards

-------------------------------------------------------------------------------
DESCRIPTION:
-------------------------------------------------------------------------------
    SeaIoTest was written, surprisingly enough, as a test utility for our line 
of digital I/O cards.  It may be operated in either interactive or batch 
mode.  It makes use of the C++ class, DigitalIoDevice, which may be trimmed or 
extended by the end user for inclusion in other software products.  The 
DigitalIoDevice class is basically a C++ wrapper for the existing SeaI/O API. 

-------------------------------------------------------------------------------
INSTALLATION:
-------------------------------------------------------------------------------
    Ensure that your SeaI/O device has been properly installed in the
computer.  By default the SeaIOTest utility is installed to /usr/local/bin/ at
build time for the SeaIO Driver Suite.

-------------------------------------------------------------------------------
USAGE:
-------------------------------------------------------------------------------
seaiotest [ConfigFile]

 *Batch Mode:
    If [ConfigFile] is specified on the command line, SeaIoTest will try to
  start up in Batch Processing Mode.  If it cannot find the file, it will
  enter Interactive Mode (see below).
    The Config File is a simple text file with a list of <CR><LF>-
  delimeted commands to be processed in the order they are specified in the
  file.  The commands must all be in the condensed format specified below.
  See the EXAMPLES section for a sample ConfigFile.

 *Interactive Mode:
    If no [ConfigFile] is specified on the command line, SeaIoTest will
  automatically start up in Interactive Mode.  A simple menu will be presented
  to the user, specifying a number of single-letter commands which may be used
  to control the SeaI/O adapter.  To invoke one of these commands, the user
  may either enter just the letter representing the command, or specify a full
  condensed-format parameterized command (see below).
    If the single-letter command is used, and that command needs more
  parameters to be specified, the user will be prompted for the extra
  parameter(s).  After entering the appropriate parameters, the command will
  be executed, any relevant output will be displayed on the console, and the
  system will be ready to accept another command (condensed-format or
  otherwise).

-------------------------------------------------------------------------------
CONDENSED FORMAT:
-------------------------------------------------------------------------------
    If, for example, the user wishes to write a value to a port in
interactive mode, there are two ways of going about it.  In the first, Long
Format, the user would press 'w' (for "Write a byte to a port"), followed by
<CR>.  The user would then be prompted for the port to write (for the sake of
argument, let's say it was port 1) and the value to write (again, for the sake
of argument, imagine the desired value is 64).  There is a quicker way of
doing this. 

Instead of pressing the following key sequence:

  w<CR>
  1<CR>
  64<CR>
    
the user may simply enter all the parameters on one line like so:

  w 1 64<CR>

and not have to worry about fiddling with any pesky prompts.  We refer to this
as Condensed Format.  It is the only way of specifying commands when running
SeaIoTest in Batch Mode.

-------------------------------------------------------------------------------
AVAILABLE ACTIONS:
-------------------------------------------------------------------------------
This section lists the available test functions and their corresponding effects.

O (Open adapter):  This function will open the nth adapter installed in your
system.  Note adapters are enumerated in order of model number (for example:
3701, 3820, 8018...)

I (get adapter Info):  This function will return information about the currently
opened device.  Information such as numbers and locations of inputs and outputs
will be available.  Model number and base IO address will also be available, as
will the number of usable A/D and D/A channels.

S (Setup adapter):  This function allows the setup of all mode control words
simulataneously.  On devices with A/D channels, this function will be used to
set A/D conversion ranges.  Note that this function can not be used in batch
mode operation in it's current incarnatation; to configure inputs and outputs,
you must write directly to control ports.

R (Read port absolute):  This function will read the nth port.  The port layout
will be the one described in your device manual.

E (rEad port relative):  This function will read the nth input port.  Note that
if a port is not configured as an input, you will not be able to read it.

W (Write port absolute):  This function will attempt to write to the nth port.
Note that builtin software protection prevents attempting to write to inputs.
Also note that you can now write directly to configuration ports; this will be
the only way to configure your ports in batch operation mode.

T (wriTe port relative):  This function will write to the nth output port.  Note
that you will not be able to write to configuration ports with this function.

A (monitor Analog channels):  This function will read all of the available A/D
channels on your device.  Note if your device doesn't have any A/D channels
available, this function will do nothing.

D (write D/a converter):  This function will write to a specified D/A channel,
if your device has that D/A channel available.  [0x000, 0xFFF]

C (Count in binary):  This function will count in binary, on all output ports,
to a specified number [0-256).  Note that you may also provide a delay, in ms,
between each bit.

K (Knight-rider):  This function will toggle a single bit across all output
ports a specified number of times with a given delay, in ms.  This function gets
it's name from the 1980's TV series in which the car has a row of LED's with
scan back and forth similar to this function.

L (Loopback test):  This function assumes you have output ports 0-N wired
directly to input ports 0-N.  Note that if there are more outputs than inputs,
this function will fail.  The function will write a databyte to outputs 0-N and
then read inputs 0-N and if the device reads what was written, displays PASS.
The loopback starts by sending databyte 0xFF and then increments by 1 for each
specified number of times to loop.

-------------------------------------------------------------------------------
EXAMPLES:
-------------------------------------------------------------------------------
To start SeaIoTest in batch mode, running a command config file named
TestSeq.txt:
  $ seaiotest TestSeq.txt

The contents of TestSeq.txt may look something like the following:

-------TestSeq.txt-------- (this line would not be in the actual file)
o 0                        # Open port 0
w 0 24                     # Write the value 24 to port 0
w 1 48                     # Write the value 48 to port 1
r 0                        # Read the value at port 0
r 1                        # Read the value at port 1
-----End TestSeq.txt------ (this line would not be in the actual file)

Note that comments in configuration files are not supported at this time;
everything after the # symbols is not meant to go in the actual TestSeq.txt
file.

Also note that with the current version you will be unable to use Set adapter
state in batch mode.  This means that you will have to manually write to the
configuration ports to configure your card.  It also means you won't be able to
configure an A/D channel's conversion range.
