org.mbari.siam.foce.deployed
Class FOCESensorayBoard

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

public class FOCESensorayBoard
extends java.lang.Object
implements AnalogBoard

FOCESensorayBoard encapsulates one Sensoray 518 acquisition board


Nested Class Summary
 class FOCESensorayBoard.ChannelConfig
          ChannelConfig describes Sensoray sensor channels
 
Field Summary
protected  int _boardAddress
           
protected  FOCESensorayBoard.ChannelConfig[] _boardConfig
           
protected  int _boardIndex
           
protected  IOMapper _ioMapper
           
protected static java.lang.String AD_BOARD_ADDRESS
           
protected static java.lang.String AD_BOARD_TEMP
           
protected static java.lang.String AD_CONFIGURE_CHANNEL
           
protected static java.lang.String AD_FIRMWARE_VERSION
           
protected static java.lang.String AD_PRODUCT_ID
           
protected static java.lang.String AD_READ_CONFIG
           
protected static java.lang.String AD_SAMPLE
           
protected static java.lang.String AD_SCAN
           
protected static java.lang.String AD_SET_FILTER_CONSTANT
           
protected static java.lang.String AD_SETUP
           
protected static java.lang.String ANALOG_INIT
           
protected static int DEFAULT_BOARD_ADDR
           
protected static int NUMBER_OF_CHANNELS
           
protected static byte SENSOR_TYPE_THERMISTOR
           
protected static byte SENSOR_TYPE_VOLTAGE_5V
           
protected static int UNITS_DEGREES_C
           
protected static int UNITS_DEGREES_F
           
protected static int UNITS_DEGREES_K
           
protected static int UNITS_RAW
           
protected static int UNITS_SCALED
           
 
Constructor Summary
FOCESensorayBoard()
          Creates FOCESensorayBoard at default address and interrupt vector.
FOCESensorayBoard(int address)
          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.
 void configureChannel(FOCESensorayBoard.ChannelConfig config)
          Set one Sensoray channel (all parameters).
 void configureChannels(FOCESensorayBoard.ChannelConfig[] config)
          Set all Sensoray channel parameters Hook to enable full hardware configuration via service, but not currently used
 void defaultConfig()
          Set default copy of channel config.
 int getBoardAddress()
          Return board address.
 double getBoardTemp()
          Return board temperature.
 double getFirmwareVersion()
          Return firmware version.
 java.lang.String getName()
          Return name.
 int getProductID()
          Return board address.
 int numChans()
          Return number of channels per board
 java.lang.String readConfig()
          Return board address.
 void setConfig(FOCESensorayBoard.ChannelConfig[] config)
          Set default copy of channel config.
 void setFilterConstant(byte channel, byte filterConstant)
          Set the filter constant for one Sensoray channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUMBER_OF_CHANNELS

protected static final int NUMBER_OF_CHANNELS
See Also:
Constant Field Values

DEFAULT_BOARD_ADDR

protected static final int DEFAULT_BOARD_ADDR
See Also:
Constant Field Values

UNITS_RAW

protected static final int UNITS_RAW
See Also:
Constant Field Values

UNITS_SCALED

protected static final int UNITS_SCALED
See Also:
Constant Field Values

UNITS_DEGREES_F

protected static final int UNITS_DEGREES_F
See Also:
Constant Field Values

UNITS_DEGREES_C

protected static final int UNITS_DEGREES_C
See Also:
Constant Field Values

UNITS_DEGREES_K

protected static final int UNITS_DEGREES_K
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

AD_BOARD_TEMP

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

AD_PRODUCT_ID

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

AD_READ_CONFIG

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

AD_BOARD_ADDRESS

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

AD_FIRMWARE_VERSION

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

AD_CONFIGURE_CHANNEL

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

AD_SET_FILTER_CONSTANT

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

SENSOR_TYPE_THERMISTOR

protected static final byte SENSOR_TYPE_THERMISTOR
See Also:
Constant Field Values

SENSOR_TYPE_VOLTAGE_5V

protected static final byte SENSOR_TYPE_VOLTAGE_5V
See Also:
Constant Field Values

_boardAddress

protected int _boardAddress

_boardIndex

protected int _boardIndex

_ioMapper

protected IOMapper _ioMapper

_boardConfig

protected FOCESensorayBoard.ChannelConfig[] _boardConfig
Constructor Detail

FOCESensorayBoard

public FOCESensorayBoard(int address)
                  throws java.io.IOException
Constructor

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

FOCESensorayBoard

public FOCESensorayBoard()
                  throws java.io.IOException
Creates FOCESensorayBoard 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

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

getBoardAddress

public int getBoardAddress()
                    throws java.io.IOException
Return board address.

Throws:
java.io.IOException

getBoardTemp

public double getBoardTemp()
                    throws java.io.IOException
Return board temperature.

Throws:
java.io.IOException

getFirmwareVersion

public double getFirmwareVersion()
                          throws java.io.IOException
Return firmware version.

Throws:
java.io.IOException

getProductID

public int getProductID()
                 throws java.io.IOException
Return board address.

Throws:
java.io.IOException

readConfig

public java.lang.String readConfig()
                            throws java.io.IOException
Return board address.

Throws:
java.io.IOException

setFilterConstant

public void setFilterConstant(byte channel,
                              byte filterConstant)
                       throws java.io.IOException
Set the filter constant for one Sensoray channel. Enables filtering configuration via service

Throws:
java.io.IOException

configureChannel

public void configureChannel(FOCESensorayBoard.ChannelConfig config)
                      throws java.io.IOException
Set one Sensoray channel (all parameters). Hook to enable full hardware configuration via service, but not currently used

Throws:
java.io.IOException

configureChannels

public void configureChannels(FOCESensorayBoard.ChannelConfig[] config)
                       throws java.io.IOException
Set all Sensoray channel parameters Hook to enable full hardware configuration via service, but not currently used

Throws:
java.io.IOException

setConfig

public void setConfig(FOCESensorayBoard.ChannelConfig[] config)
Set default copy of channel config. Hook to enable full hardware configuration via service, but not currently used


defaultConfig

public void defaultConfig()
Set default copy of channel config. Hook to enable full hardware configuration via service, but not currently used. The foceio server already configures the channels, not much thought has been given to if/how the service should do the configuration and keep in sync w/ foceio end. It may only make sense to be able to adjust filterConstants, since everything else can't really be changed on a running system.



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.