org.mbari.siam.foce.deployed
Class FOCERelayBoard

java.lang.Object
  extended by org.mbari.siam.foce.deployed.FOCERelayBoard

public class FOCERelayBoard
extends java.lang.Object

FOCERelayBoard encapsulates one Real-Time Devices DM6952HR PC/104 Relay Board


Field Summary
protected  int _boardAddress
           
protected  int _boardIndex
           
protected  IOMapper _ioMapper
           
protected static int DEFAULT_BOARD_ADDR
           
protected static java.lang.String RELAY_INIT
           
protected static java.lang.String RELAY_OFF
           
protected static java.lang.String RELAY_ON
           
protected static java.lang.String RELAY_STATE
           
protected static int RELAYS_PER_BOARD
           
 
Constructor Summary
FOCERelayBoard()
          Creates FOCERelayBoard at default address
FOCERelayBoard(int address)
          Constructor
 
Method Summary
 void close()
          Close this board.
 java.lang.String getName()
          Return name.
 int numRelays()
          Power off a multiple relays
 void powerOffAll()
          Power off all relays
 void powerOffBit(int bit)
          Power off a single relay
 void powerOffBits(int bit, int numBits)
          Power off a multiple relays
 void powerOnAll()
          Power off all relays
 void powerOnBit(int bit)
          Power on a single relay
 void powerOnBits(int bit, int numBits)
          Power on a multiple relays
 int relayState()
          Return state of relays in relay board
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RELAYS_PER_BOARD

protected static final int RELAYS_PER_BOARD
See Also:
Constant Field Values

DEFAULT_BOARD_ADDR

protected static final int DEFAULT_BOARD_ADDR
See Also:
Constant Field Values

RELAY_INIT

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

RELAY_ON

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

RELAY_OFF

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

RELAY_STATE

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

_boardAddress

protected int _boardAddress

_boardIndex

protected int _boardIndex

_ioMapper

protected IOMapper _ioMapper
Constructor Detail

FOCERelayBoard

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

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

FOCERelayBoard

public FOCERelayBoard()
               throws java.io.IOException
Creates FOCERelayBoard at default address

Throws:
java.io.IOException
Method Detail

powerOnBit

public void powerOnBit(int bit)
                throws java.io.IOException
Power on a single relay

Throws:
java.io.IOException

powerOffBit

public void powerOffBit(int bit)
                 throws java.io.IOException
Power off a single relay

Throws:
java.io.IOException

powerOnAll

public void powerOnAll()
                throws java.io.IOException
Power off all relays

Throws:
java.io.IOException

powerOffAll

public void powerOffAll()
                 throws java.io.IOException
Power off all relays

Throws:
java.io.IOException

powerOnBits

public void powerOnBits(int bit,
                        int numBits)
                 throws java.io.IOException
Power on a multiple relays

Throws:
java.io.IOException

powerOffBits

public void powerOffBits(int bit,
                         int numBits)
                  throws java.io.IOException
Power off a multiple relays

Throws:
java.io.IOException

relayState

public int relayState()
               throws java.io.IOException,
                      java.lang.NumberFormatException
Return state of relays in relay board

Throws:
java.io.IOException
java.lang.NumberFormatException

close

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

Throws:
java.io.IOException

numRelays

public int numRelays()
Power off a multiple relays


getName

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



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.