Package org.eclipse.scanning.api.device
Interface IRunnableEventDevice<T>
- Type Parameters:
T-
- All Superinterfaces:
IConfigurable<T>,IDeviceRoleActor,ILevel,IModelProvider<T>,INameable,IPausableDevice<T>,IResettableDevice,IRunnableDevice<T>,IValidator<T>
- All Known Subinterfaces:
IMalcolmDevice,IScanDevice,IWritableDetector<T>
- All Known Implementing Classes:
AbstractAreaDetectorRunnableDevice,AbstractMalcolmDevice,AbstractRunnableDevice,AreaDetectorRunnableDevice,AreaDetectorRunnableDeviceProxy,AreaDetectorRunnableDeviceWaitForArray,AreaDetectorWritingFilesRunnableDevice,ConstantVelocityDevice,DarkImageDetector,DummyMalcolmDevice,DummyMalcolmTriggeredDetector,ElectronAnalyserRunnableDevice,MalcolmDevice,MalcolmDeviceProxy,MandelbrotDetector,PosDetector,ProcessingMalcolmDevice,RandomIntDetector,RandomLineDevice,RunnableDeviceProxy,XmapRunnableDevice,XmapRunnableDeviceBase,XmapWritingFilesRunnableDevice,ZebraRunnableDevice
A runnable device which also allows the ability to listen to when it
will run and after it has run. This allows for instance for a given
runnable device to configure it before the run method is called based on the
position that the device will be run at. For instance for a device writing
different scan files depending on an outer scan, it can know the position
of the outer scan to generate the output file name and then call configure(...)
to ensure that the detector will write to the new location.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidA listener which notifies when a run of the device will occur and after it has occurred.voidfireRunPerformed(IPosition position) Called during the scanning to notify the device that the run method has been called at a given position.voidfireRunWillPerform(IPosition position) Called during the scanning to notify the device that the run method will be called at a given position.voidfireWritePerformed(IPosition position) Called during the scanning to notify the device that the write method has been called at a given position, if the device implements one.voidfireWriteWillPerform(IPosition position) Called during the scanning to notify the device that the write method will be called at a given position, if the device implements one.voidA listener which notifies when a run of the device will occur and after it has occurred.Methods inherited from interface org.eclipse.scanning.api.IConfigurable
configureMethods inherited from interface org.eclipse.scanning.api.device.models.IDeviceRoleActor
getRole, getSupportedScanModes, setRoleMethods inherited from interface org.eclipse.scanning.api.IModelProvider
setModel, updateModelMethods inherited from interface org.eclipse.scanning.api.device.IPausableDevice
pause, resume, seekMethods inherited from interface org.eclipse.scanning.api.device.IResettableDevice
resetMethods inherited from interface org.eclipse.scanning.api.device.IRunnableDevice
abort, disable, getDeviceHealth, getDeviceState, getModel, isAlive, isDeviceBusy, latch, latch, run, run, setAlive, start, throwFirstRunExceptionMethods inherited from interface org.eclipse.scanning.api.IValidator
setService, validate
-
Method Details
-
addRunListener
A listener which notifies when a run of the device will occur and after it has occurred. This can be used to modify the model before the next run.- Throws:
ScanningException
-
removeRunListener
A listener which notifies when a run of the device will occur and after it has occurred. This can be used to modify the model before the next run.- Throws:
ScanningException
-
fireRunWillPerform
Called during the scanning to notify the device that the run method will be called at a given position. This method is called on the same thread that the run() method is called on, e.g. parallel execution by level in the case of AcquisitionDevice.- Parameters:
position-- Throws:
ScanningException
-
fireRunPerformed
Called during the scanning to notify the device that the run method has been called at a given position. This method is called on the same thread that the run() method is called on, e.g. parallel execution by level in the case of AcquisitionDevice.- Parameters:
position-- Throws:
ScanningException
-
fireWriteWillPerform
Called during the scanning to notify the device that the write method will be called at a given position, if the device implements one. This method is called on the same thread that the write() method is called on, e.g. parallel execution by level in the case of AcquisitionDevice. NOTE: If the write method returns false, fireWritePerformed is not called. However fireWriteWillPerform will still be called. This is because until the device attempts to write we do not know if is has written.- Parameters:
position-- Throws:
ScanningException
-
fireWritePerformed
Called during the scanning to notify the device that the write method has been called at a given position, if the device implements one. This method is called on the same thread that the write() method is called on, e.g. parallel execution by level in the case of AcquisitionDevice. NOTE: If the write method returns false, fireWritePerformed is not called. However fireWriteWillPerform will still be called. This is because until the device attempts to write we do not know if is has written.- Parameters:
position-- Throws:
ScanningException
-