Package gda.device.scannable
Class GapControlCheckingEnergyController
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.scannable.ScannableMotionBase
gda.device.scannable.ScannableMotionUnitsBase
gda.device.scannable.GapControlCheckingEnergyController
- All Implemented Interfaces:
INeXusInfoWriteable,Device,Scannable,ScannableMotion,ScannableMotionUnits,Configurable,Findable,gda.observable.IObservable,gda.observable.IObserver
@ServiceInterface(ScannableMotionUnits.class)
public class GapControlCheckingEnergyController
extends ScannableMotionUnitsBase
implements gda.observable.IObserver
Scannable which holds two scannables, and uses one or the other depending on
whether ID Gap control is enabled or disabled.
Should be used to switch between energy controllers during a Run vs during a
Shutdown.
-
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 TypeMethodDescriptionvoidDefault 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.Returns the current position of the Scannable.Returns a string representation of the current reporting unitsbooleanisBusy()Check if the Scannable is moving/operating.voidrawAsynchronousMoveTo(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.voidsetGapControl(IAccessControl gapControl) voidsetGapControlDisabledEnergyController(ScannableMotionUnits gapControlDisabledEnergyController) voidsetGapControlEnabledEnergyController(ScannableMotionUnits gapControlEnabledEnergyController) voidstop()Stop the current move/operation.Returns a string representation of the Scannable and its current position/value/statusvoidMethods inherited from class gda.device.scannable.ScannableMotionUnitsBase
addAcceptableUnit, externalToInternal, getAcceptableUnits, getAttribute, getHardwareUnitString, getInitialUserUnits, getOffset, internalToExternal, isAt, setHardwareUnitString, setInitialUserUnits, setOffset, setOffset, setUserUnitsMethods inherited from class gda.device.scannable.ScannableMotionBase
a, addPositionValidator, ar, asynchronousMoveTo, checkPositionValid, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, completeInstantiation, generateScannableLimitsReport, getAdditionalPositionValidators, getFirstInputLimits, getInputLimits, getInputLimits, getLimitsComponent, getLowerGdaLimits, getNumberTries, getScalingFactor, getTolerances, getUpperGdaLimits, moveTo, 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, waitWhileBusy, 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, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, waitWhileBusyMethods inherited from interface gda.device.ScannableMotion
a, ar, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, getLowerGdaLimits, getNumberTries, getScalingFactor, getTolerances, getUpperGdaLimits, r, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimits
-
Constructor Details
-
GapControlCheckingEnergyController
public GapControlCheckingEnergyController()
-
-
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
-
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.
-
rawAsynchronousMoveTo
Description copied from class:ScannableBase[Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.- Overrides:
rawAsynchronousMoveToin classScannableBase- Parameters:
position- Position in its internal/hardware representation. e.g. with units and offsets removed- Throws:
DeviceException- See Also:
-
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
-
rawGetPosition
Description copied from class:ScannableBase[Consider abstract] Read the position in its internal (user) representation.- Overrides:
rawGetPositionin classScannableBase- Returns:
- the value represented by this Scannable
- 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:
-
update
- Specified by:
updatein interfacegda.observable.IObserver
-
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
-
getGapControlDisabledEnergyController
-
setGapControlDisabledEnergyController
public void setGapControlDisabledEnergyController(ScannableMotionUnits gapControlDisabledEnergyController) -
getGapControlEnabledEnergyController
-
setGapControlEnabledEnergyController
public void setGapControlEnabledEnergyController(ScannableMotionUnits gapControlEnabledEnergyController) -
getGapControl
-
setGapControl
-