Interface IScannable<T>

Type Parameters:
T - the type of value returned by IBoundable.getPosition()
All Superinterfaces:
IActivatable, IBoundable<T>, ILevel, INameable, ITimeoutable, ITolerable<T>
All Known Implementing Classes:
AbstractScannable, BeamScannable, CalibrationFrameCollector, CompositeNexusScannable, CountableScannable, DetectorCollectionScannable, FrameCollectingScannable, JythonScannableNexusWrapper, MockBeamOnMonitor, MockCountingPositionScannable, MockNeXusScannable, MockNeXusSlit, MockPausingMonitor, MockScannable, MockStringNexusScannable, MockStringScannable, MockTopupScannable, NexusSlitsWrapper, NXObjectScannable, NXSampleScannable, ScannableNexusWrapper

public interface IScannable<T> extends ILevel, ITimeoutable, IBoundable<T>, ITolerable<T>, IActivatable
Something that can take part in a sequenced scan which can have its position set. This scannable is inspired by the original GDA8 Scannable. Very approximately Scannable is IScannable. Some methods have be changed because the original Scannable had some stale design. For instance IScanable has one setPosition which is blocking until it has moved. Also it is possible to set position knowing where the demand values of other scannables are. This is important so that during a scan, each scannable when it is told to move, has available all the other moves at that IPosition in the scan. Important note - please do not extend this interface, it must be kept simple. In GDA9 extra methods such as scanStart() etc. are dealt with by annotations. The idea is to have core functionality as interface declarations and optional extensions as annotated methods. See @ScanStart @ScanEnd @ScanFinally @ScanFault @ScanAbort etc.
  • Method Details

    • setPosition

      default T setPosition(T value) throws ScanningException
      Moves to the position required, blocking until it is complete. Similar to moveTo(...) in GDA8 Same as calling setPosition(value, null);
      Parameters:
      value -
      Returns:
      the new position attained by the device, if known. (Saves additional call to getPosition()) If not know the demand value is returned. NOTE if null is returned the system will call getPosition() again.
      Throws:
      Exception
      ScanningException
    • setPosition

      T setPosition(T value, IPosition position) throws ScanningException
      Moves to the position required, blocking until it is complete. Similar to moveTo(...) in GDA8
      Parameters:
      value - that this scalar should take.
      position - if within in a scan or null if not within a scan.
      Returns:
      the new position attained by the device, if known. (Saves additional call to getPosition()) If not know the demand value is returned. NOTE if null is returned the system will call getPosition() again.
      Throws:
      Exception
      ScanningException
    • getUnit

      default String getUnit()
      The unit is the unit in which the setPosition and getPosition values are in.
      Returns:
      String representation of unit which setPosition and getPosition are using.
    • abort

      Call to terminate a movement before it is complete, for example when ScannablePositioner#abort is called due to an exception with another IScannable's movement
      Throws:
      ScanningException
      InterruptedException