Package gda.device.scannable
Class DummyScannableMotor
- All Implemented Interfaces:
INeXusInfoWriteable,ControllerRecord,Device,IScannableMotor,Scannable,ScannableMotion,ScannableMotionUnits,Configurable,Findable,gda.observable.IObservable
-
Field Summary
Fields 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.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 TypeMethodDescriptionvoidaddAcceptableUnit(String newUnit) Adds a new unit to the list of acceptable units based on the supllied stringString[]Gets the name of the controller record, e.g.doubleReturns the innermost (i.e.Returns the lower motor limit in its external representation.getMotor()Method required by scripts which need to access the real motor at times.
Before the script could get the motor name but now that the motor may be set by spring, scripts cannot get the underlying motor.doubledoublegetSpeed()doubleReturns this motor's time to velocity.Returns the innermost (i.e.Returns the upper motor limit in its external representation.doubleReturns a string representation of the current reporting unitsvoidsetHardwareUnitString(String hardwareUnitString) Sets the hardware unit to hardwareUnitString.voidsetLowerMotorLimit(double lowerMotorLimit) voidSets the motor used by this scannable motor.voidsetMotorName(String motorName) voidSet offset(s) in amounts of external quantities asScannableMotion.setOffset(Double...), but allows any position container containing objects that may be quantities.voidsetPosition(Object position) Set the positionvoidsetSpeed(double requiredSpeed) Set the speed of the underlying motorvoidsetTimeToVelocity(double timeToVelocity) Sets this motor's time to velocity.voidsetUpperMotorLimit(double upperMotorLimit) voidsetUserUnits(String userUnitsString) Sets the user unit to userUnitString.Methods inherited from class gda.device.scannable.DummyScannable
getPosition, isBusy, rawAsynchronousMoveTo, rawGetPosition, setControllerRecordName, setIncrement, setNameMethods inherited from class gda.device.scannable.ScannableMotionBase
a, addPositionValidator, ar, asynchronousMoveTo, checkPositionValid, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, completeInstantiation, externalToInternal, generateScannableLimitsReport, getAdditionalPositionValidators, getAttribute, 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
configure, 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
configure, 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
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
-
DummyScannableMotor
public DummyScannableMotor()
-
-
Method Details
-
getSpeed
- Specified by:
getSpeedin interfaceIScannableMotor- Returns:
- speed of the motor
- Throws:
DeviceException
-
getMotorResolution
- Specified by:
getMotorResolutionin interfaceIScannableMotor- Returns:
- the resolution of the motor
- Throws:
DeviceException
-
getDemandPositionTolerance
public double getDemandPositionTolerance()- Specified by:
getDemandPositionTolerancein interfaceIScannableMotor- Returns:
- the deadband retry of an EPICS motor for eg.
-
getUserOffset
- Specified by:
getUserOffsetin interfaceIScannableMotor- Returns:
- the user offset on the motor
- Throws:
DeviceException
-
getTimeToVelocity
Description copied from interface:IScannableMotorReturns this motor's time to velocity.- Specified by:
getTimeToVelocityin interfaceIScannableMotor- Throws:
DeviceException
-
setSpeed
Description copied from interface:IScannableMotorSet the speed of the underlying motor- Specified by:
setSpeedin interfaceIScannableMotor- Parameters:
requiredSpeed- in the motor's units- Throws:
DeviceException
-
setMotor
Description copied from interface:IScannableMotorSets the motor used by this scannable motor.- Specified by:
setMotorin interfaceIScannableMotor- Parameters:
motor- the motor
-
getMotor
Description copied from interface:IScannableMotorMethod required by scripts which need to access the real motor at times.
Before the script could get the motor name but now that the motor may be set by spring, scripts cannot get the underlying motor.- Specified by:
getMotorin interfaceIScannableMotor- Returns:
- Motor
-
setMotorName
- Specified by:
setMotorNamein interfaceIScannableMotor- Parameters:
motorName- The motorName to set.
-
getMotorName
- Specified by:
getMotorNamein interfaceIScannableMotor- Returns:
- Returns the motorName.
-
setTimeToVelocity
Description copied from interface:IScannableMotorSets this motor's time to velocity.- Specified by:
setTimeToVelocityin interfaceIScannableMotor- Throws:
DeviceException
-
setPosition
Description copied from interface:IScannableMotorSet the position- Specified by:
setPositionin interfaceIScannableMotor- Throws:
DeviceException
-
getLowerMotorLimit
Description copied from interface:IScannableMotorReturns the lower motor limit in its external representation. Null if there is no lower Motor limit.- Specified by:
getLowerMotorLimitin interfaceIScannableMotor- Returns:
- limit in external representation
- Throws:
DeviceException
-
getUpperMotorLimit
Description copied from interface:IScannableMotorReturns the upper motor limit in its external representation. Null if there is no upper Motor limit.- Specified by:
getUpperMotorLimitin interfaceIScannableMotor- Returns:
- limit in external representation
- Throws:
DeviceException
-
getLowerInnerLimit
Description copied from interface:IScannableMotorReturns the innermost (i.e. the most limiting) of the lower Scannable and Motor limits.- Specified by:
getLowerInnerLimitin interfaceIScannableMotor- Returns:
- the highest minimum limit, or null if neither are set.
- Throws:
DeviceException
-
getUpperInnerLimit
Description copied from interface:IScannableMotorReturns the innermost (i.e. the most limiting) of the upper Scannable and Motor limits.- Specified by:
getUpperInnerLimitin interfaceIScannableMotor- Returns:
- the lowest maximum limit, or null if neither are set.
- Throws:
DeviceException
-
setUpperMotorLimit
public void setUpperMotorLimit(double upperMotorLimit) -
setLowerMotorLimit
public void setLowerMotorLimit(double lowerMotorLimit) -
getUserUnits
Description copied from interface:ScannableMotionUnitsReturns a string representation of the current reporting units- Specified by:
getUserUnitsin interfaceScannableMotionUnits- Returns:
- Returns the reportingUnitsString.
-
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
-
getHardwareUnitString
- Specified by:
getHardwareUnitStringin interfaceScannableMotionUnits- Returns:
- Returns the motorUnitString.
-
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.- Throws:
DeviceException
-
getAcceptableUnits
- Specified by:
getAcceptableUnitsin interfaceScannableMotionUnits- Returns:
- Returns the acceptableUnitStrings.
-
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
-
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-
-
getControllerRecordName
Description copied from interface:ControllerRecordGets the name of the controller record, e.g. EPICS process variable name. For example, in NeXus this value can be written as the value of thecontroller_recordfield for theNXpositionerfor the scannable.- Specified by:
getControllerRecordNamein interfaceControllerRecord- Overrides:
getControllerRecordNamein classDummyScannable- Returns:
- controller record name
- See Also:
-