Package org.eclipse.scanning.api.device
Interface IRunnableDeviceService
- All Superinterfaces:
IPositionerService
- All Known Subinterfaces:
IScanService
- All Known Implementing Classes:
RunnableDeviceServiceImpl,RunnableDeviceServiceProxy
Anatomy of a CPU scan (non-malcolm)
_________
_| |________ collectData() Tell detector to collect
_________
_________| |_ readout() Tell detector to readout
_______
_________| |___ moveTo() Scannables move motors to new position
A MalcolmDevice is also an IScanner which may operate with an arbitrary model, usually driving hardware.

_________
_| |________ collectData() Tell detector to collect
_________
_________| |_ readout() Tell detector to readout
_______
_________| |___ moveTo() Scannables move motors to new position
A MalcolmDevice is also an IScanner which may operate with an arbitrary model, usually driving hardware.
IParserService pservice = ...// OSGi
// Parse the scan command, throws an exception
IParserResult parser = pservice.createParser(...)
// e.g. "scan x 0 5 0.1 analyser"
// Now use the parser to create a generator
IPointGeneratorService gservice = ...// OSGi
StepModel model = parser.getModel("x");
IPointGeneratorinvalid input: '<'?> gen = gservice.createGenerator(model)
// Now scan the point iterator
IDeviceService sservice = ...// OSGi
IRunnableDevice scanner = sservice.createScanner(...);
scanner.configure(model);
scanner.run();

-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> IRunnableDevice<T> This is a convenience method for getting the currently active scanner.Deprecated, for removal: This API element is subject to removal in a future version.Get the information for all the runnable devices currently created.getDeviceInformation(String name) Get the information for the named runnable device.Get the information for all the runnable devices currently created with a specific role.Get the information for all the runnable devices currently created.<T> IRunnableDevice<T> getRunnableDevice(String name) Get a runnable device by name.<T> IRunnableDevice<T> getRunnableDevice(String name, IPublisher<ScanBean> publisher) Get a runnable device by name.A collection of the current named runnable devices which may be retrieved and configured.<T> voidregister(IRunnableDevice<T> device) Used to register a device.Methods inherited from interface org.eclipse.scanning.api.scan.event.IPositionerService
createPositioner, createPositioner
-
Method Details
-
register
Used to register a device. This is required so that spring may create detectors and call the register method by telling the detector to register itself.- Parameters:
device-
-
getRunnableDevice
Get a runnable device by name. If the device was created by spring it may need configuring before use. If the device was added to the service after a createRunnableDevice(...) call, it will already be configured.- Parameters:
name-- Returns:
- named runnable device
- Throws:
ScanningException
-
getRunnableDevice
<T> IRunnableDevice<T> getRunnableDevice(String name, IPublisher<ScanBean> publisher) throws ScanningException Get a runnable device by name. If the device was created by spring it may need configuring before use. If the device was added to the service after a createRunnableDevice(...) call, it will already be configured.- Parameters:
name-publisher- used for a particular run of the device. This must be set with care as only one publisher may be active on a device at a time.- Returns:
- named runnable device
- Throws:
ScanningException
-
getRunnableDeviceNames
A collection of the current named runnable devices which may be retrieved and configured.- Returns:
- devices
- Throws:
ScanningException
-
getDeviceConnectorService
Deprecated, for removal: This API element is subject to removal in a future version.useServiceProvider.getService(Class)withIScannableDeviceService.classas the argumentGet the service being used to connect this service to the underlying hardware devices.- Returns:
- connection service
-
getDeviceInformation
Get the information for all the runnable devices currently created. Will not get device information that is potentially held on the device if the device is not alive.- Returns:
- information for all the runnable devices currently created
- Throws:
ScanningException
-
getDeviceInformation
Get the information for all the runnable devices currently created with a specific role. Will not get device information that is potentially held on the device if the device is not alive.- Returns:
- device info
- Throws:
ScanningException
-
getDeviceInformation
Get the information for the named runnable device.- Returns:
- information for the named device
- Throws:
ScanningException
-
getDeviceInformationIncludingNonAlive
Get the information for all the runnable devices currently created. Will attempt to get device information that is potentially held on the device even if the device is not alive.- Returns:
- information for all the runnable devices currently created
- Throws:
ScanningException
-
getActiveScanner
This is a convenience method for getting the currently active scanner. It is useful if the scan is paused and it is required to seek the scan to a new location from Jython. The returned scanner will be null unless a scan is currently running, therefore it is of limited usage normally. *- Returns:
- current actively scanning device.
-
ServiceProvider.getService(Class)withIScannableDeviceService.classas the argument