org.mbari.siam.foce.utils
Class ControlClient

java.lang.Object
  extended by org.mbari.siam.foce.utils.ControlClient
All Implemented Interfaces:
ProcessParameterIF

public class ControlClient
extends java.lang.Object
implements ProcessParameterIF


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.mbari.siam.distributed.devices.ProcessParameterIF
ProcessParameterIF.DummyConstValues, ProcessParameterIF.DummyFIDMap, ProcessParameterIF.DummyIDMap, ProcessParameterIF.DummyIIDMap, ProcessParameterIF.DummyModeNames, ProcessParameterIF.DummyOIDMap, ProcessParameterIF.DummyParamNames, ProcessParameterIF.DummyRIDMap, ProcessParameterIF.DummySIDMap
 
Field Summary
protected  java.util.Vector _commands
           
protected  ControlLoopConfigIF _controlLoop
           
protected  Instrument _instrument
           
protected  boolean _isConnected
           
protected static org.apache.log4j.Logger _log4j
           
protected  boolean _lookupRegistry
           
protected  ProcessConfigIF _processConfig
           
protected  ControlProtocol _protocol
           
 java.lang.String _registryName
           
 java.lang.String _siamHost
           
protected  Node _siamNode
           
 java.lang.String _siamPort
           
protected  boolean _suppressStatus
           
 
Fields inherited from interface org.mbari.siam.distributed.devices.ProcessParameterIF
AC_PH_INT_AFT, ACTUATION_DISABLED, ACTUATION_ENABLED, ACTUATION_MAX, ACTUATION_MIN, BX_PH_ESW, BX_PH_EXT_MID_L, BX_PH_EXT_MID_R, BX_PH_INT_AFT_L, BX_PH_INT_AFT_R, BX_PH_INT_FWD_L, BX_PH_INT_FWD_R, BX_VESWP, BX_VH2O_EXT_X, BX_VH2O_EXT_Y, BX_VH2O_INT_X, BX_VH2O_INT_Y, BX_VTHR_AFT, BX_VTHR_FWD, CONNECTOR_TYPE_EXT_OSDT, CONNECTOR_TYPE_RAW, CONNECTOR_TYPE_SIAM_OSDT, CONNECTOR_TYPE_SIAM_REG, const_mnem2value, CONTROL_MODE_CONSTANT, CONTROL_MODE_DEADBAND, CONTROL_MODE_MANUAL, CONTROL_MODE_MAX, CONTROL_MODE_MIN, CONTROL_MODE_OFFSET, CONTROL_MODE_PANIC, DIR_X, DIR_Y, DIR_Z, EC_PH_EXT, FC_PH_INT_FWD, filter_id2fname, HD_HDG_EXT, HD_HDG_INT, IAC_PH_INT_AFT_L, IAC_PH_INT_AFT_R, IBX_PH_ESW, IBX_PH_EXT_MID_L, IBX_PH_EXT_MID_R, IBX_PH_INT_AFT_L, IBX_PH_INT_AFT_R, IBX_PH_INT_FWD_L, IBX_PH_INT_FWD_R, IBX_VESWP, IBX_VH2O_EXT_X, IBX_VH2O_EXT_Y, IBX_VH2O_INT_X, IBX_VH2O_INT_Y, IBX_VTHR_AFT, IBX_VTHR_FWD, IC_PH_INT, IEC_PH_EXT_MID_L, IEC_PH_EXT_MID_R, IFC_PH_INT_FWD_L, IFC_PH_INT_FWD_R, IHD_HDG_EXT_X, IHD_HDG_EXT_Y, IHD_HDG_INT_X, IHD_HDG_INT_Y, IIC_PH_INT_AFT, IIC_PH_INT_FWD, IMA_MAG_EXT_X, IMA_MAG_EXT_Y, IMA_MAG_INT_X, IMA_MAG_INT_Y, input_id2iname, IVC_VH2O_EXT_X, IVC_VH2O_EXT_Y, IVC_VH2O_INT_X, IVC_VH2O_INT_Y, IVS_ESWV_AFT, IVS_ESWV_FWD, LOC_ESW, LOC_EXT, LOC_INT, MA_MAG_EXT, MA_MAG_INT, mode_id2pname, OUTPUT_AFT_ESW_VALVE, OUTPUT_AFT_THRUSTER_VELOCITY, OUTPUT_ESW_PUMP_VELOCITY, OUTPUT_FWD_ESW_VALVE, OUTPUT_FWD_THRUSTER_VELOCITY, output_id2name, OUTPUT_TYPE_EXT, OUTPUT_TYPE_SIAM, PARAM_CO2_CONCENTRATION, PARAM_DENSITY_SW, PARAM_ESW_PUMP_AMODE, PARAM_ESW_VALVE_AMODE, PARAM_EXP_A, PARAM_EXP_B, PARAM_EXP_H, PARAM_EXP_K, PARAM_FLUME_AREA, param_id2pname, PARAM_MAX_FLOW_CHANGE_PERCENT, PARAM_PH_ABS_MAX, PARAM_PH_ABS_MIN, PARAM_PH_CMODE, PARAM_PH_DEADBAND_HI, PARAM_PH_DEADBAND_LO, PARAM_PH_LIN_FILTER_DEPTH, PARAM_PH_LIN_OFFSET, PARAM_PH_LIN_SLOPE, PARAM_PH_MAX_CORRECTION, PARAM_PH_OFFSET, PARAM_PH_PID_KD, PARAM_PH_PID_KI, PARAM_PH_PID_KP, PARAM_PH_PID_MAX_KI, PARAM_PH_PID_SCALE_FACTOR, PARAM_PH_RMODE, PARAM_PH_SETPOINT, param_pname2aname, PARAM_THRUSTER_AMODE, PARAM_VELOCITY_CAL_A, PARAM_VELOCITY_CAL_B, PARAM_VELOCITY_CAL_C, PARAM_VELOCITY_CMODE, PARAM_VELOCITY_DEADBAND_HI, PARAM_VELOCITY_DEADBAND_LO, PARAM_VELOCITY_MAX_CORRECTION, PARAM_VELOCITY_MAX_RPM, PARAM_VELOCITY_MIN_RPM, PARAM_VELOCITY_OFFSET, PARAM_VELOCITY_PID_KD, PARAM_VELOCITY_PID_KI, PARAM_VELOCITY_PID_KP, PARAM_VELOCITY_PID_MAX_KI, PARAM_VELOCITY_PID_SCALE_FACTOR, PARAM_VELOCITY_RMODE, PARAM_VELOCITY_SETPOINT, POS_AFT, POS_FWD, POS_L, POS_MID, POS_R, PROC_EXCL, PROC_INCL, RESPONSE_MODE_EXP, RESPONSE_MODE_LIN, RESPONSE_MODE_MAX, RESPONSE_MODE_MIN, RESPONSE_MODE_PID, ROLE_AFT_ESW_VALVE, ROLE_AFT_THRUSTER, ROLE_ESW_PH, ROLE_ESW_PUMP, ROLE_EXT_MID_L_PH, ROLE_EXT_MID_R_PH, ROLE_EXT_X_VELOCITY, ROLE_EXT_Y_VELOCITY, ROLE_FWD_ESW_VALVE, ROLE_FWD_THRUSTER, role_id2name, ROLE_INT_AFT_L_PH, ROLE_INT_AFT_R_PH, ROLE_INT_FWD_L_PH, ROLE_INT_FWD_R_PH, ROLE_INT_X_VELOCITY, ROLE_INT_Y_VELOCITY, ROLE_MASK, SIG_AFT_THRUSTER_VEL, SIG_AFT_THRUSTER_VEL_CMD_CHK, SIG_AFT_THRUSTER_VEL_CMD_RAW, SIG_ESW_AFT_VALVE_CMD, SIG_ESW_AFT_VALVE_STATE, SIG_ESW_FWD_VALVE_CMD, SIG_ESW_FWD_VALVE_STATE, SIG_ESW_INJ_VOL, SIG_ESW_PUMP_CMD_CHK, SIG_ESW_PUMP_CMD_RAW, SIG_ESW_PUMP_VEL, SIG_FWD_THRUSTER_VEL, SIG_FWD_THRUSTER_VEL_CMD_CHK, SIG_FWD_THRUSTER_VEL_CMD_RAW, SIG_PH_ERR, SIG_PH_ESW, SIG_PH_ESW_FILT, SIG_PH_EXT_FILT, SIG_PH_EXT_MID_L, SIG_PH_EXT_MID_R, SIG_PH_GRAD, SIG_PH_INT_AFT_FILT, SIG_PH_INT_AFT_L, SIG_PH_INT_AFT_R, SIG_PH_INT_FILT, SIG_PH_INT_FWD_FILT, SIG_PH_INT_FWD_L, SIG_PH_INT_FWD_R, SIG_VH2O_EXT_DIR_FILT, SIG_VH2O_EXT_MAG_FILT, SIG_VH2O_EXT_X_FILT, SIG_VH2O_EXT_X_RAW, SIG_VH2O_EXT_Y_FILT, SIG_VH2O_EXT_Y_RAW, SIG_VH2O_INT_DIR_FILT, SIG_VH2O_INT_ERR, SIG_VH2O_INT_MAG_FILT, SIG_VH2O_INT_X_FILT, SIG_VH2O_INT_X_RAW, SIG_VH2O_INT_Y_FILT, SIG_VH2O_INT_Y_RAW, signal_id2sname, TYPE_ALL, TYPE_ESW, TYPE_MASK, TYPE_MOTOR, TYPE_PH, TYPE_VALVE, TYPE_VELOCITY, VC_VH2O_EXT_X, VC_VH2O_EXT_Y, VC_VH2O_INT_X, VC_VH2O_INT_Y, VS_ESWV_AFT, VS_ESWV_FWD
 
