Class EpicsCVScan

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

public class EpicsCVScan extends DeviceBase implements InitializationListener
  • Constructor Details

    • EpicsCVScan

      public EpicsCVScan()
  • Method Details

    • isGDAScanning

      public boolean isGDAScanning()
    • setGDAScanning

      public void setGDAScanning(boolean gDAScanning)
    • getFileNumber

      public long getFileNumber()
    • setFileNumber

      public void setFileNumber(long fileNumber)
    • getCollectionNumber

      public long getCollectionNumber()
    • setCollectionNumber

      public void setCollectionNumber(long collectionNumber)
    • configure

      public void configure() throws FactoryException
      Description copied from class: ConfigurableBase
      Default implementation for classes that do not have to do any specific configuration.
      Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.
      Specified by:
      configure in interface Configurable
      Overrides:
      configure in class ConfigurableBase
      Throws:
      FactoryException - if there is an error in configuration e.g. required variable not set or cannot connect to device
    • getMonitorAverage

      public double getMonitorAverage() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • getTime

      public double getTime() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets the total time of the constant velocity scan.
      Returns:
      total time in seconds
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • setTime

      public void setTime(double time) throws gov.aps.jca.CAException, InterruptedException
      sets the total time for the constant velocity scan.
      Parameters:
      time - in seconds
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • getProfile

      public String getProfile() throws DeviceException
      gets the motor components that participate the subsequent constant velocity scan.
      Returns:
      String motor names
      Throws:
      DeviceException
    • setProfile

      public void setProfile(String profile) throws DeviceException, InterruptedException
      sets the motor components that participate the subsequent constant velocity scan.
      Parameters:
      profile -
      Throws:
      DeviceException
      InterruptedException
    • isKeepSeparate

      public boolean isKeepSeparate() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • setKeepSeparate

      public void setKeepSeparate(boolean b) throws gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • get2ndMotorStartPosition

      public double get2ndMotorStartPosition() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets the scan start position of 2nd motor that participating the constant velocity scan of two-theta.
      Returns:
      the 2nd motor scan range.
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • set2ndMotorStartPosition

      public void set2ndMotorStartPosition(double position) throws gov.aps.jca.CAException, InterruptedException
      sets the scan start position of 2nd motor that participating the constant velocity scan of two-theta.
      Parameters:
      position -
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • get2ndMotorScanRange

      public double get2ndMotorScanRange() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets the scan range of 2nd motor that participating the constant velocity scan of two-theta.
      Returns:
      the 2nd motor scan range.
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • set2ndMotorScanRange

      public void set2ndMotorScanRange(double position) throws gov.aps.jca.CAException, InterruptedException
      sets the scan range of 2nd motor that participating the constant velocity scan of two-theta.
      Parameters:
      position -
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • start

      public void start() throws gov.aps.jca.CAException, InterruptedException
      starts, restarts, or resume the constant velocity scan. The scan only starts when its current state is in one of the following modes: Done, Aborted, Paused or Fault. This is done to ensure the EPICS "Start" is never being called more than once during a constant velocity scan.
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • pause

      public void pause() throws gov.aps.jca.CAException, InterruptedException
      pauses current constant velocity scan.
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • abort

      public void abort() throws gov.aps.jca.CAException, InterruptedException
      aborts current constant velocity scan.
      Throws:
      gov.aps.jca.CAException
      InterruptedException
    • getCurrentState

      public EpicsCVScanState getCurrentState() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      pulls the current state of the CVScan from EPICS and update cached currentstate.
      Returns:
      the current state
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • getRaw2ThetaPositions

      public double[] getRaw2ThetaPositions() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      gets the raw two-theta position where scalers/detectors are triggered.
      Returns:
      two-theta positions
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • getRaw2ThetaSize

      public int getRaw2ThetaSize()
    • getRebinned2ThetaPositions

      public double[] getRebinned2ThetaPositions() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • getRebinned2ThetaSize

      public int getRebinned2ThetaSize()
    • getRebinnedCounts

      public double[] getRebinnedCounts() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • getRebinnedCountsSize

      public int getRebinnedCountsSize()
    • getRebinnedCountErrors

      public double[] getRebinnedCountErrors() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • getRebinnedCountErrorsSize

      public int getRebinnedCountErrorsSize()
    • getMessage

      public String getMessage()
      return the latest status message that updated from EPICS
      Returns:
      the cached message
    • getState

      public EpicsCVScanState getState()
      returns the latest current state that updated from EPICS
      Returns:
      the cached currentstate
    • getNumberOfPulseDone

      public int getNumberOfPulseDone()
      returns the latest number of pulses completed that updated from EPICS
      Returns:
      the cached numberofpulsedone
    • getTotalNumberOfPulses

      public int getTotalNumberOfPulses()
      returns the latest total number of pulses in this CVScan that updated from EPICS
      Returns:
      the cached totalnumberofpulse
    • getPv_root

      public String getPv_root()
    • setPv_root

      public void setPv_root(String pvRoot)
    • getProfiles

      public String[] getProfiles() throws InterruptedException
      Throws:
      InterruptedException
    • initializationCompleted

      public void initializationCompleted() throws InterruptedException
      Description copied from interface: InitializationListener
      Called when all critical channels are connected.
      Specified by:
      initializationCompleted in interface InitializationListener
      Throws:
      InterruptedException
    • isBusy

      public boolean isBusy()
    • setBusy

      public void setBusy(boolean b)