Package gda.device.scannable
Class DummyPersistentUnitsScannable
- All Implemented Interfaces:
INeXusInfoWriteable,ControllerRecord,Device,Scannable,ScannableMotion,ScannableMotionUnits,Configurable,Findable,gda.observable.IObservable
@ServiceInterface(ScannableMotionUnits.class)
public class DummyPersistentUnitsScannable
extends DummyPersistentScannable
implements ScannableMotionUnits
-
Field Summary
Fields inherited from class gda.device.scannable.DummyPersistentScannable
configurationFields inherited from class gda.device.scannable.DummyScannable
currentPosition, incrementFields 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 TypeMethodDescriptionvoidaddAcceptableUnit(String newUnit) Adds a new unit to the list of acceptable units based on the supllied stringvoidDefault 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.String[]getAttribute(String attributeName) Get the value of the specified attributeReturns a string representation of the current reporting unitsvoidrawAsynchronousMoveTo(Object position) [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.[Consider abstract] Read the position in its internal (user) representation.voidsetHardwareUnitString(String hardwareUnitString) Sets the hardware unit to hardwareUnitString.voidsetInitialUnit(String initialUnit) voidSet offset(s) in amounts of external quantities asScannableMotion.setOffset(Double...), but allows any position container containing objects that may be quantities.voidsetUserUnits(String userUnitsString) Sets the user unit to userUnitString.Methods inherited from class gda.device.scannable.DummyScannable
getControllerRecordName, getPosition, isBusy, setControllerRecordName, setIncrement, setNameMethods inherited from class gda.device.scannable.ScannableMotionBase
a, addPositionValidator, ar, asynchronousMoveTo, checkPositionValid, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, completeInstantiation, externalToInternal, generateScannableLimitsReport, getAdditionalPositionValidators, getFirstInputLimits, getInputLimits, getInputLimits, getLimitsComponent, getLowerGdaLimits, getNumberTries, getOffset, getScalingFactor, getTolerances, getUpperGdaLimits, internalToExternal, isAt, moveTo, r, rawIsBusy, removePositionValidator, setAdditionalPositionValidators, setLimitsComponent, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setOffset, setOffsetAndScalingComponent, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimits, toFormattedString, writeNeXusInformation, writeNeXusInformationLimitsMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, 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, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, isBusy, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, toFormattedString, waitWhileBusyMethods inherited from interface gda.device.ScannableMotion
a, ar, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, getLowerGdaLimits, getNumberTries, getOffset, getScalingFactor, getTolerances, getUpperGdaLimits, r, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setOffset, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimits
-
Constructor Details
-
DummyPersistentUnitsScannable
public DummyPersistentUnitsScannable()
-
-
Method Details
-
setInitialUnit
-
configure
public void 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
-
addAcceptableUnit
Description copied from interface:ScannableMotionUnitsAdds a new unit to the list of acceptable units based on the supllied string- Specified by:
addAcceptableUnitin interfaceScannableMotionUnits- Parameters:
newUnit- - string representation of the new acceptable unit- Throws:
DeviceException
-
getAcceptableUnits
- Specified by:
getAcceptableUnitsin interfaceScannableMotionUnits- Returns:
- Returns the acceptableUnitStrings.
-
getHardwareUnitString
- Specified by:
getHardwareUnitStringin interfaceScannableMotionUnits- Returns:
- Returns the motorUnitString.
-
getUserUnits
Description copied from interface:ScannableMotionUnitsReturns a string representation of the current reporting units- Specified by:
getUserUnitsin interfaceScannableMotionUnits- Returns:
- Returns the reportingUnitsString.
-
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- Parameters:
hardwareUnitString- The motorUnitString to set.
-
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- Parameters:
userUnitsString- The reportingUnitsString to set.- Throws:
DeviceException- if string not found in list of acceptable units
-
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 classScannableMotionBase- Parameters:
attributeName- is the name of the attribute- Returns:
- the value of the attribute as an Object type
- Throws:
DeviceException- See Also:
-
rawAsynchronousMoveTo
Description copied from class:ScannableBase[Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.- Overrides:
rawAsynchronousMoveToin classDummyPersistentScannable- Parameters:
position- Position in its internal/hardware representation. e.g. with units and offsets removed- See Also:
-
rawGetPosition
Description copied from class:ScannableBase[Consider abstract] Read the position in its internal (user) representation.- Overrides:
rawGetPositionin classDummyPersistentScannable- Returns:
- the value represented by this Scannable
- Throws:
DeviceException- See Also:
-
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- Parameters:
offsetPositionInExternalUnits-
-