org.lsst.ccs.subsystems.fcs.simulation
Class RunningState

java.lang.Object
  extended by org.lsst.ccs.subsystems.fcs.simulation.RunningState
All Implemented Interfaces:
EngineState

public class RunningState
extends java.lang.Object
implements EngineState

This is the concrete state where we know what to be done when the engine is in the state "running".

Author:
colley, virieux

Field Summary
protected static org.apache.log4j.Logger log
           
 
Fields inherited from interface org.lsst.ccs.subsystems.fcs.common.EngineState
ERROR, RUNNING, STOP
 
Constructor Summary
RunningState()
           
 
Method Summary
 double computeDisplacement(Motor motor, double period, RunningWay runningWay)
          Computes the displacement (rotation angle or position) for this engine state during a time period.
 java.lang.String error(Motor motor)
           
 java.lang.String go(Motor motor, double t, RunningWay runningWay)
          Engine stays in state running when it is running and it receives the command go.
 java.lang.String stop(Motor motor)
          It goes to "stop" when asked.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
Constructor Detail

RunningState

public RunningState()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

computeDisplacement

public double computeDisplacement(Motor motor,
                                  double period,
                                  RunningWay runningWay)
Computes the displacement (rotation angle or position) for this engine state during a time period. It can be positive or negative according to the running way.

Specified by:
computeDisplacement in interface EngineState
Parameters:
motor -
period -
runninWay -
Returns:

error

public java.lang.String error(Motor motor)
Specified by:
error in interface EngineState

go

public java.lang.String go(Motor motor,
                           double t,
                           RunningWay runningWay)
Engine stays in state running when it is running and it receives the command go.

Specified by:
go in interface EngineState
t - : in milliseconds
runningWay - rotation way

stop

public java.lang.String stop(Motor motor)
It goes to "stop" when asked.

Specified by:
stop in interface EngineState


Copyright © 2012 LSST. All Rights Reserved.