Package gda.device.zebra
Class ZebraMonitorController
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.zebra.ZebraMonitorController
- All Implemented Interfaces:
ContinuousMoveController,HardwareTriggerProvider,Device,Scannable,ContinuouslyScannableViaController,PositionCallableProvider<Double>,PositionStreamIndexerProvider<Double>,Configurable,Findable,gda.observable.IObservable,org.springframework.beans.factory.InitializingBean
public class ZebraMonitorController
extends ScannableBase
implements ContinuousMoveController, PositionCallableProvider<Double>, PositionStreamIndexerProvider<Double>, ContinuouslyScannableViaController, org.springframework.beans.factory.InitializingBean
The ZebraMonitorController is intended to be used to monitor a Zebra which is not being used to control a move.
-
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, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred.voidCalled for every Scannable at the end of every scanvoidCalled for every Scannable at the start of every scanvoidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)intgetPositionSteamIndexer(int index) Get a PositionStreamIndexer for a Zebra position capture stream.doublegetZebra()booleanisBusy()Check if the Scannable is moving/operating.booleanisMoving()Check if the controller is moving axes.booleanIndicates whether the Scannable has deferred control to the he configuredContinuousMoveControllervoidPrepare the already configured controller to move, waiting until ready.voidsetContinuousMoveController(ContinuousMoveController controller) voidsetOperatingContinuously(boolean b) Enable or disable control through the configuredContinuousMoveControllervoidsetTriggerPeriod(double seconds) voidvoidsetZebraCVMoveController(ZebraConstantVelocityMoveController zebraCVMoveController) voidStart the prepared move and return immediately.voidstop()Stop the current move/operation.voidStop a move if one is in progress and then reset the controller.voidWait until the controller has completed moving axesMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, asynchronousMoveTo, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, checkPositionValid, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, 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, deleteIObserversMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedString, waitWhileBusy
-
Constructor Details
-
ZebraMonitorController
public ZebraMonitorController()
-
-
Method Details
-
prepareForMove
Description copied from interface:ContinuousMoveControllerPrepare the already configured controller to move, waiting until ready. Normally this should move motors to the start position.- Specified by:
prepareForMovein interfaceContinuousMoveController- Throws:
InterruptedExceptionDeviceException
-
startMove
Description copied from interface:ContinuousMoveControllerStart the prepared move and return immediately.- Specified by:
startMovein interfaceContinuousMoveController- Throws:
DeviceException
-
isMoving
Description copied from interface:ContinuousMoveControllerCheck if the controller is moving axes.- Specified by:
isMovingin interfaceContinuousMoveController- Returns:
- true if moving.
- Throws:
DeviceException
-
waitWhileMoving
Description copied from interface:ContinuousMoveControllerWait until the controller has completed moving axes- Specified by:
waitWhileMovingin interfaceContinuousMoveController- Throws:
InterruptedExceptionDeviceException
-
stopAndReset
Description copied from interface:ContinuousMoveControllerStop a move if one is in progress and then reset the controller.- Specified by:
stopAndResetin interfaceContinuousMoveController- Throws:
DeviceExceptionInterruptedException
-
setTriggerPeriod
- Specified by:
setTriggerPeriodin interfaceHardwareTriggerProvider- Throws:
DeviceException
-
getNumberTriggers
public int getNumberTriggers()- Specified by:
getNumberTriggersin interfaceHardwareTriggerProvider
-
getTotalTime
- Specified by:
getTotalTimein interfaceHardwareTriggerProvider- Throws:
DeviceException
-
getPositionCallable
- Specified by:
getPositionCallablein interfacePositionCallableProvider<Double>- Throws:
DeviceException
-
getPositionSteamIndexer
Get a PositionStreamIndexer for a Zebra position capture stream. Since each stream can only be used once, allow secondary clients to access copies of position streams by using an offset on the index. Indices 0 to 4 are ENC1-4, 6 to 9 are DIV1-4 and 10 is Capture time. Primary indices 0 to 10 are mapped onto secondary indices 11 to 21.- Specified by:
getPositionSteamIndexerin interfacePositionStreamIndexerProvider<Double>
-
setOperatingContinuously
Description copied from interface:ContinuouslyScannableViaControllerEnable or disable control through the configuredContinuousMoveController- Specified by:
setOperatingContinuouslyin interfaceContinuouslyScannableViaController- Parameters:
b-- Throws:
DeviceException
-
isOperatingContinously
public boolean isOperatingContinously()Description copied from interface:ContinuouslyScannableViaControllerIndicates whether the Scannable has deferred control to the he configuredContinuousMoveController- Specified by:
isOperatingContinouslyin interfaceContinuouslyScannableViaController- Returns:
- true if control is defered
-
getContinuousMoveController
- Specified by:
getContinuousMoveControllerin interfaceContinuouslyScannableViaController
-
setContinuousMoveController
- Specified by:
setContinuousMoveControllerin interfaceContinuouslyScannableViaController
-
atScanStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanStartin interfaceScannable- Overrides:
atScanStartin classScannableBase- Throws:
DeviceException- See Also:
-
atScanLineStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of every scan Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanLineStartin interfaceScannable- Overrides:
atScanLineStartin classScannableBase- Throws:
DeviceException- See Also:
-
atScanLineEnd
Description copied from class:ScannableBaseCalled for every Scannable at the end of every scan Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanLineEndin interfaceScannable- Overrides:
atScanLineEndin classScannableBase- Throws:
DeviceException- See Also:
-
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:
-
atCommandFailure
Description copied from class:ScannableBaseHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred. However not called when the command is aborted using an InterruptionException. If a Scan is aborted then onlyScannable.stop()will be called by the Scan or pos command.Useful for telling Scannables which hold state during a scan for example, to reset themselves. Used for example by CoordinatedMotionScannables. This hook should be used not in the same way as the stop hook. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
- Specified by:
atCommandFailurein interfaceScannable- Overrides:
atCommandFailurein classScannableBase- Throws:
DeviceException- See Also:
-
isBusy
Description copied from interface:ScannableCheck if the Scannable is moving/operating.- Specified by:
isBusyin interfaceScannable- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getZebraCVMoveController
-
setZebraCVMoveController
-
getZebra
-
setZebra
-