Class MonitorBase

All Implemented Interfaces:
Device, Monitor, Scannable, Configurable, Findable, gda.observable.IObservable
Direct Known Subclasses:
AdcMonitor, BeamMonitor, DummyMonitor, EpicsBeamMonitor, EpicsMonitor, EtherCATSignal, IonChamberBeamMonitor, RemainingScanTimeEstimator

@ServiceInterface(Monitor.class) public abstract class MonitorBase extends ScannableBase implements Monitor
Base class for objects which need to operate in scans, but which have no control over the values returned by getPosition()

This base class is important to help to distinguish types of scannables, especially when storing or presenting data from scans.

  • Constructor Details

    • MonitorBase

      public MonitorBase()
  • Method Details

    • asynchronousMoveTo

      public void asynchronousMoveTo(Object position) throws DeviceException
      If called with a position this triggers a delay. Very useful if the monitor is hooked up to something that calculates a running average, or that is not updated very often. 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:
      position - Position to move to should have an element for each input field.
      Throws:
      DeviceException
      See Also:
    • isBusy

      public boolean isBusy()
      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
    • getElementCount

      public int getElementCount() throws DeviceException
      Description copied from interface: Monitor
      returns the number of elements in this monitor.
      Specified by:
      getElementCount in interface Monitor
      Returns:
      int the element count
      Throws:
      DeviceException
    • getUnit

      public String getUnit() throws DeviceException
      Description copied from interface: Monitor
      gets the physical unit of the monitor.
      Specified by:
      getUnit in interface Monitor
      Returns:
      String the physical unit
      Throws:
      DeviceException