Package gda.scan

Class PseudoDeviceTimeScan

java.lang.Object
gda.scan.ScanBase
gda.scan.PseudoDeviceTimeScan
All Implemented Interfaces:
NestableScan, Scan, ScanChild, Serializable

public class PseudoDeviceTimeScan extends ScanBase
A scan which operates over one or more pseudo devices and reads out their current position at fixed time intervals. It makes no attempt to move them.
See Also:
  • Constructor Details

    • PseudoDeviceTimeScan

      public PseudoDeviceTimeScan(Scannable[] pseudoDevices, double collectInterval, int numberPoints) throws Exception
      Parameters:
      pseudoDevices - - array of PseudoDevices to readout in the scan
      collectInterval - - the time in seconds between each point
      numberPoints - - the number of points to collect for - if this is set to 0 then the scan will not stop until the user tells it to.
      Throws:
      Exception
  • Method Details

    • doCollection

      public void doCollection() throws Exception
      Description copied from interface: Scan
      The method in which the work of the scan is performed. This method assumes that the data handler has already been created and the baton claimed.
      Specified by:
      doCollection in interface Scan
      Specified by:
      doCollection in class ScanBase
      Throws:
      Exception
    • waitUntil

      protected void waitUntil(long targetTime) throws InterruptedException
      Given a Java time in seconds, waits until that point and then returns. If that time has passed, then returns immediately;
      Parameters:
      targetTime - time in seconds
      Throws:
      InterruptedException