org.lsst.ccs.subsystems.fcs.simulation
Class SimulatedMotor
java.lang.Object
java.util.Observable
org.lsst.ccs.framework.Module
org.lsst.ccs.subsystems.fcs.simulation.SimulatedMotor
- All Implemented Interfaces:
- Serializable, Observer, org.lsst.ccs.framework.Configurable, Motor
- Direct Known Subclasses:
- SimuCarouselMotor
public abstract class SimulatedMotor
- extends org.lsst.ccs.framework.Module
- implements Motor
- Author:
- virieux
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class org.lsst.ccs.framework.Module |
org.lsst.ccs.framework.Module.ValueUpdate |
| Nested classes/interfaces inherited from interface org.lsst.ccs.framework.Configurable |
org.lsst.ccs.framework.Configurable.Environment |
| Fields inherited from class org.lsst.ccs.framework.Module |
environment, log, name, nObserverThreads, registry, tickMillis |
|
Constructor Summary |
SimulatedMotor()
This constructor is here only for unit tests. |
| Methods inherited from class org.lsst.ccs.framework.Module |
change, checkHardware, dropConfigurationContext, getCheckedValueFromConfiguration, getChildren, getContext, getModule, getName, getNObserverThreads, getObservables, getSubsystem, getTickMillis, init, listens, newConfigurationContext, notifyChange, notifyChangeWithoutPreliminaryChecks, processUpdate, publishData, publishData, publishData, publishData, register, register, sendToReply, sendToStatus, setBeanName, setContext, setEnvironment, setName, setNObserverThreads, setObservables, setStateModularSubsystem, setStateModularSubsystem, setTickMillis, shutdownCommand, shutdownNow, start, startTicking, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.lsst.ccs.subsystems.fcs.common.Motor |
getName |
SimulatedMotor
public SimulatedMotor()
- This constructor is here only for unit tests.
The actual values come from the xml config file for FCS
or it is initialized by the Module which uses this motor.
getEngineState
public EngineState getEngineState()
- Specified by:
getEngineState in interface Motor
getMaximalVelocity
public double getMaximalVelocity()
- Specified by:
getMaximalVelocity in interface Motor
getNominalVelocity
public double getNominalVelocity()
- Specified by:
getNominalVelocity in interface Motor
getPeriod
public double getPeriod()
- Specified by:
getPeriod in interface Motor
getPosition
public double getPosition()
- Specified by:
getPosition in interface Motor
getRequiredPosition
public double getRequiredPosition()
- Specified by:
getRequiredPosition in interface Motor
getSerialNumber
public String getSerialNumber()
- Specified by:
getSerialNumber in interface Motor
getStateChangeTime
public long getStateChangeTime()
- Specified by:
getStateChangeTime in interface Motor
setEngineState
public void setEngineState(EngineState engineState)
- Specified by:
setEngineState in interface Motor
setMaximalVelocity
public void setMaximalVelocity(double maximalVelocity)
- Specified by:
setMaximalVelocity in interface Motor
setNominalVelocity
public void setNominalVelocity(double nominalVelocity)
- Specified by:
setNominalVelocity in interface Motor
setPeriod
public void setPeriod(double d)
- Specified by:
setPeriod in interface Motor
setPosition
public void setPosition(double position)
- Parameters:
position - the position to set
setRequiredPosition
public void setRequiredPosition(double requiredPosition)
- Specified by:
setRequiredPosition in interface Motor
setSerialNumber
public void setSerialNumber(String serialNumber)
- Specified by:
setSerialNumber in interface Motor
setStateChangeTime
public void setStateChangeTime(long currentTimeMillis)
- Specified by:
setStateChangeTime in interface Motor
getMaximalPosition
public double getMaximalPosition()
- Specified by:
getMaximalPosition in interface Motor
getMinimalPosition
public double getMinimalPosition()
- Specified by:
getMinimalPosition in interface Motor
setMaximalPosition
public void setMaximalPosition(double p)
- Specified by:
setMaximalPosition in interface Motor
setMinimalPosition
public void setMinimalPosition(double p)
- Specified by:
setMinimalPosition in interface Motor
stop
public void stop()
- Specified by:
stop in interface Motor
initModule
public void initModule()
- Overrides:
initModule in class org.lsst.ccs.framework.Module
move
public void move(double displacement)
- Specified by:
move in interface Motor
move
public void move(double displacement,
RunningWay theRunningWay)
- This method sends a command go to the simulated motor.
It computes the needed period for the displacement.
Displacement has to be positive.
- Specified by:
move in interface Motor
tick
public void tick()
- What has to be done for each tick of the timer.
We have to compute the time since the last tick
and incremente the position.
- Overrides:
tick in class org.lsst.ccs.framework.Module
incrementPosition
public void incrementPosition(double inc)
- To be overrided in each subclasses.
Increments the position of the mobil mechanical item which is moved by this simulated motor.
- Specified by:
incrementPosition in interface Motor
- Parameters:
inc -
Copyright © 2013 LSST. All Rights Reserved.