org.mbari.siam.foce.devices.controlLoop
Class InputConnector

java.lang.Object
  extended by org.mbari.siam.foce.devices.controlLoop.InputConnector
All Implemented Interfaces:
java.rmi.Remote, ControlInputIF
Direct Known Subclasses:
OSDTInputConnector, RawInputConnector, RegistryInputConnector

public abstract class InputConnector
extends java.lang.Object
implements ControlInputIF

Connects a FilterInput to a data stream


Field Summary
protected static org.apache.log4j.Logger _log4j
          Log4j logger
static int DEFAULT_ID
           
static long DEFAULT_UPDATE_TIMEOUT
           
 
Fields inherited from interface org.mbari.siam.distributed.devices.ControlInputIF
FIELD_TYPE_BOOLEAN, FIELD_TYPE_BYTE, FIELD_TYPE_DOUBLE, FIELD_TYPE_FLOAT, FIELD_TYPE_INT, FIELD_TYPE_LONG, FIELD_TYPE_SHORT, STATE_CONNECTING, STATE_DISCONNECTING, STATE_INITIALIZED, STATE_INSTANTIATED, STATE_UPDATING, STATE_WAITING, STATUS_CONNECT_ERROR, STATUS_DISCONNECT_ERROR, STATUS_ERROR, STATUS_MASK_ALL, STATUS_NOT_CONNECTED, STATUS_OK, STATUS_TIMEOUT_EXPIRED, STATUS_UPDATE_ERROR
 
Constructor Summary
InputConnector()
           
InputConnector(FilterInput input, int dataType)
           
InputConnector(FilterInput input, int dataType, int id, long updateTimeoutMsec)
           
 
Method Summary
protected  void clearStatus(int statusMask)
           
abstract  void connect()
          get control input value (ControlInputIF)
 int dataType()
           
abstract  void disconnect()
          disconnect from data source
 FilterInput getFilterInput()
           
 int getInputID()
           
 InputState getInputState()
           
 java.lang.Number getInputValue()
           
 Instrument getService()
           
 int getState()
          return connector state
 int getStatus()
          return connector status
 long getUpdateTimeout()
           
 RangeValidator getValidator()
           
 int id()
           
abstract  void initialize()
          initialize control input (ControlInputIF)
 void setFilterInput(FilterInput input)
           
 void setInputID(int id)
           
 void setLastUpdateTime(long time_msec)
           
 void setService(Instrument service)
           
protected  void setState(int state)
           
protected  void setStatus(int statusMask)
           
 void setUpdateTimeout(long timeoutMsec)
           
 void setValidator(RangeValidator validator)
           
 java.lang.String stateString()
           
 java.lang.String stateString(int state)
           
 java.lang.String statusString()
           
 java.lang.String statusString(int status)
           
 long timeSinceLastUpdate()
           
 java.lang.String typeName()
           
 boolean updateTimeoutExpired()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ID

public static final int DEFAULT_ID
See Also:
Constant Field Values

DEFAULT_UPDATE_TIMEOUT

public static final long DEFAULT_UPDATE_TIMEOUT
See Also:
Constant Field Values

_log4j

protected static org.apache.log4j.Logger _log4j
Log4j logger

Constructor Detail

InputConnector

public InputConnector()

InputConnector

public InputConnector(FilterInput input,
                      int dataType)
               throws InvalidPropertyException
Throws:
InvalidPropertyException

InputConnector

public InputConnector(FilterInput input,
                      int dataType,
                      int id,
                      long updateTimeoutMsec)
               throws InvalidPropertyException
Throws:
InvalidPropertyException
Method Detail

dataType

public int dataType()

typeName

public java.lang.String typeName()

id

public int id()

setState

protected void setState(int state)

setStatus

protected void setStatus(int statusMask)

clearStatus

protected void clearStatus(int statusMask)

stateString

public java.lang.String stateString()
Specified by:
stateString in interface ControlInputIF

stateString

public java.lang.String stateString(int state)

statusString

public java.lang.String statusString()
Specified by:
statusString in interface ControlInputIF

statusString

public java.lang.String statusString(int status)

initialize

public abstract void initialize()
                         throws java.rmi.RemoteException
initialize control input (ControlInputIF)

Specified by:
initialize in interface ControlInputIF
Throws:
java.rmi.RemoteException

connect

public abstract void connect()
                      throws java.lang.Exception,
                             java.rmi.RemoteException
get control input value (ControlInputIF)

Specified by:
connect in interface ControlInputIF
Throws:
java.lang.Exception
java.rmi.RemoteException

disconnect

public abstract void disconnect()
                         throws java.lang.Exception,
                                java.rmi.RemoteException
disconnect from data source

Specified by:
disconnect in interface ControlInputIF
Throws:
java.lang.Exception
java.rmi.RemoteException

getState

public int getState()
             throws java.rmi.RemoteException
return connector state

Specified by:
getState in interface ControlInputIF
Throws:
java.rmi.RemoteException

getStatus

public int getStatus()
              throws java.rmi.RemoteException
return connector status

Specified by:
getStatus in interface ControlInputIF
Throws:
java.rmi.RemoteException

getFilterInput

public FilterInput getFilterInput()
Specified by:
getFilterInput in interface ControlInputIF

setFilterInput

public void setFilterInput(FilterInput input)
Specified by:
setFilterInput in interface ControlInputIF

setInputID

public void setInputID(int id)
Specified by:
setInputID in interface ControlInputIF

getInputID

public int getInputID()
Specified by:
getInputID in interface ControlInputIF

getInputValue

public java.lang.Number getInputValue()
Specified by:
getInputValue in interface ControlInputIF

setLastUpdateTime

public void setLastUpdateTime(long time_msec)
Specified by:
setLastUpdateTime in interface ControlInputIF

timeSinceLastUpdate

public long timeSinceLastUpdate()
Specified by:
timeSinceLastUpdate in interface ControlInputIF

setUpdateTimeout

public void setUpdateTimeout(long timeoutMsec)
Specified by:
setUpdateTimeout in interface ControlInputIF

getUpdateTimeout

public long getUpdateTimeout()
Specified by:
getUpdateTimeout in interface ControlInputIF

updateTimeoutExpired

public boolean updateTimeoutExpired()
Specified by:
updateTimeoutExpired in interface ControlInputIF

getService

public Instrument getService()
Specified by:
getService in interface ControlInputIF

setService

public void setService(Instrument service)
Specified by:
setService in interface ControlInputIF

setValidator

public void setValidator(RangeValidator validator)
Specified by:
setValidator in interface ControlInputIF

getValidator

public RangeValidator getValidator()
Specified by:
getValidator in interface ControlInputIF

getInputState

public InputState getInputState()
                         throws java.rmi.RemoteException
Specified by:
getInputState in interface ControlInputIF
Throws:
java.rmi.RemoteException


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.