Package gda.device.scannable
Class XesSpectrometerCrystal
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.scannable.scannablegroup.ScannableGroup
gda.device.scannable.XesSpectrometerCrystal
- All Implemented Interfaces:
Device,Scannable,IScannableGroup,Configurable,Findable,gda.observable.IObservable,gda.observable.IObserver
This extension of Scannables for the x, y, rotation and pitch are set by calls to The horizontal index of the crystal is set by
There is also an 'allowedToMove' flag set by calling None of the scannables in the group will move when asynchronousMoveTo is called.
ScannableGroup is intended to group together scannables relevant for
controlling a single crystal in XesSpectrometerScannable.
setxMotor(Scannable),
setyMotor(Scannable), setRotMotor(Scannable) and setPitchMotor(Scannable).
setHorizontalIndex(int). This defines
the crystal position in the spectrometer relative to the central position
(i.e. 0 corresponds to the central crystal, +-1 for the crystals either side of the centre etc).
There is also an 'allowedToMove' flag set by calling
setAllowedToMove(boolean).
If 'allowedToMove' is set to true, the scannable will behave as a normal ScannableGroup. If it is
set to false then :
isBusy() will return false, and stop() will do nothing.-
Field Summary
Fields inherited from class gda.device.scannable.ScannableBase
__doc__, DEFAULT_INPUT_NAME, DEFAULT_OUTPUT_FORMAT, extraNames, inputNames, level, outputFormatFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidasynchronousMoveTo(Object position) Trigger a move/operation and return immediately.voidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.intbooleanbooleanisBusy()Check if the Scannable is moving/operating.voidsetAllowedToMove(boolean isAllowedToMove) voidsetHorizontalIndex(int horizontalIndex) voidsetPitchMotor(Scannable pitchMotor) voidsetRotMotor(Scannable rotMotor) voidvoidvoidstop()Stop the current move/operation.Methods inherited from class gda.device.scannable.scannablegroup.ScannableGroup
__getattr__, addGroupMember, addGroupMember, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, extractPositionsFromObject, getExtraNames, getGroupMember, getGroupMemberNames, getGroupMembers, getGroupMembersAsArray, getInputNames, getOutputFormat, getPosition, getUnits, isDemandAllScannablePositions, removeGroupMemberByIndex, removeGroupMemberByScannable, setDemandAllScannablePositions, setExtraNames, setGroupMembers, setGroupMembersWithArray, setGroupMembersWithList, setInputNames, toFormattedString, toString, update, waitWhileBusyMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, externalToInternal, getLevel, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, validateScannable, valueUnavailableString, waitWhileBusyMethods 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
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
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
getLevel, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes
-
Constructor Details
-
XesSpectrometerCrystal
public XesSpectrometerCrystal()
-
-
Method Details
-
configure
Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classScannableGroup- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
asynchronousMoveTo
Description copied from class:ScannableBaseTrigger a move/operation and return immediately. Implementations of this method should be non-blocking to allow concurrent motion; the isBusy method will be used to determine when the move has completed. Converts the external (user) position to an internal position and passes this to rawAsynchronousMoveTo.- Specified by:
asynchronousMoveToin interfaceScannable- Overrides:
asynchronousMoveToin classScannableGroup- Parameters:
position- Position to move to should have an element for each input field.- Throws:
DeviceException
-
isBusy
Description copied from interface:ScannableCheck if the Scannable is moving/operating.- Specified by:
isBusyin interfaceScannable- Overrides:
isBusyin classScannableGroup- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException
-
stop
Description copied from class:ScannableBaseStop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
stopin interfaceScannable- Overrides:
stopin classScannableGroup- Throws:
DeviceException- See Also:
-
setAllowedToMove
public void setAllowedToMove(boolean isAllowedToMove) -
isAllowedToMove
public boolean isAllowedToMove() -
getHorizontalIndex
public int getHorizontalIndex() -
setHorizontalIndex
public void setHorizontalIndex(int horizontalIndex) -
getxMotor
-
setxMotor
-
getyMotor
-
setyMotor
-
getPitchMotor
-
setPitchMotor
-
getRotMotor
-
setRotMotor
-