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

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

public class ErrorState
extends Object
implements EngineState

This is the concrete state where we know what to be done when the engine is in the state "error". It can only go in state "stop" when asked. It can't move.

Author:
colley, virieux

Field Summary
 
Fields inherited from interface org.lsst.ccs.subsystems.fcs.common.EngineState
ERROR, RUNNING, STOP
 
Constructor Summary
ErrorState()
           
 
Method Summary
 double computeDisplacement(Motor motor, double period, RunningWay runningWay)
          This method compute the displacement of the mobil mechanical item the engine moves during a period and in a given rotation way.
 String error(Motor m)
           
 String go(Motor m, double t, RunningWay runningWay)
          Send the command go to engine e for t milliseconds in a given rotation way.
 String stop(Motor motor)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ErrorState

public ErrorState()
Method Detail

computeDisplacement

public double computeDisplacement(Motor motor,
                                  double period,
                                  RunningWay runningWay)
Description copied from interface: EngineState
This method compute the displacement of the mobil mechanical item the engine moves during a period and in a given rotation way.

Specified by:
computeDisplacement in interface EngineState
period - in milliseconds
Returns:

error

public String error(Motor m)
Specified by:
error in interface EngineState

go

public String go(Motor m,
                 double t,
                 RunningWay runningWay)
Description copied from interface: EngineState
Send the command go to engine e for t milliseconds in a given rotation way.

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

stop

public String stop(Motor motor)
Specified by:
stop in interface EngineState

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 LSST. All Rights Reserved.