                        SeaMax for Linux v1.3.5
                             2011-06-03

See INSTALL for installation instructions.

The SeaMax package will install the SeaMax library described in the SeaMax
manual.  The API works the same on Linux and windows, with the exception of
the name being Lin instead of W32.  Also note the difference in the C++ class
name CSeaMaxLin and the C struct pointer SeaMaxLin.

In order to use the library in your code, you must include the seamax library
header file relevant to your project.  For C projects include the file
seamaxlin.h like so "#include <seamaxlin.h>".  If you choose to use the C++
wrapper class instead, "#include <cseamaxlin.h>".

Also remember to link the library when you compile your source:
	$(CC) -g -Wall -o MyProject code.c -lseamax

===============================================================================
LinSSD (Test/Example Application)
===============================================================================
  Included with this suite is a menu-driven or batch-mode operation test
application.  The source code is also provided for use in any way you see fit.
The application maybe be run in menu-driven mode where the user provides input
based on a list of commands or by passing as an argument a batch operation text
file.  Available commands consist of:

'o' - Open a SeaIO device module (the connection, not an actual device).
        This command expects a properly formatted API device string.  For 
        example to open a serial connection with special device file 
        /dev/ttyUSB0, use the string "sealevel_rtu://dev/ttyUSB0".  To open an
        Ethernet enabled module use the string 
        "sealevel_tcp://your.device.ip.address".  You may optionally input the
        device's DHCP name.

's' - Set module connection parameters.  These are the baud rate and parity you
        wish the parent to communicate with.  This function is not valid on
        Ethernet enabled modules.  Note:  If you desire your devices to 
        communicate at rates other than defaults, you must first open the
        devices using the default communication parameters then change each
        device's settings.  When you change a device's settings to anything
        other than the parent's settings, the parent will no longer be able to
        communicate with the child until its communication parameters match
        that of the child.  The values required are enumerated in the 
        seamaxlin.h header file.  Please use decimal.  Again, this function
        changes ONLY the parent or host's communication settings.

'c' - Close a SeaIO module connection.  This is the parent or host's 
        communication connection.  It isn't strictly necessary to manually call
        this function every time you wish to open another connection or exit the
        test application.  This function is called from within each.  The option
        is available if you desire to do so manually.

'p' - Open SeaIO device.  This is a specific device (child or client) connected
        to a "stack" or "daisy chain".  This function takes an argument of the
        slave ID of the device you wish to open.  You must, of course, have a
        valid open module connection before you can open a device on that
        connection.  The slave ID has a factory default value of 247.  The ID
        can be set via a circular DIP switch found on the side of the device,
        or you may leave the DIP switch set to 0 and set the slave ID via
        software to a value of your choosing between 1 and 247 (inclusive).

'e' - Set the communication parameters of a SeaIO device.  This means you will
        change the communication parameters for a child or client connected to
        this module.  Note:  This function is also not available to Ethernet
        enabled modules.  As soon as the new settings take effect you will no
        longer be able to communicate with the device until the parent or host
        communication parameters are set to match (command 's').

't' - Set the slave ID of a child or client device.  Note:  The device must have
        it's circular DIP switch set to an address of 0 to be able to use
        software address selection.  The values which the address may be set to
        are from 1 to 247.  247 is the factory default value.

'i' - Displays information about the currently connected module and open device.
        If no module is currently connected, the routine uses the CEthernet
        library to display a list of Ethernet modules found by UDP broadcast.

'u' - Setup configurable devices.  The only configurable devices are the 46X and
        470.  The 46X requires two control words to set the direction of the I/O
        of the 96 bits of I/O.  Bits 0-6 of each control word configure bytes
        0-6.  A value of 0 corresponds to an output and a 1 to an input.  Values
        must be entered in decimal.  So if you wish to set ports 1, 3, and 6 as
        inputs and the rest as outputs (0b00100101 or 0x25), you would use a 
        control word of 37.  The 470 expects two control words the first being 
        the reference offset.  Possible values for the offset are also 
        enumerated in the seamaxlin.h header file.  The second control word is 
        the channel mode.  This is the dip switch configuration of the card: 
        (Single ended, current loop, or differential.  These values are also 
        enumerated in the header file.

'h' - Set A/D channel range.  This function will set a particular channel's
        voltage range: 0-5V, 0-10V, -5-5V, -10-10V.  These values are again
        enumerated in the seamaxlin.h header file.

'r' - Read all IO.  This function will read all of the bytes of digital I/O on
        a device.  This function should work with all devices.

'w' - Write bank.  This function will write a data byte to the given bank
        or port.  On non PIO devices the bank number is simply the nth output
        port you wish to write to.  On PIO devices, there is no difference
        between a port configured for input and for output.  The data byte
        must be given in decimal form please.

'k' - An output test to toggle each bit one at a time back and forth.  This
        test resembles the light in the front of the car from the TV show
        Knight-Rider.  This function takes an argument repetitions for the
        number of times you desire the test to repeat.

'a' - This will dump all the current values read by the A/D converters
        available on a device.  Both the raw hex value returned from the
        converter and an English equivalent are displayed.  The Equivalent
        is the actual value in volts/amps read from the A/D.

'd' - This function will allow you to write a value to a D/A converter if one
        is available.  The function requires the channel to write to and a
        decimal value to write.  The maximum value available is 0x0FFF or 4095.
        The output will either be 10V or 5V depending on the device's jumper
        settings.

'q' - Quit the test application safely.

------------------------------
Notes on LinSSD program
------------------------------
1. SeaDAC Lite modules are not currently supported in LinSSD
   see the example folders for access to those modules.

------------------------------
A note on batch mode operation:
------------------------------
  If [ConfigFile] is specified on the command line, SeaIoTst will try to
start up in Batch Processing Mode.  If it cannot find the file, it will
enter Interactive Mode.
  The Config File is a simple text file with a list of <CR><LF>-
delimited commands to be processed in the order they are specified in the
file.  Comments are allowed and distinguished by anything following a #.
  For an example batch file view the batchop file found in the
examples/LinSSD directory.
