Class ZebraConstantVelocityMoveControllerForQexafs
- All Implemented Interfaces:
ConstantVelocityMoveController,ConstantVelocityMoveController2,ContinuousMoveController,HardwareTriggerProvider,Device,Scannable,ContinuouslyScannableViaController,PositionCallableProvider<Double>,Configurable,Findable,gda.observable.IObservable
-
Field Summary
Fields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIObserver(gda.observable.IObserver observer) voidvoidasynchronousMoveTo(Object position) Trigger a move/operation and return immediately.voidHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred.voidvoidCalled by both the pos and scan commands at the start of each subsequent level move only on Scannables that will be moved as part that level's movement.voidCalled by both the pos and scan commands at the start of each subsequent level move on all Scannables that are part that level's movement.voidCalled on every Scannable at the end of every data point, for scans which are broken down into individual points (i.e.voidCalled on every Scannable at every data point, for scans which are broken down into individual points (i.e.voidCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).voidCalled for every Scannable at the end of every scanvoidCalled for every Scannable at the start of every scanvoidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)checkPositionValid(Object position) Tests if the given object is meaningful to this Scannable and so could be used by one of the move commands.voidclose()Close and unconfigure the device.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.voiddeleteIObserver(gda.observable.IObserver observer) voiddoublegetAccelerationDistance(double requiredSpeed, IScannableMotor scannableMotor, double minimumAccelerationDistance) getAttribute(String attributeName) Get the value of the specified attributedoublegetEnd()String[]Additional names for extra values that returned by getPosition().String[]gets a array of InputNames used by moveTo of this scannable.intgetLevel()get the operation level of this scannable.doubledoubleintString[]Returns an array of strings which are the format strings to use when pretty printing parts of the outputintReturns the current position of the Scannable.getPositionSteamIndexer(int index) intdoublegetStart()doublegetStep()List<gda.device.zebra.ZebraCaptureInputStreamCollection> doublegetZebra()booleanTests if the scannable is at (or if appropriate, close to) the value positionToTest.booleanisBusy()Check if the Scannable is moving/operating.booleanIndicates whether this object should be configured at startup.booleanChecks to see if the object is already configured.booleanisMoving()Check if the controller is moving axes.booleanIndicates whether the Scannable has deferred control to the he configuredContinuousMoveControllervoidTrigger a move/operation and block until completion.voidPrepare the already configured controller to move, waiting until ready.voidRe-initialisation of values and states.voidvoidsetAttribute(String attributeName, Object value) Set any attribute the implementing classes may providevoidsetContinuousMoveController(ContinuousMoveController controller) voidsetDetectors(Collection<HardwareTriggeredDetector> detectors) voidsetEnd(double end) Set the end location for the move in hardware units/offset/scale.voidsetExtraNames(String[] names) Sets the array of names returned by getExtraNames of this scannable.voidsetInputNames(String[] names) sets the array of names returned by getInputNames method of this scannable.voidsetLevel(int level) Used for ordering the operations of Scannables during scansvoidsetMinimumBraggAccelerationDistance(double minimumBraggAccelerationDistance) voidsetMinimumScannableMotorAccelerationDistance(double minimumScannableMotorAccelerationDistance) voidsetOperatingContinuously(boolean b) Enable or disable control through the configuredContinuousMoveControllervoidsetOutputFormat(String[] names) Sets the array of strings describing how best to format the positions from this scannablevoidsetProtectionLevel(int newLevel) Sets the permission level for this object.voidsetSampleShutter(EnumPositioner sampleShutter) voidsetScannableToMove(Collection<ContinuouslyScannableViaController> scannablesToMove) voidsetStart(double start) Set the start location for the move in hardware units/offset/scale.voidsetStep(double step) Set the step size for the move in hardware units/scale.voidsetTriggerPeriod(double seconds) voidvoidStart the prepared move and return immediately.voidstop()Stop the current move/operation.voidStop a move if one is in progress and then reset the controller.Returns a string representation of the Scannable and its current position/value/statustoString()voidReturns when operation carried out by moveTo has completedvoidWait until the controller has completed moving axesMethods inherited from class gda.factory.FindableConfigurableBase
getName, setNameMethods inherited from class gda.factory.ConfigurableBase
setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.device.Scannable
getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, setScanMetadataAttribute, setScanMetadataAttributes
-
Constructor Details
-
ZebraConstantVelocityMoveControllerForQexafs
public ZebraConstantVelocityMoveControllerForQexafs()
-
-
Method Details
-
getZebraConstantVelocityMoveController
-
setZebraConstantVelocityMoveController
public void setZebraConstantVelocityMoveController(ZebraConstantVelocityMoveController zebraController) -
getMinimumBraggAccelerationDistance
public double getMinimumBraggAccelerationDistance() -
setMinimumBraggAccelerationDistance
public void setMinimumBraggAccelerationDistance(double minimumBraggAccelerationDistance) -
getMinimumScannableMotorAccelerationDistance
public double getMinimumScannableMotorAccelerationDistance() -
setMinimumScannableMotorAccelerationDistance
public void setMinimumScannableMotorAccelerationDistance(double minimumScannableMotorAccelerationDistance) -
setStart
Description copied from interface:ConstantVelocityMoveControllerSet the start location for the move in hardware units/offset/scale.- Specified by:
setStartin interfaceConstantVelocityMoveController- Parameters:
start-- Throws:
DeviceException
-
getStart
public double getStart()- Specified by:
getStartin interfaceConstantVelocityMoveController
-
setEnd
Description copied from interface:ConstantVelocityMoveControllerSet the end location for the move in hardware units/offset/scale.- Specified by:
setEndin interfaceConstantVelocityMoveController- Parameters:
end-- Throws:
DeviceException
-
getEnd
public double getEnd()- Specified by:
getEndin interfaceConstantVelocityMoveController
-
setStep
Description copied from interface:ConstantVelocityMoveControllerSet the step size for the move in hardware units/scale.- Specified by:
setStepin interfaceConstantVelocityMoveController- Parameters:
step-- Throws:
DeviceException
-
getStep
public double getStep()- Specified by:
getStepin interfaceConstantVelocityMoveController
-
getZebra
-
getZebraMotorInfoProvider
-
getScannableMotor
-
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:
InterruptedExceptionDeviceException
-
getAccelerationDistance
public double getAccelerationDistance(double requiredSpeed, IScannableMotor scannableMotor, double minimumAccelerationDistance) throws DeviceException - Throws:
DeviceException
-
stopAndReset
Description copied from interface:ContinuousMoveControllerStop a move if one is in progress and then reset the controller.- Specified by:
stopAndResetin interfaceContinuousMoveController- Throws:
DeviceExceptionInterruptedException
-
setTriggerPeriod
- Specified by:
setTriggerPeriodin interfaceHardwareTriggerProvider- Throws:
DeviceException
-
getNumberTriggers
public int getNumberTriggers()- Specified by:
getNumberTriggersin interfaceHardwareTriggerProvider
-
getTotalTime
- Specified by:
getTotalTimein interfaceHardwareTriggerProvider- Throws:
DeviceException
-
isBusy
Description copied from interface:ScannableCheck if the Scannable is moving/operating.- Specified by:
isBusyin interfaceScannable- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException
-
setOperatingContinuously
Description copied from interface:ContinuouslyScannableViaControllerEnable or disable control through the configuredContinuousMoveController- Specified by:
setOperatingContinuouslyin interfaceContinuouslyScannableViaController- Parameters:
b-- Throws:
DeviceException
-
isOperatingContinously
public boolean isOperatingContinously()Description copied from interface:ContinuouslyScannableViaControllerIndicates whether the Scannable has deferred control to the he configuredContinuousMoveController- Specified by:
isOperatingContinouslyin interfaceContinuouslyScannableViaController- Returns:
- true if control is defered
-
getContinuousMoveController
- Specified by:
getContinuousMoveControllerin interfaceContinuouslyScannableViaController
-
getPositionCallable
- Specified by:
getPositionCallablein interfacePositionCallableProvider<Double>- Throws:
DeviceException
-
setScannableToMove
- Specified by:
setScannableToMovein interfaceConstantVelocityMoveController2
-
setDetectors
- Specified by:
setDetectorsin interfaceConstantVelocityMoveController2- Throws:
DeviceException
-
getLastPointAdded
-
addPoint
-
startMove
Description copied from interface:ContinuousMoveControllerStart the prepared move and return immediately.- Specified by:
startMovein interfaceContinuousMoveController- Throws:
DeviceException
-
isMoving
Description copied from interface:ContinuousMoveControllerCheck if the controller is moving axes.- Specified by:
isMovingin interfaceContinuousMoveController- Returns:
- true if moving.
- Throws:
DeviceException
-
waitWhileMoving
Description copied from interface:ContinuousMoveControllerWait until the controller has completed moving axes- Specified by:
waitWhileMovingin interfaceContinuousMoveController- Throws:
InterruptedExceptionDeviceException
-
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 classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
isConfigured
public boolean isConfigured()Description copied from interface:ConfigurableChecks to see if the object is already configured.- Specified by:
isConfiguredin interfaceConfigurable- Overrides:
isConfiguredin classConfigurableBase- Returns:
- return
trueif configuredfalseotherwise
-
isConfigureAtStartup
public boolean isConfigureAtStartup()Description copied from interface:ConfigurableIndicates whether this object should be configured at startup.Moved from ConditionallyConfigurable which has been deleted
- Specified by:
isConfigureAtStartupin interfaceConfigurable- Overrides:
isConfigureAtStartupin classConfigurableBase
-
reconfigure
Description copied from interface:ConfigurableRe-initialisation of values and states.Moved from Reconfigurable which has been deleted
- Specified by:
reconfigurein interfaceConfigurable- Overrides:
reconfigurein classConfigurableBase- Throws:
FactoryException
-
getPosition
Description copied from interface:ScannableReturns the current position of the Scannable. Called by ConcurentScan at the end of the point.- Specified by:
getPositionin interfaceScannable- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException
-
addIObserver
public void addIObserver(gda.observable.IObserver observer) - Specified by:
addIObserverin interfacegda.observable.IObservable
-
setAttribute
Description copied from interface:DeviceSet any attribute the implementing classes may provide- Specified by:
setAttributein interfaceDevice- Parameters:
attributeName- is the name of the attributevalue- is the value of the attribute- Throws:
DeviceException- if an attribute cannot be set
-
deleteIObserver
public void deleteIObserver(gda.observable.IObserver observer) - Specified by:
deleteIObserverin interfacegda.observable.IObservable
-
toString
-
deleteIObservers
public void deleteIObservers()- Specified by:
deleteIObserversin interfacegda.observable.IObservable
-
getAttribute
Description copied from interface:DeviceGet the value of the specified attribute- Specified by:
getAttributein interfaceDevice- Parameters:
attributeName- is the name of the attribute- Returns:
- the value of the attribute as an Object type
- Throws:
DeviceException- if an attribute cannot be retrieved
-
moveTo
Description copied from interface:ScannableTrigger a move/operation and block until completion.- Specified by:
moveToin interfaceScannable- Parameters:
position-- Throws:
DeviceException
-
asynchronousMoveTo
Description copied from interface:ScannableTrigger 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.- Specified by:
asynchronousMoveToin interfaceScannable- Parameters:
position- Position to move to should have an element for each input field.- Throws:
DeviceException
-
close
Description copied from interface:DeviceClose and unconfigure the device.- Specified by:
closein interfaceDevice- Throws:
DeviceException
-
setProtectionLevel
public void setProtectionLevel(int newLevel) Description copied from interface:DeviceSets the permission level for this object. If this is not set then a default value will be applied.- Specified by:
setProtectionLevelin interfaceDevice- Parameters:
newLevel-
-
checkPositionValid
Description copied from interface:ScannableTests if the given object is meaningful to this Scannable and so could be used by one of the move commands. May check limits and other things too. This is the method called by scans on all points before the scan is run.- Specified by:
checkPositionValidin interfaceScannable- Parameters:
position-- Returns:
- null if position is valid, or returns a description if not.
- Throws:
DeviceException
-
getProtectionLevel
public int getProtectionLevel()- Specified by:
getProtectionLevelin interfaceDevice- Returns:
- int - the permission level for this object.
-
stop
Description copied from interface:ScannableStop the current move/operation.- Specified by:
stopin interfaceScannable- Throws:
DeviceException
-
waitWhileBusy
Description copied from interface:ScannableReturns when operation carried out by moveTo has completed- Specified by:
waitWhileBusyin interfaceScannable- Throws:
DeviceExceptionInterruptedException
-
isAt
Description copied from interface:ScannableTests if the scannable is at (or if appropriate, close to) the value positionToTest.- Specified by:
isAtin interfaceScannable- Parameters:
positionToTest- The position to compare the scannable's position to.- Returns:
- true if scannable is at positionToTest
- Throws:
DeviceException
-
setLevel
public void setLevel(int level) Description copied from interface:ScannableUsed for ordering the operations of Scannables during scans -
getLevel
public int getLevel()Description copied from interface:Scannableget the operation level of this scannable. -
getInputNames
Description copied from interface:Scannablegets a array of InputNames used by moveTo of this scannable.- Specified by:
getInputNamesin interfaceScannable- Returns:
- array of the names of the elements of the object returned by getPosition
-
setInputNames
Description copied from interface:Scannablesets the array of names returned by getInputNames method of this scannable.- Specified by:
setInputNamesin interfaceScannable- Parameters:
names-
-
getExtraNames
Description copied from interface:ScannableAdditional names for extra values that returned by getPosition().- Specified by:
getExtraNamesin interfaceScannable- Returns:
- array of names of the extra elements if the array returned by getPosition is larger than the array required by moveTo
-
setExtraNames
Description copied from interface:ScannableSets the array of names returned by getExtraNames of this scannable.- Specified by:
setExtraNamesin interfaceScannable- Parameters:
names-
-
setOutputFormat
Description copied from interface:ScannableSets the array of strings describing how best to format the positions from this scannable- Specified by:
setOutputFormatin interfaceScannable- Parameters:
names-
-
getOutputFormat
Description copied from interface:ScannableReturns an array of strings which are the format strings to use when pretty printing parts of the output- Specified by:
getOutputFormatin interfaceScannable- Returns:
- string array
-
atScanStart
Description copied from interface:ScannableCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)- Specified by:
atScanStartin interfaceScannable- Throws:
DeviceException
-
atScanEnd
Description copied from interface:ScannableCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).Note that this is only called if the Scan finishes normally, or has been requested to finish early. This will not be called if the scan finishes due to an exception of any kind. See
Scannable.atCommandFailure()- Specified by:
atScanEndin interfaceScannable- Throws:
DeviceException
-
atScanLineStart
Description copied from interface:ScannableCalled for every Scannable at the start of every scan- Specified by:
atScanLineStartin interfaceScannable- Throws:
DeviceException
-
atScanLineEnd
Description copied from interface:ScannableCalled for every Scannable at the end of every scan- Specified by:
atScanLineEndin interfaceScannable- Throws:
DeviceException
-
atPointStart
Description copied from interface:ScannableCalled on every Scannable at every data point, for scans which are broken down into individual points (i.e. non-continuous scans)- Specified by:
atPointStartin interfaceScannable- Throws:
DeviceException
-
atPointEnd
Description copied from interface:ScannableCalled on every Scannable at the end of every data point, for scans which are broken down into individual points (i.e. non-continous scans)- Specified by:
atPointEndin interfaceScannable- Throws:
DeviceException
-
atLevelMoveStart
Description copied from interface:ScannableCalled by both the pos and scan commands at the start of each subsequent level move only on Scannables that will be moved as part that level's movement.For example "pos a 1 b 2 c 3", will, if a and b have the same level and c a higher level will result in:
This hook is used by CoordinatedMotionScannables.a.atLevelMoveStart() invalid input: '<'---- b.atLevelMoveStart() invalid input: '<'---- a.asynchronousMoveTo() b.asynchronousMoveTo() a.waitWhileBusy() b.waitWhileBusy() c.atLevelMoveStart() invalid input: '<'---- c.asynchronousMoveTo() c.waitWhileBusy()
- Specified by:
atLevelMoveStartin interfaceScannable- Throws:
DeviceException
-
atLevelStart
Description copied from interface:ScannableCalled by both the pos and scan commands at the start of each subsequent level move on all Scannables that are part that level's movement.This provides a useful mechanism for e.g. creating a Scannable that opens a shutter after motors have moved but before a detector is exposed.
- Specified by:
atLevelStartin interfaceScannable- Throws:
DeviceException
-
atLevelEnd
- Specified by:
atLevelEndin interfaceScannable- Throws:
DeviceException
-
atCommandFailure
Description copied from interface:ScannableHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred. However not called when the command is aborted using an InterruptionException. If a Scan is aborted then onlyScannable.stop()will be called by the Scan or pos command.Useful for telling Scannables which hold state during a scan for example, to reset themselves. Used for example by CoordinatedMotionScannables. This hook should be used not in the same way as the stop hook.
- Specified by:
atCommandFailurein interfaceScannable- Throws:
DeviceException
-
toFormattedString
Description copied from interface:ScannableReturns a string representation of the Scannable and its current position/value/statusTypically should return:
name : position
or for detectors, name : status
If the position/status cannot be determined, the function should return
Scannable.VALUE_UNAVAILABLEin its place.- Specified by:
toFormattedStringin interfaceScannable- Returns:
- string as defined above
-
getTimeSeriesCollection
-
getPositionSteamIndexer
-
setContinuousMoveController
- Specified by:
setContinuousMoveControllerin interfaceContinuouslyScannableViaController
-
getPointBeingPrepared
public int getPointBeingPrepared()- Specified by:
getPointBeingPreparedin interfaceConstantVelocityMoveController2
-
resetPointBeingPrepared
public void resetPointBeingPrepared()- Specified by:
resetPointBeingPreparedin interfaceConstantVelocityMoveController2
-
setSampleShutter
-