Class AreaDetectorRunnableDeviceProxy
- All Implemented Interfaces:
INexusDevice<NXdetector>,IActivatable,IPausableDevice<AreaDetectorRunnableDeviceModel>,IResettableDevice,IRunnableDevice<AreaDetectorRunnableDeviceModel>,IRunnableEventDevice<AreaDetectorRunnableDeviceModel>,IWritableDetector<AreaDetectorRunnableDeviceModel>,IDeviceRoleActor,IConfigurable<AreaDetectorRunnableDeviceModel>,ILevel,IModelProvider<AreaDetectorRunnableDeviceModel>,INameable,IScanAttributeContainer,IValidator<AreaDetectorRunnableDeviceModel>
-
Field Summary
Fields inherited from class org.eclipse.scanning.api.device.AbstractRunnableDevice
connectorService, model, runnableDeviceService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCall to configure the device.Returns the object provider required for writing correct NeXus files.voidlevelEnd(LevelInformation info) NOTE: Arguments are filled with annotations using introspection.voidlevelStart(LevelInformation info) NOTE: Arguments are filled with annotations using introspection.voidNOTE: Arguments are filled with annotations using introspection.voidpointStart(IPosition point) NOTE: Arguments are filled with annotations using introspection.voidpostConfigure(ScanModel model, ScanBean scanBean, IPublisher<?> publisher) voidpreConfigure(ScanModel model, ScanBean scanBean, IPublisher<?> publisher) voidBlocking call to execute the scan.voidscanAbort(ScanInformation info) NOTE: Arguments are filled with annotations using introspection.voidscanEnd(ScanInformation info) NOTE: Arguments are filled with annotations using introspection.voidscanFault(ScanInformation info) NOTE: Arguments are filled with annotations using introspection.voidscanFinally(ScanInformation info) NOTE: Arguments are filled with annotations using introspection.voidNOTE: Arguments are filled with annotations using introspection.voidNOTE: Arguments are filled with annotations using introspection.voidscanStart(ScanInformation info) NOTE: Arguments are filled with annotations using introspection.voidvoidsetDeviceState(DeviceState nstate) Allow delegates to set the device state.booleanFor GDA9 detectors, returns a boolean for the readout completed, true for complete, false for error.voidwriteComplete(ScanInformation info) NOTE: Arguments are filled with annotations using introspection.Methods inherited from class uk.ac.diamond.daq.detectors.addetector.AbstractAreaDetectorRunnableDevice
postConfigure, preConfigureMethods inherited from class org.eclipse.scanning.api.device.AbstractRunnableDevice
abort, addRunListener, disable, fireRunPerformed, fireRunWillPerform, fireStateChanged, fireWritePerformed, fireWriteWillPerform, getConfigureTime, getConnectorService, getDeviceHealth, getDeviceInformation, getDeviceInformation, getDeviceState, getLevel, getModel, getPublisher, getRole, getRunnableDeviceService, getScanAttribute, getScanAttributeNames, getScanId, getSupportedScanModes, isActivated, isAlive, isDeviceBusy, pause, register, removeRunListener, reset, resume, seek, setActivated, setAlive, setBusy, setConfigureTime, setConnectorService, setDeviceInformation, setLevel, setModel, setPublisher, setRole, setRunnableDeviceService, setScanAttribute, setScanId, setSupportedScanMode, setSupportedScanModes, setSupportedScanModes, toString, validateMethods inherited from class org.eclipse.scanning.api.AbstractNameable
equals, getName, hashCode, setNameMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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.dawnsci.nexus.INexusDevice
getCustomNexusModification, getName, getNexusProviders, registerMethods 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, setAlive, start, throwFirstRunExceptionMethods inherited from interface org.eclipse.scanning.api.device.IRunnableEventDevice
addRunListener, fireRunPerformed, fireRunWillPerform, fireWritePerformed, fireWriteWillPerform, removeRunListenerMethods inherited from interface org.eclipse.scanning.api.IValidator
setService, validate
-
Constructor Details
-
AreaDetectorRunnableDeviceProxy
public AreaDetectorRunnableDeviceProxy()
-
-
Method Details
-
configure
Description copied from interface:IConfigurableCall to configure the device. If the model provided is invalid, a scanning exception will be thrown.- Specified by:
configurein interfaceIConfigurable<AreaDetectorRunnableDeviceModel>- Overrides:
configurein classAbstractRunnableDevice<AreaDetectorRunnableDeviceModel>- Parameters:
model-- Throws:
ScanningException
-
setDeviceState
Allow delegates to set the device state.- Overrides:
setDeviceStatein classAbstractRunnableDevice<AreaDetectorRunnableDeviceModel>- Parameters:
nstate- New State- Throws:
ScanningException
-
run
Description copied from interface:IRunnableDeviceBlocking call to execute the scan. The position specified may be null. -
write
Description copied from interface:IWritableDetectorFor GDA9 detectors, returns a boolean for the readout completed, true for complete, false for error. Generally detectors running in GDA9 will be IDetector. For GDA8 detectors, the readout will be overridden.- Returns:
- true for a successful readout. If false the events will not be fired and the scan will continue.
- Throws:
ScanningException
-
getNexusProvider
Description copied from interface:INexusDeviceReturns the object provider required for writing correct NeXus files.In this method you should prepare the
LazyDatasets the device will fill during the scan. You can also write out static device metadata, which will not change during the scan.Use the methods on
NexusNodeFactoryto create a NeXus object which matches the device e.g. aNXdetector.final NXdetector detector = NexusNodeFactory.createNXdetector();On the detector object you can create
In this method you can also write static metadata such as the detector exposure e.g.LazyDatasets and keep references which you can later use during the scan to write data. e.g.imageData = detector.initializeLazyDataset(NXdetector.NX_DATA, info.getRank() + 2, Double.class);You should also set chunking on theLazyDatasets you create e.g.imageData.setChunking(info.createChunk(detectorXSize, detectorYSize));.detector.setField("exposure_time", model.getExposure());. Or static datasets such as the image axis datadetector.setDataset("image_x_axis", DatasetFactory.createLinearSpace(DoubleDataset.class, minX, maxX, xPoints));For fields that are defined in the NXDL base class definition for the returned nexus object, a setXXX or setXXXScalar method may be used as appropriate, e.g.detector.setLocalName(DatasetFactory.createFromObject("my detector"));ordetector.setLocalNameScalar("my detector");If this device is a 'metadata scannable', then the device should write its data at this point directly into the returned nexus object. This can be done with the
NXobject.setField(String, Object)method, or thesetXXXScalarmethods for fields defined in the appropriate NXDL base class definition.The default implementation of this method throws
UnsupportedOperationException. One of either this method orINexusDevice.getNexusProviders(NexusScanInfo)must be overridden to create and return the nexus object(s) for thisINexusDevice.- Parameters:
info- information about the scan which can be useful when creating datasets e.g.info.getRank()- Returns:
- The
NXobjectcreated using thenodeFactoryto represent this device - Throws:
NexusException- if the nexus object could not be created for any reason
-
preConfigure
public void preConfigure(ScanModel model, ScanBean scanBean, IPublisher<?> publisher) throws ScanningException - Throws:
ScanningException
-
postConfigure
public void postConfigure(ScanModel model, ScanBean scanBean, IPublisher<?> publisher) throws ScanningException - Throws:
ScanningException
-
levelStart
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
levelStartin classAbstractAreaDetectorRunnableDevice- Parameters:
info-- Throws:
ScanningException
-
levelEnd
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
levelEndin classAbstractAreaDetectorRunnableDevice- Parameters:
info-- Throws:
ScanningException
-
pointStart
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
pointStartin classAbstractAreaDetectorRunnableDevice- Parameters:
point-- Throws:
ScanningException
-
pointEnd
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
pointEndin classAbstractAreaDetectorRunnableDevice- Parameters:
point-- Throws:
ScanningException
-
scanStart
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
scanStartin classAbstractAreaDetectorRunnableDevice- Parameters:
info-- Throws:
ScanningException
-
scanEnd
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
scanEndin classAbstractAreaDetectorRunnableDevice- Parameters:
info-- Throws:
ScanningException
-
writeComplete
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
writeCompletein classAbstractAreaDetectorRunnableDevice- Parameters:
info-- Throws:
ScanningException
-
scanAbort
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
scanAbortin classAbstractAreaDetectorRunnableDevice- Parameters:
info-- Throws:
ScanningException
-
scanFault
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
scanFaultin classAbstractAreaDetectorRunnableDevice- Parameters:
info-- Throws:
ScanningException
-
scanFinally
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
scanFinallyin classAbstractAreaDetectorRunnableDevice- Parameters:
info-- Throws:
ScanningException
-
scanPaused
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
scanPausedin classAbstractAreaDetectorRunnableDevice- Throws:
ScanningException
-
scanResumed
Description copied from class:AbstractAreaDetectorRunnableDeviceNOTE: Arguments are filled with annotations using introspection. OSGi services may be requested (null if not found) NOTE: More than one method may be annotated.- Overrides:
scanResumedin classAbstractAreaDetectorRunnableDevice- Throws:
ScanningException
-
getDelegate
-
setDelegate
-
getDetector
-