Constructor Summary
ControlClient()
           
ControlClient(java.lang.String[] args)
           
 
Method Summary
protected  void configure(java.lang.String[] args)
          parse command line args to configure this ControlClient
 void configure(java.lang.String host, java.lang.String port, boolean useRegistry)
           
 void connect()
          set up connections for this control client
protected  Node getNodeReference(java.lang.String siamHost)
          Get a SIAM node reference
 boolean isConnected()
           
static void main(java.lang.String[] args)
          ControlClient main entry point
 java.lang.String sendCommand(java.lang.String command)
           
protected  void sendCommands()
          send all commands specified on the command line
 void setCommands(java.util.Vector commands)
           
protected  void setHost(java.lang.String host)
           
protected  void setPort(java.lang.String port)
           
protected  void setRegistryName(java.lang.String name)
           
 void setSuppressStatus(boolean suppressStatus)
           
protected  void setUseRegistry(boolean useRegistry)
           
 void start()
          start this client
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log4j

protected static org.apache.log4j.Logger _log4j

_processConfig

protected ProcessConfigIF _processConfig

_controlLoop

protected ControlLoopConfigIF _controlLoop

_instrument

protected Instrument _instrument

_protocol

protected ControlProtocol _protocol

_siamHost

public java.lang.String _siamHost

