org.lsst.ccs.subsystems.shutter.simulator.motor
Class MotorSimulator

java.lang.Object
  extended by org.lsst.ccs.subsystems.shutter.simulator.motor.MotorSimulator

public class MotorSimulator
extends Object

Simulates a motor in the shutter subsystem. This is used both for simulating hardware and for predicting the motor movement in the user interface.

Author:
azemoon

Constructor Summary
MotorSimulator()
           
 
Method Summary
 void addMotorListener(MotorListener l)
           
 double getInitialMotorPosition()
          Gets the position that the motor will have at the beginning of the next movement.
 boolean isRetracting()
           
 void removeMotorListener(MotorListener l)
           
 void setInitialMotorPosition(double position)
           
 void simulateMovement(float targetPosition, double moveTimeSeconds)
          Simulate a motor movement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MotorSimulator

public MotorSimulator()
Method Detail

addMotorListener

public void addMotorListener(MotorListener l)

removeMotorListener

public void removeMotorListener(MotorListener l)

simulateMovement

public void simulateMovement(float targetPosition,
                             double moveTimeSeconds)
                      throws IllegalArgumentException
Simulate a motor movement. During the motor movement events will be delivered to any motor listeners every 50ms.

Parameters:
targetPosition - The position to which the motor should move
moveTimeSeconds - The time in seconds for the motor to move
Throws:
IllegalArgumentException - if the arguments are not valid

getInitialMotorPosition

public double getInitialMotorPosition()
Gets the position that the motor will have at the beginning of the next movement.

Returns:
The position

setInitialMotorPosition

public void setInitialMotorPosition(double position)

isRetracting

public boolean isRetracting()


Copyright © 2013 LSST. All Rights Reserved.