org.mbari.siam.foce.deployed
Class FOCEAnalogBoard

java.lang.Object
  extended by org.mbari.siam.foce.deployed.FOCEAnalogBoard
All Implemented Interfaces:
AnalogBoard, DigitalInputBoard

public class FOCEAnalogBoard
extends java.lang.Object
implements AnalogBoard, DigitalInputBoard

FOCEAnalogBoard encapsulates one Diamond Systems DMM-32X-AT Data acquisition board


Field Summary
protected  int _boardAddress
           
protected  int _boardIndex
           
protected  IOMapper _ioMapper
           
protected static java.lang.String AD_SAMPLE
           
protected static java.lang.String AD_SCAN
           
protected static java.lang.String AD_SETUP
           
protected static java.lang.String ANALOG_INIT
           
protected static int CHANS_PER_BOARD
           
protected static int DEFAULT_BOARD_ADDR
           
protected static int DEFAULT_BOARD_INT
           
protected static java.lang.String READ_DIO
           
 
Constructor Summary
FOCEAnalogBoard()
          Creates FOCEAnalogBoard at default address and interrupt vector.
FOCEAnalogBoard(int address)
          Creates FOCEAnalogBoard with default interrupt vector.
FOCEAnalogBoard(int address, int intVector)
          Constructor
 
Method Summary
 double analogSample(int chan)
          Convert one A/D channel to voltage
 double[] analogScan(int chan, int nchans)
          Convert multiple A/D channels to voltages
 void analogSetup(int chan, int range, int polarity, int gain)
          Set up one or more analog channels
 void close()
          Close this board.
 java.lang.String getName()
          Return name.
 int numChans()
          Return number of channels per board
 int readDIO(int port)
          Read DIO Port
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHANS_PER_BOARD

protected static final int CHANS_PER_BOARD
See Also:
Constant Field Values

DEFAULT_BOARD_ADDR

protected static final int DEFAULT_BOARD_ADDR
See Also:
Constant Field Values

DEFAULT_BOARD_INT

protected static final int DEFAULT_BOARD_INT
See Also:
Constant Field Values

ANALOG_INIT

protected static final java.lang.String ANALOG_INIT
See Also:
Constant Field Values

AD_SETUP

protected static final java.lang.String AD_SETUP
See Also:
Constant Field Values

AD_SAMPLE

protected static final java.lang.String AD_SAMPLE
See Also:
Constant Field Values

AD_SCAN

protected static final java.lang.String AD_SCAN
See Also:
Constant Field Values

READ_DIO

protected static final java.lang.String READ_DIO
See Also:
Constant Field Values

_boardAddress

protected int _boardAddress

_boardIndex

protected int _boardIndex

_ioMapper

protected IOMapper _ioMapper
Constructor Detail

FOCEAnalogBoard

public FOCEAnalogBoard(int address,
                       int intVector)
                throws java.io.IOException
Constructor

Parameters:
address - Address in I/O space for this board.
intVector - Interrupt vector number for this board (default 7).
Throws:
java.io.IOException

FOCEAnalogBoard

public FOCEAnalogBoard(int address)
                throws java.io.IOException
Creates FOCEAnalogBoard with default interrupt vector.

Parameters:
address - Address in I/O space for this board.
Throws:
java.io.IOException

FOCEAnalogBoard

public FOCEAnalogBoard()
                throws java.io.IOException
Creates FOCEAnalogBoard at default address and interrupt vector.

Throws:
java.io.IOException
Method Detail

analogSetup

public void analogSetup(int chan,
                        int range,
                        int polarity,
                        int gain)
                 throws java.io.IOException
Set up one or more analog channels

Specified by:
analogSetup in interface AnalogBoard
Throws:
java.io.IOException

analogSample

public double analogSample(int chan)
                    throws java.io.IOException,
                           java.lang.NumberFormatException
Convert one A/D channel to voltage

Specified by:
analogSample in interface AnalogBoard
Throws:
java.io.IOException
java.lang.NumberFormatException

analogScan

public double[] analogScan(int chan,
                           int nchans)
                    throws java.io.IOException,
                           java.lang.NumberFormatException
Convert multiple A/D channels to voltages

Specified by:
analogScan in interface AnalogBoard
Throws:
java.io.IOException
java.lang.NumberFormatException

readDIO

public int readDIO(int port)
            throws java.io.IOException,
                   java.lang.NumberFormatException
Description copied from interface: DigitalInputBoard
Read DIO Port

Specified by:
readDIO in interface DigitalInputBoard
Throws:
java.io.IOException
java.lang.NumberFormatException

close

public void close()
           throws java.io.IOException
Close this board. This closes the underlying IOMapper

Specified by:
close in interface AnalogBoard
Throws:
java.io.IOException

numChans

public int numChans()
Return number of channels per board

Specified by:
numChans in interface AnalogBoard

getName

public java.lang.String getName()
Return name.

Specified by:
getName in interface AnalogBoard
Specified by:
getName in interface DigitalInputBoard


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.