Package gda.device.continuouscontroller
Class DummyTrajectoryMoveController
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.continuouscontroller.DummyTrajectoryMoveController
- All Implemented Interfaces:
ContinuousMoveController,HardwareTriggerProvider,SimulatedTriggerObservable,TrajectoryMoveController,Device,Configurable,Findable,gda.observable.IObservable
public class DummyTrajectoryMoveController
extends DeviceBase
implements TrajectoryMoveController, SimulatedTriggerObservable
A dummy traectory move controller useful for debugging and for illustration.
-
Field Summary
FieldsFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled in sequence specifies the trajectory over all axes point by point.Double[]Return the last point added.intGet the number of axes configured on the controller.intdoublebooleanisMoving()Check if the controller is moving axes.voidPrepare the already configured controller to move, waiting until ready.List<double[]> voidsetAxisTrajectory(int axisIndex, double[] trajectory) Set the entire trajectory for one axis.voidsetNumberAxes(int numberAxes) voidsetTriggerDeltas(double[] triggerDeltas) Set a profile of potentially non-uniformly spaced trigger times.voidsetTriggerPeriod(double seconds) voidStart the prepared move and return immediately.voidStop a move if one is in progress and then reset the controller.toString()voidWait until the controller has completed moving axesMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
configure, isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
configure, isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Field Details
-
simulate
public boolean simulateIf true simulate a move when asked to move.
-
-
Constructor Details
-
DummyTrajectoryMoveController
public DummyTrajectoryMoveController()
-
-
Method Details
-
toString
-
getNumberAxes
public int getNumberAxes()Description copied from interface:TrajectoryMoveControllerGet the number of axes configured on the controller. This may be less than the maximum number the controller supports,- Specified by:
getNumberAxesin interfaceTrajectoryMoveController- Returns:
- number of configured axes.
-
stopAndReset
public void stopAndReset()Description copied from interface:ContinuousMoveControllerStop a move if one is in progress and then reset the controller.- Specified by:
stopAndResetin interfaceContinuousMoveController
-
addPoint
Description copied from interface:TrajectoryMoveControllerCalled in sequence specifies the trajectory over all axes point by point. Alternatively useTrajectoryMoveController.setAxisTrajectory(int, double[]).- Specified by:
addPointin interfaceTrajectoryMoveController- Parameters:
point- Array with a value for each axis. If an axis value is null null, indicating this axis is not to be used, then all positions for this axis must also be null.- Throws:
DeviceException
-
getLastPointAdded
Description copied from interface:TrajectoryMoveControllerReturn the last point added.- Specified by:
getLastPointAddedin interfaceTrajectoryMoveController- Returns:
- the last point added, or null if no points have been added or
TrajectoryMoveController.setAxisTrajectory(int, double[])has been used to configure the controller. - Throws:
DeviceException
-
prepareForMove
Description copied from interface:ContinuousMoveControllerPrepare the already configured controller to move, waiting until ready. Normally this should move motors to the start position.- Specified by:
prepareForMovein interfaceContinuousMoveController- Throws:
DeviceException
-
startMove
public void startMove()Description copied from interface:ContinuousMoveControllerStart the prepared move and return immediately.- Specified by:
startMovein interfaceContinuousMoveController
-
isMoving
public boolean isMoving()Description copied from interface:ContinuousMoveControllerCheck if the controller is moving axes.- Specified by:
isMovingin interfaceContinuousMoveController- Returns:
- true if moving.
-
waitWhileMoving
Description copied from interface:ContinuousMoveControllerWait until the controller has completed moving axes- Specified by:
waitWhileMovingin interfaceContinuousMoveController- Throws:
InterruptedExceptionDeviceException
-
getNumberTriggers
public int getNumberTriggers()- Specified by:
getNumberTriggersin interfaceHardwareTriggerProvider
-
getTotalTime
- Specified by:
getTotalTimein interfaceHardwareTriggerProvider- Throws:
DeviceException
-
setTriggerPeriod
- Specified by:
setTriggerPeriodin interfaceHardwareTriggerProvider- Throws:
DeviceException
-
setTriggerDeltas
public void setTriggerDeltas(double[] triggerDeltas) Description copied from interface:TrajectoryMoveControllerSet a profile of potentially non-uniformly spaced trigger times. May not be supported by all controllers. Alternatively useHardwareTriggerProvider.setTriggerPeriod(double).- Specified by:
setTriggerDeltasin interfaceTrajectoryMoveController- Parameters:
triggerDeltas-
-
getPointsList
-
setAxisTrajectory
Description copied from interface:TrajectoryMoveControllerSet the entire trajectory for one axis. Alternatively useTrajectoryMoveController.addPoint(Double[]).- Specified by:
setAxisTrajectoryin interfaceTrajectoryMoveController- Parameters:
axisIndex-trajectory-- Throws:
DeviceException
-
setNumberAxes
public void setNumberAxes(int numberAxes) -
readActualPositionsFromHardware
-