org.mbari.siam.foce.utils
Class ElmoLocal

java.lang.Object
  extended by org.mbari.siam.foce.devices.elmo.base.ElmoImpl
      extended by org.mbari.siam.foce.utils.ElmoLocal
All Implemented Interfaces:
java.rmi.Remote, ElmoIF, ElmoLouverIF, ElmoThrusterIF

public class ElmoLocal
extends ElmoImpl


Field Summary
protected  java.lang.String[] _cmds
           
 double _gearRatio
          Gear ratio between motor and thrusters.
protected static org.apache.log4j.Logger _log4j
           
protected  double _louverPosition
          louver position
protected  java.lang.Double _motorRPM
          forward motor speed (RPM)
protected  java.lang.String _motorSerialPortName
          forward motor serial port path
protected  java.lang.String _portName
           
protected  boolean boundary
           
protected static java.lang.String DEFAULT_SERIAL_PORT_NAME
          Default controller serial port
protected  int homePosition
           
protected  boolean setUnitMode
          set UnitMode during controller initialization (stops motor)
protected  boolean useShaftSpeed
          interpret specified speed as shaft speed
protected  boolean VERBOSE
          Verbose output flag
 
Fields inherited from class org.mbari.siam.foce.devices.elmo.base.ElmoImpl
_countsPerRevolution, _elmo, _maxMotorCounts, _minMotorCounts, _motorSerialPort, _tsElapsedMS, _tsStartTimeMS, _tsState, _tsTriggerCount, _turnSensorEnabled, _turnSensorReset, ABOVE, BELOW, DOUBLE_LIMIT_ZERO, HALL_ACTIVE_MASK, HALL_DISTANCE_COUNTS, HALL_PINSTATE_MASK, HALL_PINSTATE_START_BIT, INT_LIMIT_ZERO, LONG_LIMIT_ZERO, LOUVER_COUNTS_LIMIT_MAX, LOUVER_COUNTS_LIMIT_MIN, LOUVER_DEGREES_LIMIT_MAX, LOUVER_DEGREES_LIMIT_MIN, LOUVER_HALL_LIMIT_MAX, LOUVER_HALL_LIMIT_MIN, LOUVER_PERCENT_LIMIT_MAX, LOUVER_PERCENT_LIMIT_MIN, MAX_DIGITAL_INPUT_BIT, serialVersionUID, TS_DISABLED, TS_ERROR, TS_PENDING, TS_READ_ERROR, TS_RESET, TS_TIMEOUT, TS_TRIGGERED, TS_UNKNOWN
 
Constructor Summary
ElmoLocal()
          Constructor
ElmoLocal(java.lang.String[] cmds)
           
 
Method Summary
 void initializeController()
          Configure the serial ports used to communicate with the motor controllers.
static void main(java.lang.String[] args)
          Main entry point.
 void printUsage()
          Print application-specific usage message to stdout.
 void processArgs(java.lang.String[] args)
           
 int run()
          Perform the actions indicated on the command line.
 
