|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.mbari.siam.devices.valve.ValveControl
public class ValveControl
Implementation of ValveIF for one Hanbay MDx-xxxDT valve connected to a B&B Electronics 232SDD16 Digital I/O controller
| Field Summary | |
|---|---|
protected org.mbari.siam.devices.valve.ValveAttributes |
_attributes
|
protected int |
_cmd1Bit
|
protected int |
_cmd2Bit
|
protected BB232SDD16 |
_digitalIO
|
protected int |
_feedback1Vector
|
protected int |
_feedback2Vector
|
protected int[] |
_funcMap
|
protected static org.apache.log4j.Logger |
_log4j
Log4j logger |
protected int |
_valveNum
|
protected static int[] |
positionMap
|
| Fields inherited from interface org.mbari.siam.distributed.devices.Valve2WayIF |
|---|
CLOSE_FUNC, OPEN_FUNC, POSITION_MOVING |
| Fields inherited from interface org.mbari.siam.distributed.devices.ValveIF |
|---|
POSITION_BACK, POSITION_CENTER, POSITION_LEFT, POSITION_RIGHT |
| Constructor Summary | |
|---|---|
ValveControl(BB232SDD16 digIO,
org.mbari.siam.devices.valve.ValveAttributes attributes,
int valveNum)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the valve. |
int |
getFunctionMap(int function)
Get the meaning of a function (open() or close(), in terms of valve position |
int |
getPosition()
Get current position of valve. |
java.lang.String |
getPositionName(int position)
Get the String name for the given valve position |
boolean |
isClosed()
Determine whether valve is in a closed position. |
boolean |
isOpen()
Determine whether valve is in an open position. |
void |
open()
Open the valve. |
int |
parsePositionName(java.lang.String name)
Parse the given String name into a valve position |
void |
setFunctionMap(int function,
int position)
Set the meaning of a function (open() or close(), in terms of valve position |
void |
setPosition(int position)
Explicitly set valve position |
protected boolean |
waitForPosition(int position,
long timeout)
Internal routine to wait for valve to reach position |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.log4j.Logger _log4j
protected static int[] positionMap
protected BB232SDD16 _digitalIO
protected org.mbari.siam.devices.valve.ValveAttributes _attributes
protected int _valveNum
protected int _cmd1Bit
protected int _cmd2Bit
protected int _feedback1Vector
protected int _feedback2Vector
protected int[] _funcMap
| Constructor Detail |
|---|
public ValveControl(BB232SDD16 digIO,
org.mbari.siam.devices.valve.ValveAttributes attributes,
int valveNum)
| Method Detail |
|---|
public void open()
throws java.io.IOException
open in interface Valve2WayIFjava.io.IOException
public void close()
throws java.io.IOException
close in interface Valve2WayIFjava.io.IOException
public int getPosition()
throws java.io.IOException
getPosition in interface ValveIFjava.io.IOException
public boolean isOpen()
throws java.io.IOException
isOpen in interface Valve2WayIFjava.io.IOException
public boolean isClosed()
throws java.io.IOException
isClosed in interface Valve2WayIFjava.io.IOException
protected boolean waitForPosition(int position,
long timeout)
public void setPosition(int position)
throws RangeException,
java.io.IOException
setPosition in interface ValveIFRangeException
java.io.IOException
public void setFunctionMap(int function,
int position)
throws RangeException,
java.io.IOException
setFunctionMap in interface ValveIFfunction - OPEN_FUNC or CLOSE_FUNC, function to mapposition - Position this function maps to
Note that isOpen() and isClosed() are hard wired, and ignore the positions
mapped by this function.
RangeException
java.io.IOException
public int getFunctionMap(int function)
throws RangeException,
java.io.IOException
getFunctionMap in interface ValveIFRangeException
java.io.IOException
public java.lang.String getPositionName(int position)
throws java.rmi.RemoteException
getPositionName in interface ValveIFjava.rmi.RemoteException
public int parsePositionName(java.lang.String name)
throws java.lang.IllegalArgumentException,
java.rmi.RemoteException
parsePositionName in interface ValveIFjava.lang.IllegalArgumentException
java.rmi.RemoteException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||