Class MockCountingPositionScannable

All Implemented Interfaces:
IActivatable, IBoundable<Number>, ILevel, INameable, IScanAttributeContainer, IScannable<Number>, ITerminatable, ITimeoutable, ITolerable<Number>, IPositionListenable

public class MockCountingPositionScannable extends MockScannable
  • Constructor Details

    • MockCountingPositionScannable

      public MockCountingPositionScannable(String name, double position, boolean returnPosition)
  • Method Details

    • setPosition

      public Number setPosition(Number value, IPosition loc) throws ScanningException
      Description copied from interface: IScannable
      Moves to the position required, blocking until it is complete. Similar to moveTo(...) in GDA8
      Specified by:
      setPosition in interface IScannable<Number>
      Overrides:
      setPosition in class MockScannable
      Parameters:
      value - that this scalar should take.
      loc - 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:
      ScanningException
    • getPosition

      public Number getPosition()
      Description copied from interface: IBoundable
      The position is the value which should be: 1. Greater than or equal to the lower 2. Less than or equal to the upper. 3. One of the permitted values, if they are not null.
      Specified by:
      getPosition in interface IBoundable<Number>
      Overrides:
      getPosition in class MockScannable
      Returns: