Interface IRunnableDeviceService

All Superinterfaces:
IPositionerService
All Known Subinterfaces:
IScanService
All Known Implementing Classes:
RunnableDeviceServiceImpl, RunnableDeviceServiceProxy

public interface IRunnableDeviceService extends IPositionerService
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.

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 Details

    • register

      <T> void register(IRunnableDevice<T> device)
      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

      <T> IRunnableDevice<T> getRunnableDevice(String name) 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 -
      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

      Collection<String> getRunnableDeviceNames() throws ScanningException
      A collection of the current named runnable devices which may be retrieved and configured.
      Returns:
      devices
      Throws:
      ScanningException
    • getDeviceConnectorService

      @Deprecated(since="GDA 9.33", forRemoval=true) IScannableDeviceService getDeviceConnectorService()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use ServiceProvider.getService(Class) with IScannableDeviceService.class as the argument
      Get the service being used to connect this service to the underlying hardware devices.
      Returns:
      connection service
    • getDeviceInformation

      Collection<DeviceInformation<?>> getDeviceInformation() throws ScanningException
      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

      Collection<DeviceInformation<?>> getDeviceInformation(DeviceRole role) throws ScanningException
      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

      DeviceInformation<?> getDeviceInformation(String name) throws ScanningException
      Get the information for the named runnable device.
      Returns:
      information for the named device
      Throws:
      ScanningException
    • getDeviceInformationIncludingNonAlive

      Collection<DeviceInformation<?>> getDeviceInformationIncludingNonAlive() throws ScanningException
      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

      default <T> IRunnableDevice<T> 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.