Class EnergyScannable

All Implemented Interfaces:
Device, Scannable, Configurable, Findable, gda.observable.IObservable, gda.observable.IObserver

@ServiceInterface(Scannable.class) public class EnergyScannable extends ScannableBase implements gda.observable.IObserver
This is a compound scannable that operates on a bragg (wavelength determining) scannable and a number of other scannables (id_gap, detector thresholds, etc.) It is also used as metadata provider for images plotted
  • Constructor Details

    • EnergyScannable

      public EnergyScannable()
  • Method Details

    • configure

      public void configure() throws FactoryException
      Description copied from class: ConfigurableBase
      Default implementation for classes that do not have to do any specific configuration.
      Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.
      Specified by:
      configure in interface Configurable
      Overrides:
      configure in class ConfigurableBase
      Throws:
      FactoryException - if there is an error in configuration e.g. required variable not set or cannot connect to device
    • isBusy

      public boolean isBusy() throws DeviceException
      Description copied from interface: Scannable
      Check if the Scannable is moving/operating.
      Specified by:
      isBusy in interface Scannable
      Returns:
      true - if operation carried out by moveTo has not completed yet
      Throws:
      DeviceException
    • asynchronousMoveTo

      public void asynchronousMoveTo(Object externalPosition) throws DeviceException
      Description copied from class: ScannableBase
      Trigger a move/operation and return immediately. Implementations of this method should be non-blocking to allow concurrent motion; the isBusy method will be used to determine when the move has completed. Converts the external (user) position to an internal position and passes this to rawAsynchronousMoveTo.
      Specified by:
      asynchronousMoveTo in interface Scannable
      Overrides:
      asynchronousMoveTo in class ScannableBase
      Parameters:
      externalPosition - Position to move to should have an element for each input field.
      Throws:
      DeviceException
    • getPosition

      public Object getPosition() throws DeviceException
      Description copied from class: ScannableBase
      Returns the current position of the Scannable. Called by ConcurentScan at the end of the point. Reads an internal (hardware) position from rawGetPosition, converts this to an external (user) position and returns it.
      Specified by:
      getPosition in interface Scannable
      Overrides:
      getPosition in class ScannableBase
      Returns:
      Current position with an element for each input and extra field. null if their are no fields.
      Throws:
      DeviceException
    • addScannable

      public void addScannable(Scannable s)
    • addScannables

      public void addScannables(Collection<Scannable> s)
    • removeScannable

      public void removeScannable(Scannable s)
    • clearScannables

      public void clearScannables()
    • getBragg

      public Scannable getBragg()
    • setBragg

      public void setBragg(Scannable bragg)
      this bragg scannable is expected to work in keV and return double value only
      Parameters:
      bragg -
    • getDiffractionCrystalEnvironment

      public DiffractionCrystalEnvironment getDiffractionCrystalEnvironment() throws DeviceException
      Throws:
      DeviceException
    • getBraggWavelength

      public double getBraggWavelength() throws DeviceException
      Throws:
      DeviceException
    • update

      public void update(Object source, Object arg)
      Specified by:
      update in interface gda.observable.IObserver