Package gda.device.scannable
Class TopupChecker
- All Implemented Interfaces:
Device,Scannable,Configurable,Findable,gda.observable.IObservable
Scannable which will pause the scan if a machine top-up is imminent.
This must be given a Monitor object which returns the time in seconds until the next top-up, 0 if top-up in progress.
This replaces earlier classes which were not unit-testable.
-
Field Summary
Fields 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, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubledoubledoublevoidsetCollectionTime(double collectionTime) The data collection time to protect from topups using this scannable.voidsetScannableToBeMonitored(Monitor scannableToBeMonitored) voidsetTimeout(double timeout) voidsetTolerance(double scannableTolerance) Sets the tolerance time in seconds.voidsetWaittime(double waittime) protected voidprotected so this method may be overriddenMethods inherited from class gda.device.scannable.BeamlineConditionMonitorBase
atPointStart, atScanLineStart, atScanStart, getMachineModeMonitor, isBusy, isPauseBeforeLine, isPauseBeforePoint, isPauseBeforeScan, machineIsRunning, rawAsynchronousMoveTo, rawGetPosition, sendAndPrintMessage, setMachineModeMonitor, setPauseBeforeLine, setPauseBeforePoint, setPauseBeforeScanMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atScanEnd, atScanLineEnd, checkPositionValid, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, throwExceptionIfInvalidTarget, toFormattedString, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, 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, deleteIObservers
-
Constructor Details
-
TopupChecker
public TopupChecker()
-
-
Method Details
-
topupImminent
- Throws:
DeviceException
-
testShouldPause
protected so this method may be overridden- Specified by:
testShouldPausein classBeamlineConditionMonitorBase- Throws:
DeviceException- See Also:
-
getTolerance
public double getTolerance() -
setTolerance
public void setTolerance(double scannableTolerance) Sets the tolerance time in seconds. This is an extra 'fudge factor' to use on top of the data collection time to create the time before which the topup the scan will be paused. This tolerance time would be fixed for the beamline, whereas the collection time would vary for each scan.- Parameters:
scannableTolerance-
-
getScannableToBeMonitored
-
setScannableToBeMonitored
-
setCollectionTime
public void setCollectionTime(double collectionTime) The data collection time to protect from topups using this scannable.- Parameters:
collectionTime-
-
getCollectionTime
public double getCollectionTime() -
getTimeout
public double getTimeout()- Returns:
- the timeout in seconds to wait for the topup to finish
-
setTimeout
public void setTimeout(double timeout) -
getWaittime
public double getWaittime()- Returns:
- the waittime after data collection can resume to allow beam to stabilise.
-
setWaittime
public void setWaittime(double waittime)
-