Class ScannableMotionUnitsObservableWrapper
- All Implemented Interfaces:
INeXusInfoWriteable,Device,Scannable,ScannableMotion,ScannableMotionUnits,Configurable,Findable,gda.observable.IObservable,gda.observable.IObserver
-
Field Summary
Fields inherited from class gda.device.scannable.ScannableMotionUnitsBase
unitsComponentFields inherited from class gda.device.scannable.ScannableMotionBase
numberTries, toleranceFields 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_UNAVAILABLEFields inherited from interface gda.device.ScannableMotion
FIRSTINPUTLIMITSFields inherited from interface gda.device.ScannableMotionUnits
HARDWAREUNITS, USERUNITS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidQuick-to-type version of asynchronousMoveTo for use in Jython environmentvoidaddAcceptableUnit(String newUnit) Adds a new unit to the list of acceptable units based on the supllied stringvoidQuick-to-type version of an asynchronous relative move for use in Jython environmentvoidasynchronousMoveTo(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.voidCalled 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 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) Checks the position against the Scannable's limits and against any additional position validators added with additionalPositionValidators().checkPositionWithinGdaLimits(Double[] externalPosition) Returns null if okay, or a descriptive error if not.checkPositionWithinGdaLimits(Object externalPosition) Returns null if okay, or a descriptive error if not.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.protected voidconfiguredStop(ScannableMotionUnits scannable) protected voiddispose()String[]getAttribute(String attributeName) Get the value of the specified attributeString[]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.Double[]Get lower Scannable limits in external representation.intThis is the number of times the Scannable should attempt to move to the target position.Double[]Returns offset(s) in amounts of external quantities.String[]Returns an array of strings which are the format strings to use when pretty printing parts of the outputReturns the current position of the Scannable.intDouble[]Returns scaling factor(s) as Doubles.Double[]WARNING: This method will not work with units.Double[]Get upper Scannable limits in external representationReturns a string representation of the current reporting unitsbooleanTests 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.voidIf the numberTries and tolerance attributes have been set then repeatedly tries to move this Scannable until the position is within the tolerance range.voidQuick-to-type version of a relative move for use in Jython environmentvoidRe-initialisation of values and states.voidsetAttribute(String attributeName, Object value) Set any attribute the implementing classes may providevoidsetDelegate(ScannableMotionUnits delegate) voidsetDelegate(ScannableMotionUnits delegate, boolean doMove) protected voidvoidsetExtraNames(String[] names) Sets the array of names returned by getExtraNames of this scannable.voidsetHardwareUnitString(String hardwareUnitString) Sets the hardware unit to hardwareUnitString.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 scansvoidsetLowerGdaLimits(Double externalLowerLim) Set lower Scannable limit in external representation.voidsetLowerGdaLimits(Double[] externalLowerLim) Set lower Scannable limits in external representation.voidsetNumberTries(int numberTries) voidSet offset(s) in amounts of external quantities.voidSet offset(s) in amounts of external quantities asScannableMotion.setOffset(Double...), but allows any position container containing objects that may be quantities.voidsetOutputFormat(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.voidsetScalingFactor(Double... scaleArray) Set scaling factor(s) as Doubles.voidsetTolerance(Double tolerence) voidsetTolerances(Double[] tolerence) WARNING: This method will not work with units.voidsetUpperGdaLimits(Double externalUpperLim) Set upper Scannable limit in external representation.voidsetUpperGdaLimits(Double[] externalUpperLim) Set upper Scannable limits in external representation.voidsetUserUnits(String userUnitsString) Sets the user unit to userUnitString.voidstop()Stop the current move/operation.Returns a string representation of the Scannable and its current position/value/statustoString()voidvoidReturns when operation carried out by moveTo has completedvoidwaitWhileBusyWithTimeout(int timeoutSeconds) Methods inherited from class gda.device.scannable.ScannableMotionUnitsBase
externalToInternal, getInitialUserUnits, internalToExternal, setInitialUserUnitsMethods inherited from class gda.device.scannable.ScannableMotionBase
addPositionValidator, completeInstantiation, generateScannableLimitsReport, getAdditionalPositionValidators, getFirstInputLimits, getInputLimits, getInputLimits, getLimitsComponent, rawIsBusy, removePositionValidator, setAdditionalPositionValidators, setLimitsComponent, setOffsetAndScalingComponent, writeNeXusInformation, writeNeXusInformationLimitsMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atLevelEnd, atLevelStart, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, rawAsynchronousMoveTo, rawGetPosition, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, validateScannable, valueUnavailableString, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, deleteIObserver, deleteIObservers, getName, isBeingObserved, notifyIObservers, setConfigureAtStartup, 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.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
atLevelEnd, atLevelStart, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, setScanMetadataAttribute, setScanMetadataAttributes
-
Constructor Details
-
ScannableMotionUnitsObservableWrapper
public ScannableMotionUnitsObservableWrapper()
-
-
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 classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
a
Description copied from class:ScannableMotionBaseQuick-to-type version of asynchronousMoveTo for use in Jython environment- Specified by:
ain interfaceScannableMotion- Overrides:
ain classScannableMotionBase- Parameters:
position-- Throws:
DeviceException
-
addAcceptableUnit
Description copied from interface:ScannableMotionUnitsAdds a new unit to the list of acceptable units based on the supllied string- Specified by:
addAcceptableUnitin interfaceScannableMotionUnits- Overrides:
addAcceptableUnitin classScannableMotionUnitsBase- Parameters:
newUnit- - string representation of the new acceptable unit- Throws:
DeviceException
-
ar
Description copied from class:ScannableMotionBaseQuick-to-type version of an asynchronous relative move for use in Jython environment- Specified by:
arin interfaceScannableMotion- Overrides:
arin classScannableMotionBase- Parameters:
position-- Throws:
DeviceException
-
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 classScannableMotionBase- Parameters:
position- Position to move to should have an element for each input field.- Throws:
DeviceException
-
atCommandFailure
Description copied from class:ScannableBaseHook 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. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
- Specified by:
atCommandFailurein interfaceScannable- Overrides:
atCommandFailurein classScannableBase- Throws:
DeviceException- See Also:
-
atLevelMoveStart
Description copied from class:ScannableBaseCalled 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. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.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- Overrides:
atLevelMoveStartin classScannableBase- Throws:
DeviceException- See Also:
-
atPointEnd
Description copied from class:ScannableBaseCalled on every Scannable at the end of every data point, for scans which are broken down into individual points (i.e. non-continous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atPointEndin interfaceScannable- Overrides:
atPointEndin classScannableBase- Throws:
DeviceException- See Also:
-
atPointStart
Description copied from class:ScannableBaseCalled on every Scannable at every data point, for scans which are broken down into individual points (i.e. non-continuous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atPointStartin interfaceScannable- Overrides:
atPointStartin classScannableBase- Throws:
DeviceException- See Also:
-
atScanEnd
Description copied from class:ScannableBaseCalled 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()Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanEndin interfaceScannable- Overrides:
atScanEndin classScannableBase- Throws:
DeviceException- See Also:
-
atScanLineEnd
Description copied from class:ScannableBaseCalled for every Scannable at the end of every scan Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanLineEndin interfaceScannable- Overrides:
atScanLineEndin classScannableBase- Throws:
DeviceException- See Also:
-
atScanLineStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of every scan Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanLineStartin interfaceScannable- Overrides:
atScanLineStartin classScannableBase- Throws:
DeviceException- See Also:
-
atScanStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanStartin interfaceScannable- Overrides:
atScanStartin classScannableBase- Throws:
DeviceException- See Also:
-
checkPositionValid
Description copied from class:ScannableMotionBaseChecks the position against the Scannable's limits and against any additional position validators added with additionalPositionValidators().- Specified by:
checkPositionValidin interfaceScannable- Overrides:
checkPositionValidin classScannableMotionBase- Parameters:
position-- Returns:
- null if position is valid, or returns a description if not.
- Throws:
DeviceException- See Also:
-
checkPositionWithinGdaLimits
Description copied from interface:ScannableMotionReturns null if okay, or a descriptive error if not. Code only called if limits are set.- Specified by:
checkPositionWithinGdaLimitsin interfaceScannableMotion- Overrides:
checkPositionWithinGdaLimitsin classScannableMotionBase- Parameters:
externalPosition- position in external representation- Returns:
- null if okay, or a descriptive error if not
-
checkPositionWithinGdaLimits
Description copied from interface:ScannableMotionReturns null if okay, or a descriptive error if not. Code only called if limits are set.- Specified by:
checkPositionWithinGdaLimitsin interfaceScannableMotion- Overrides:
checkPositionWithinGdaLimitsin classScannableMotionBase- Parameters:
externalPosition- position in external representation- Returns:
- null or description of any error
-
close
Description copied from interface:DeviceClose and unconfigure the device.- Specified by:
closein interfaceDevice- Overrides:
closein classDeviceBase- Throws:
DeviceException
-
dispose
protected void dispose() -
getAcceptableUnits
- Specified by:
getAcceptableUnitsin interfaceScannableMotionUnits- Overrides:
getAcceptableUnitsin classScannableMotionUnitsBase- Returns:
- Returns the acceptableUnitStrings.
-
getAttribute
Description copied from class:ScannableMotionBaseGet the value of the specified attribute To distributed some of the extra methods in the ScannableMotion interface- Specified by:
getAttributein interfaceDevice- Overrides:
getAttributein classScannableMotionUnitsBase- Parameters:
attributeName- is the name of the attribute- Returns:
- the value of the attribute as an Object type
- Throws:
DeviceException- See Also:
-
getDelegate
-
getExtraNames
Description copied from interface:ScannableAdditional names for extra values that returned by getPosition().- Specified by:
getExtraNamesin interfaceScannable- Overrides:
getExtraNamesin classScannableBase- Returns:
- array of names of the extra elements if the array returned by getPosition is larger than the array required by moveTo
-
getHardwareUnitString
- Specified by:
getHardwareUnitStringin interfaceScannableMotionUnits- Overrides:
getHardwareUnitStringin classScannableMotionUnitsBase- Returns:
- Returns the motorUnitString.
-
getInputNames
Description copied from interface:Scannablegets a array of InputNames used by moveTo of this scannable.- Specified by:
getInputNamesin interfaceScannable- Overrides:
getInputNamesin classScannableBase- Returns:
- array of the names of the elements of the object returned by getPosition
-
getLevel
public int getLevel()Description copied from interface:Scannableget the operation level of this scannable.- Specified by:
getLevelin interfaceScannable- Overrides:
getLevelin classScannableBase- Returns:
- int - the level
-
getLowerGdaLimits
Description copied from interface:ScannableMotionGet lower Scannable limits in external representation. Will be null if no lower limits are set. Otherwise, any element can be null indicating that the corresponding field has no limit.- Specified by:
getLowerGdaLimitsin interfaceScannableMotion- Overrides:
getLowerGdaLimitsin classScannableMotionBase- Returns:
- Double[] limit in external representation
-
getNumberTries
public int getNumberTries()Description copied from interface:ScannableMotionThis is the number of times the Scannable should attempt to move to the target position. Useful when the underlying hardware is problematic and often fails or ignores calls without throwing an exception. This should be used in conjunction with setting the tolerance attribute.- Specified by:
getNumberTriesin interfaceScannableMotion- Overrides:
getNumberTriesin classScannableMotionBase- Returns:
- the numberTries
- See Also:
-
getOffset
Description copied from interface:ScannableMotionReturns offset(s) in amounts of external quantities. May be null, or any element may be null, indicating no offset is to be applied/removed.- Specified by:
getOffsetin interfaceScannableMotion- Overrides:
getOffsetin classScannableMotionUnitsBase
-
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- Overrides:
getOutputFormatin classScannableBase- Returns:
- string array
-
getPosition
Description copied from class:ScannableBaseReturns the current position of the Scannable. Called by ConcurentScan at the end of the point. Reads an internal (hardware) position from rawGetPosition, converts this to an external (user) position and returns it.- Specified by:
getPositionin interfaceScannable- Overrides:
getPositionin classScannableBase- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException
-
getProtectionLevel
public int getProtectionLevel()- Specified by:
getProtectionLevelin interfaceDevice- Overrides:
getProtectionLevelin classDeviceBase- Returns:
- int - the permission level for this object.
-
getScalingFactor
Description copied from interface:ScannableMotionReturns scaling factor(s) as Doubles. May be null, or any element may be null, indicating no scale is to be applied/removed.- Specified by:
getScalingFactorin interfaceScannableMotion- Overrides:
getScalingFactorin classScannableMotionBase
-
getTolerances
Description copied from class:ScannableMotionBaseWARNING: This method will not work with units.- Specified by:
getTolerancesin interfaceScannableMotion- Overrides:
getTolerancesin classScannableMotionBase- Returns:
- double[]
- Throws:
DeviceException- See Also:
-
getUpperGdaLimits
Description copied from interface:ScannableMotionGet upper Scannable limits in external representation- Specified by:
getUpperGdaLimitsin interfaceScannableMotion- Overrides:
getUpperGdaLimitsin classScannableMotionBase- Returns:
- Double[] limit in external representation
-
getUserUnits
Description copied from interface:ScannableMotionUnitsReturns a string representation of the current reporting units- Specified by:
getUserUnitsin interfaceScannableMotionUnits- Overrides:
getUserUnitsin classScannableMotionUnitsBase- Returns:
- Returns the reportingUnitsString.
-
isAt
Description copied from class:ScannableMotionBaseTests if the scannable is at (or if appropriate, close to) the value positionToTest. If positionToTest is a string (as will be the case for valves or pneumatics for example), this is compared to the value obtained from getPosition(). An exception is thrown if this is not also a string.Otherwise if positionToTest is not a string the object is compared to the value from getPosition(), after having first pushed both values through objectToArray() from ScannableUtils.
This behaviour should be extended where possible, and has been in ScannableMotionBase If positionToTest is a string (as will be the case for valves or pneumatics for example), this is compared to the value obtained from getPosition(). An exception is thrown if this is not also a string.
Otherwise if positionToTest is not a string the object is compared to the value from getPosition() to see if they are within the tolerance specified in the scannable's tolerance array. Both values are first converted to arrays using objectToArray() from ScannableUtils.
- Specified by:
isAtin interfaceScannable- Overrides:
isAtin classScannableMotionUnitsBase- Parameters:
positionToTest- The position to compare the scannable's position to.- Returns:
- true if scannable is at positionToTest
- Throws:
DeviceException- See Also:
-
isBusy
Description copied from class:ScannableMotionBaseCheck if the Scannable is moving/operating.. Calls onto rawIsBusy for historical reasons, although there is currently no need for this.- Specified by:
isBusyin interfaceScannable- Overrides:
isBusyin classScannableMotionBase- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException- See Also:
-
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 classDeviceBase
-
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
-
moveTo
Description copied from class:ScannableMotionBaseIf the numberTries and tolerance attributes have been set then repeatedly tries to move this Scannable until the position is within the tolerance range.- Specified by:
moveToin interfaceScannable- Overrides:
moveToin classScannableMotionBase- Parameters:
position-- Throws:
DeviceException- See Also:
-
r
Description copied from class:ScannableMotionBaseQuick-to-type version of a relative move for use in Jython environment- Specified by:
rin interfaceScannableMotion- Overrides:
rin classScannableMotionBase- Parameters:
position-- Throws:
DeviceException
-
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
-
setAttribute
Description copied from interface:DeviceSet any attribute the implementing classes may provide- Specified by:
setAttributein interfaceDevice- Overrides:
setAttributein classDeviceBase- Parameters:
attributeName- is the name of the attributevalue- is the value of the attribute- Throws:
DeviceException- if an attribute cannot be set
-
configuredStop
- Throws:
DeviceException
-
setDelegate
- Throws:
DeviceException
-
setDelegate
- Throws:
DeviceException
-
setDelegateUpdate
- Throws:
DeviceException
-
waitWhileBusyWithTimeout
public void waitWhileBusyWithTimeout(int timeoutSeconds) throws DeviceException, InterruptedException, TimeoutException -
setExtraNames
Description copied from interface:ScannableSets the array of names returned by getExtraNames of this scannable.- Specified by:
setExtraNamesin interfaceScannable- Overrides:
setExtraNamesin classScannableBase- Parameters:
names-
-
setHardwareUnitString
Description copied from interface:ScannableMotionUnitsSets the hardware unit to hardwareUnitString. If a user unit has not been explicitly set then the user unit is also set to hardwareUnitString. If the user unit has been explicitly set and the new hardware unit would invalidate this then a DeviceException is thrown.Based on this string, this method will build a list of acceptable user-units. Afterwards, the acceptable units list can be added to via the addAcceptableUnits method if the defaults do not cover enough.
- Specified by:
setHardwareUnitStringin interfaceScannableMotionUnits- Overrides:
setHardwareUnitStringin classScannableMotionUnitsBase- Parameters:
hardwareUnitString- The motorUnitString to set.- Throws:
DeviceException
-
setInputNames
Description copied from interface:Scannablesets the array of names returned by getInputNames method of this scannable.- Specified by:
setInputNamesin interfaceScannable- Overrides:
setInputNamesin classScannableBase- Parameters:
names-
-
setLevel
public void setLevel(int level) Description copied from interface:ScannableUsed for ordering the operations of Scannables during scans- Specified by:
setLevelin interfaceScannable- Overrides:
setLevelin classScannableBase- Parameters:
level-
-
setLowerGdaLimits
Description copied from interface:ScannableMotionSet lower Scannable limit in external representation. Setting the input null will remove the lower limit from the Scannable.- Specified by:
setLowerGdaLimitsin interfaceScannableMotion- Overrides:
setLowerGdaLimitsin classScannableMotionBase- Parameters:
externalLowerLim- limit in external representation- Throws:
Exception
-
setLowerGdaLimits
Description copied from interface:ScannableMotionSet lower Scannable limits in external representation. Setting the input null will remove lower limits from the Scannable. Otherwise, any element can be null indicating that the corresponding field has no limit.- Specified by:
setLowerGdaLimitsin interfaceScannableMotion- Overrides:
setLowerGdaLimitsin classScannableMotionBase- Parameters:
externalLowerLim- limit in external representation- Throws:
Exception
-
setNumberTries
public void setNumberTries(int numberTries) - Specified by:
setNumberTriesin interfaceScannableMotion- Overrides:
setNumberTriesin classScannableMotionBase- Parameters:
numberTries- the numberTries to set- See Also:
-
setOffset
Description copied from interface:ScannableMotionSet offset(s) in amounts of external quantities. May be null, or any element may be null, indicating no offset is to be applied/removed.- Specified by:
setOffsetin interfaceScannableMotion- Overrides:
setOffsetin classScannableMotionUnitsBase- Parameters:
offsetArray- must match number of input fields.
-
setOffset
Description copied from interface:ScannableMotionUnitsSet offset(s) in amounts of external quantities asScannableMotion.setOffset(Double...), but allows any position container containing objects that may be quantities.ScannableMotion.setOffset(Double...)- Specified by:
setOffsetin interfaceScannableMotionUnits- Overrides:
setOffsetin classScannableMotionUnitsBase- Parameters:
offsetPositionInExternalUnits-
-
setOutputFormat
Description copied from interface:ScannableSets the array of strings describing how best to format the positions from this scannable- Specified by:
setOutputFormatin interfaceScannable- Overrides:
setOutputFormatin classScannableBase- Parameters:
names-
-
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- Overrides:
setProtectionLevelin classDeviceBase- Parameters:
newLevel-
-
setScalingFactor
Description copied from interface:ScannableMotionSet scaling factor(s) as Doubles. May be null, or any element may be null, indicating no scale is to be applied/removed.- Specified by:
setScalingFactorin interfaceScannableMotion- Overrides:
setScalingFactorin classScannableMotionBase- Parameters:
scaleArray- must match number of input fields.
-
setTolerance
- Specified by:
setTolerancein interfaceScannableMotion- Overrides:
setTolerancein classScannableMotionBase- Parameters:
tolerence-- Throws:
DeviceException- See Also:
-
setTolerances
Description copied from class:ScannableMotionBaseWARNING: This method will not work with units.- Specified by:
setTolerancesin interfaceScannableMotion- Overrides:
setTolerancesin classScannableMotionBase- Parameters:
tolerence-- Throws:
DeviceException
-
setUpperGdaLimits
Description copied from interface:ScannableMotionSet upper Scannable limit in external representation. Setting the input null will remove the upper limit from the Scannable.- Specified by:
setUpperGdaLimitsin interfaceScannableMotion- Overrides:
setUpperGdaLimitsin classScannableMotionBase- Parameters:
externalUpperLim- limit in external representation- Throws:
Exception
-
setUpperGdaLimits
Description copied from interface:ScannableMotionSet upper Scannable limits in external representation. Setting the input null will remove upper limits from the Scannable. Otherwise, any element can be null indicating that the corresponding field has no limit.- Specified by:
setUpperGdaLimitsin interfaceScannableMotion- Overrides:
setUpperGdaLimitsin classScannableMotionBase- Parameters:
externalUpperLim- limit in external representation- Throws:
Exception
-
setUserUnits
Description copied from interface:ScannableMotionUnitsSets the user unit to userUnitString. If a hardware unit has not been explicitly set, then the hardware unit is also set to userUnitString. If a hardware unit has been set, and the userUnit is not compatible with this, then a DeviceException is thrown.- Specified by:
setUserUnitsin interfaceScannableMotionUnits- Overrides:
setUserUnitsin classScannableMotionUnitsBase- Parameters:
userUnitsString- The reportingUnitsString to set.- Throws:
DeviceException- if string not found in list of acceptable units
-
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 classScannableBase- Throws:
DeviceException- See Also:
-
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- Overrides:
toFormattedStringin classScannableMotionUnitsBase- Returns:
- string as defined above
-
toString
- Overrides:
toStringin classScannableBase
-
update
- Specified by:
updatein interfacegda.observable.IObserver
-
waitWhileBusy
Description copied from class:ScannableBaseReturns when operation carried out by moveTo has completed If this is to be overriden, isBusy must also be valid. Although the pos and scan command currently use this method to determine if the Scannable is busy, this must not be relied upon.- Specified by:
waitWhileBusyin interfaceScannable- Overrides:
waitWhileBusyin classScannableBase- Throws:
DeviceExceptionInterruptedException
-