Methods inherited from class org.mbari.siam.foce.devices.elmo.base.ElmoImpl
armTurnsSensorTrigger, beginMotion, center, configurePort, counts2orpm, counts2rpm, countsPerUnitTravel, degrees2percent, delay, disarmTurnsSensorTrigger, findBoundary, getCountsPerRevolution, getDIHall_Bit, getDisplacementCounts, getDisplacementRPU, getEncoderVelocity, getEncoderVelocity, getFaultRegister, getGearRatio, getHomingSpeedCounts, getInvertHallPosition, getJoggingVelocity, getLouverCountsMax, getLouverCountsMin, getLouverDegreesMax, getLouverDegreesMin, getLouverHallMax, getLouverHallMin, getLouverHallPhyMax, getLouverHallPhyMin, getLouverLinkageLength, getLouverPercentMax, getLouverPercentMin, getLouverPositionDegrees, getLouverPositionDegrees, getLouverPositionPercent, getLouverPositionPercent, getLouverSampleMessage, getLouverStatusMessage, getMaxDisplacementTravel, getMaxMotorCounts, getMinDisplacementTravel, getMinMotorCounts, getModelMaxDisplacement, getMotionDistanceOffsetMsec, getMotionDistanceScale, getMotionTimeoutOffsetMsec, getMotionTimeoutScale, getMotor, getMotorAcceleration, getMotorDeceleration, getMotorStopDeceleration, getPositionCounter, getPositionError, getSliderLinkageLength, getSliderOffset, getSliderPivotOffset, getStatusRegister, getThrusterSampleMessage, getTSElapsedMsec, getTSState, getTSStateMnemonic, getTSStateName, getTSTriggerCount, getTurnSensorInputBit, getTurnSensorOutputBit, getTurnSensorTimeoutMillis, getTurnSensorTimeoutMSec, home, home, home, initializeController, initializeTurnSensor, isEnabled, jog, orpm2counts, percent2degrees, ptpAbsolute, ptpAbsolute, ptpRelative, ptpRelative, readLogicalLouverPosition, readPhysicalLouverPosition, readRegister, readTurnSensor, rpm2counts, setCountsPerRevolution, setDigitalInputFunction, setDIHallBit, setDisplacementRPU, setEnable, setGearRatio, setHomingSpeedCounts, setInvertHallPosition, setJoggingVelocity, setJoggingVelocityRPM, setLouverCountsMax, setLouverCountsMin, setLouverDegrees, setLouverDegreesMax, setLouverDegreesMin, setLouverHallMax, setLouverHallMin, setLouverHallPhyMax, setLouverHallPhyMin, setLouverLinkageLength, setLouverPercent, setLouverPercentMax, setLouverPercentMin, setMaxDisplacementTravel, setMaxMotorCounts, setMinDisplacementTravel, setMinMotorCounts, setModelMaxDisplacement, setMotionDistanceOffsetMsec, setMotionDistanceScale, setMotionTimeoutOffsetMsec, setMotionTimeoutScale, setMotor, setMotorAcceleration, setMotorDeceleration, setMotorStopDeceleration, setPositionCounter, setPTPSpeed, setPTPSpeedRPM, setReferenceLimit, setReferenceSpeed, setSerialMode, setSliderLinkageLength, setSliderOffset, setSliderPivotOffset, setTurnSensorInputBit, setTurnSensorOutputBit, setTurnSensorState, setTurnSensorTimeoutMSec, setTurnsSensorEnable, showConfiguration, updateTurnSensorState, validateAbsolute, validateCounts, validateDegrees, validatePercent, validatePosition, validateRelative, validateSpeed, validateSpeed
 
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

DEFAULT_SERIAL_PORT_NAME

protected static final java.lang.String DEFAULT_SERIAL_PORT_NAME
Default controller serial port

See Also:
Constant Field Values

_motorSerialPortName

protected java.lang.String _motorSerialPortName
forward motor serial port path


_gearRatio

public double _gearRatio
Gear ratio between motor and thrusters.


_louverPosition

protected double _louverPosition
louver position


_motorRPM

protected java.lang.Double _motorRPM
forward motor speed (RPM)


VERBOSE

protected boolean VERBOSE
Verbose output flag


useShaftSpeed

protected boolean useShaftSpeed
interpret specified speed as shaft speed


setUnitMode

protected boolean setUnitMode
set UnitMode during controller initialization (stops motor)


homePosition

protected int homePosition

boundary

protected boolean boundary

_cmds

protected java.lang.String[] _cmds

_portName

protected java.lang.String _portName
Constructor Detail

ElmoLocal

public ElmoLocal()
          throws java.io.IOException
Constructor

Throws:
java.io.IOException

ElmoLocal

public ElmoLocal(java.lang.String[] cmds)
          throws java.io.IOException,
                 java.lang.Exception
Throws:
java.io.IOException
java.lang.Exception
Method Detail

run

public int run()
Perform the actions indicated on the command line.

Returns:
0 on success

printUsage

public void printUsage()
Print application-specific usage message to stdout.


initializeController

public void initializeController()
                          throws java.io.IOException,
                                 TimeoutException,
                                 java.lang.Exception
Configure the serial ports used to communicate with the motor controllers.

Specified by:
initializeController in interface ElmoIF
Overrides:
initializeController in class ElmoImpl
Throws:
java.io.IOException
TimeoutException
java.lang.Exception

processArgs

public void processArgs(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

main

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

Parameters:
args - command line arguments


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.