Package gda.px.smargon
Class SmarGonScannableMotor
- All Implemented Interfaces:
INeXusInfoWriteable,ControllerRecord,Device,IScannableMotor,Scannable,ScannableMotion,ScannableMotionUnits,Configurable,Findable,gda.observable.IObservable
@ServiceInterface(ScannableMotionUnits.class)
public class SmarGonScannableMotor
extends ScannableMotor
-
Field Summary
FieldsFields inherited from class gda.device.scannable.ScannableMotor
COPY_MOTOR_LIMITS_INTO_SCANNABLE_LIMITSFields 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.IScannableMotor
WAS_ALREADY_BUSY_SO_COULD_NOT_BE_MOVEDFields 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 TypeMethodDescriptionbooleanisBusy()Return true if motor is busy.voidIf the numberTries and tolerance attributes have been set then repeatedly tries to move this Scannable until the position is within the tolerance range.voidrawAsynchronousMoveTo(Object internalPosition) [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.voidsetSmarGonController(SmarGonController smarGonController) voidReturns when operation carried out by moveTo has completedvoidwaitWhileBusyWithTimeout(int timeoutSeconds) Methods inherited from class gda.device.scannable.ScannableMotor
attachMotorObserver, configure, getActualPosition, getAttribute, getControllerRecordName, getDemandPosition, getDemandPositionTolerance, getFirstInputLimits, getLowerInnerLimit, getLowerMotorLimit, getMotor, getMotorLimitsComponent, getMotorName, getMotorResolution, getPosition, getSpeed, getTimeToVelocity, getUpperInnerLimit, getUpperMotorLimit, getUserOffset, isReturningDemandPosition, rawGetDemandPosition, rawGetPosition, setDemandPositionTolerance, setLogMoveRequestsWithInfo, setMotor, setMotorLimitsComponent, setMotorName, setNotifyObserverPositionChangeEvents, setPosition, setReturnDemandPosition, setSpeed, setTimeToVelocity, stop, toFormattedStringMethods inherited from class gda.device.scannable.ScannableMotionUnitsBase
addAcceptableUnit, externalToInternal, getAcceptableUnits, getHardwareUnitString, getInitialUserUnits, getOffset, getUserUnits, internalToExternal, isAt, setHardwareUnitString, setInitialUserUnits, setOffset, setOffset, setUserUnitsMethods inherited from class gda.device.scannable.ScannableMotionBase
a, addPositionValidator, ar, asynchronousMoveTo, checkPositionValid, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, completeInstantiation, generateScannableLimitsReport, getAdditionalPositionValidators, getInputLimits, getInputLimits, getLimitsComponent, getLowerGdaLimits, getNumberTries, getScalingFactor, getTolerances, getUpperGdaLimits, r, rawIsBusy, removePositionValidator, setAdditionalPositionValidators, setLimitsComponent, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setOffsetAndScalingComponent, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimits, 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, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, 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, 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, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributesMethods 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, setUpperGdaLimitsMethods inherited from interface gda.device.ScannableMotionUnits
addAcceptableUnit, getAcceptableUnits, getHardwareUnitString, getUserUnits, setHardwareUnitString, setOffset, setUserUnits
-
Field Details
-
moveTimeout
public final int moveTimeout
-
-
Constructor Details
-
SmarGonScannableMotor
public SmarGonScannableMotor()
-
-
Method Details
-
setSmarGonController
-
rawAsynchronousMoveTo
Description copied from class:ScannableMotor[Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.. Triggers a motor to move. Throws a DeviceException if the motor is already busy. This method's guts are synchronised so that another thread can't enter it before the first thread has completed the motor's (asynchronous) moveTo call. For the DeviceException to be thrown properly when a move request is made of a moving motor, the motor's getStatus() method must *immediately* report BUSY after it's moveTo call has completed.- Overrides:
rawAsynchronousMoveToin classScannableMotor- Parameters:
internalPosition- Position in its internal/hardware representation. e.g. with units and offsets removed- Throws:
DeviceException- See Also:
-
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:
-
isBusy
Description copied from class:ScannableMotorReturn true if motor is busy.- Specified by:
isBusyin interfaceScannable- Overrides:
isBusyin classScannableMotor- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException- See Also:
-
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 classScannableMotor- Throws:
DeviceExceptionInterruptedException
-
waitWhileBusyWithTimeout
public void waitWhileBusyWithTimeout(int timeoutSeconds) throws DeviceException, InterruptedException, TimeoutException
-