Class CheckingScannable

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

public class CheckingScannable extends BeamlineConditionMonitorBase
A scannable which will pause during a scan some value goes below a threshold (e.g. an absorber closes or machine current goes below 1mA).

To use, simply include in a scan, or add to the list of default scannables.

  • Constructor Details

    • CheckingScannable

      public CheckingScannable()
  • Method Details

    • testShouldPause

      protected void testShouldPause() throws DeviceException
      Description copied from class: BeamlineConditionMonitorBase
      The test is performed inside this method. An inheriting class could either wait inside this method until the condition has passed, or throw an Exception to end the scan, or throw a RedoScanLineThrowable to repeat the current scan.
      Specified by:
      testShouldPause in class BeamlineConditionMonitorBase
      Throws:
      DeviceException
      See Also:
    • asynchronousMoveTo

      public void asynchronousMoveTo(Object position) 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:
      position - 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
    • isBusy

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

      public double getTimeout()
    • setTimeout

      public void setTimeout(double timeout)
      Parameters:
      timeout - The timeout to set. In seconds.
    • getValue

      public Object getValue()
    • setValue

      public void setValue(Object scannableTolerance)
    • getScannable

      public Scannable getScannable()
    • setScannable

      public void setScannable(Scannable topupScannable)