Package gda.device.insertiondevice
Class Apple2IDBase
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.insertiondevice.Apple2IDBase
- All Implemented Interfaces:
Device,IApple2ID,Configurable,Findable,gda.observable.IObservable
- Direct Known Subclasses:
Apple2IDDummy,Apple2IDEpics
This is the base class of a low-level controller for the AppleII ID.
It allows you to specify the ID gap and the position of the four phase motors and ensures that moves are made safely. Scannables can be built on top of this to allow the user to specify position in terms of, for example, gap invalid input: '&' polarisation or energy invalid input: '&' polarisation.
This version expects as input of Apple2IDPosition type.
The ID handles six polarisation modes described in Apple2IDPolarisationMode
LH is in fact a special case of Circular Mode with all motor positions equal to 0.
Moves between different modes must be made via LH: this class takes care of this requirement.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidasynchronousMoveTo(Apple2IDPosition position) protected abstract voiddoMove(Apple2IDPosition position) doubledoubledoubledoubleprotected abstract doubledoublegetPolarisationMode(Apple2IDPosition position) booleanisBusy()booleanmotorPositionsEqual(double a, double b) protected voidSubclasses should call this function when a single move has finished.voidsetGapPositionTolerance(double gapPositionTolerance) voidsetMaxGapPos(double maxGapPos) voidsetMaxPhaseMotorPos(double maxPhaseMotorPos) voidsetMinGapPos(double minGapPos) voidsetMotorPositionTolerance(double motorPositionTolerance) Methods 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, toString, wait, wait, waitMethods inherited from interface gda.factory.Configurable
configure, isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Field Details
-
GAP_AND_PHASE_MODE
- See Also:
-
-
Constructor Details
-
Apple2IDBase
protected Apple2IDBase()
-
-
Method Details
-
asynchronousMoveTo
- Specified by:
asynchronousMoveToin interfaceIApple2ID- Throws:
DeviceException
-
isBusy
public boolean isBusy() -
getPosition
- Specified by:
getPositionin interfaceIApple2ID- Throws:
DeviceException
-
motorPositionsEqual
public boolean motorPositionsEqual(double a, double b) - Specified by:
motorPositionsEqualin interfaceIApple2ID
-
onMoveFinished
protected void onMoveFinished()Subclasses should call this function when a single move has finished. -
getPolarisationMode
- Specified by:
getPolarisationModein interfaceIApple2ID
-
doMove
- Throws:
DeviceException
-
getMotorPosition
- Throws:
DeviceException
-
getMaxPhaseMotorPos
public double getMaxPhaseMotorPos()- Specified by:
getMaxPhaseMotorPosin interfaceIApple2ID
-
setMaxPhaseMotorPos
public void setMaxPhaseMotorPos(double maxPhaseMotorPos) -
getMinGapPos
public double getMinGapPos() -
setMinGapPos
public void setMinGapPos(double minGapPos) -
getMaxGapPos
public double getMaxGapPos() -
setMaxGapPos
public void setMaxGapPos(double maxGapPos) -
getMotorPositionTolerance
public double getMotorPositionTolerance() -
setMotorPositionTolerance
public void setMotorPositionTolerance(double motorPositionTolerance) -
getGapPositionTolerance
public double getGapPositionTolerance() -
setGapPositionTolerance
public void setGapPositionTolerance(double gapPositionTolerance)
-