_siamPort

public java.lang.String _siamPort

_registryName

public java.lang.String _registryName

_lookupRegistry

protected boolean _lookupRegistry

_isConnected

protected boolean _isConnected

_suppressStatus

protected boolean _suppressStatus

_siamNode

protected Node _siamNode

_commands

protected java.util.Vector _commands
Constructor Detail

ControlClient

public ControlClient()

ControlClient

public ControlClient(java.lang.String[] args)
Method Detail

configure

protected void configure(java.lang.String[] args)
                  throws java.lang.Exception
parse command line args to configure this ControlClient

Throws:
java.lang.Exception

configure

public void configure(java.lang.String host,
                      java.lang.String port,
                      boolean useRegistry)

setSuppressStatus

public void setSuppressStatus(boolean suppressStatus)

isConnected

public boolean isConnected()

setCommands

public void setCommands(java.util.Vector commands)

setHost

protected void setHost(java.lang.String host)

setPort

protected void setPort(java.lang.String port)

setRegistryName

protected void setRegistryName(java.lang.String name)

setUseRegistry

protected void setUseRegistry(boolean useRegistry)

start

public void start()
start this client


getNodeReference

protected Node getNodeReference(java.lang.String siamHost)
                         throws java.lang.Exception
Get a SIAM node reference

Throws:
java.lang.Exception

connect

public void connect()
             throws java.lang.Exception
set up connections for this control client

Throws:
java.lang.Exception

sendCommand

public java.lang.String sendCommand(java.lang.String command)
                             throws java.lang.Exception
Throws:
java.lang.Exception

sendCommands

protected void sendCommands()
                     throws java.lang.Exception
send all commands specified on the command line

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
ControlClient main entry point



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.