Package gda.hrpd.pmac

Class EpicsCVScanController

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

public class EpicsCVScanController extends DeviceBase implements InitializationListener
  • Constructor Details

    • EpicsCVScanController

      public EpicsCVScanController()
  • Method Details

    • isGDAScanning

      public boolean isGDAScanning()
    • setGDAScanning

      public void setGDAScanning(boolean gDAScanning)
    • getFileNumber

      public long getFileNumber()
    • setFileNumber

      public void setFileNumber(long fileNumber)
    • isLive

      public boolean isLive()
    • setLive

      public void setLive(boolean live)
    • 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
    • getMonitorAvaerage

      public double getMonitorAvaerage() 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, or Paused. 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 EpicsCVScanController.CurrentState 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
    • getStatusMessage

      public String getStatusMessage() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      pulls the status message from EPICS and update cached message value
      Returns:
      the status message as String
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • getNumberOfPulsesDone

      public int getNumberOfPulsesDone() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      pulls the number of pulse done from EPICS and update cached numberofpulsedone value
      Returns:
      the status message as String
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • getTotalNumberPulses

      public int getTotalNumberPulses() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      pulls the total number of pulse from EPICS and update cached totalnumberofpulse value
      Returns:
      the status message as String
      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()
    • getMAC1X

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

      public int getMAC1XSize()
    • getMAC2X

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

      public int getMAC2XSize()
    • getMAC3X

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

      public int getMAC3XSize()
    • getMAC4X

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

      public int getMAC4XSize()
    • getMAC5X

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

      public int getMAC5XSize()
    • getMAC1Y

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

      public int getMAC1YSize()
    • getMAC2Y

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

      public int getMAC2YSize()
    • getMAC3Y

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

      public int getMAC3YSize()
    • getMAC4Y

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

      public int getMAC4YSize()
    • getMAC5Y

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

      public int getMAC5YSize()
    • getMessage

      public String getMessage()
      return the latest status message that updated from EPICS
      Returns:
      the cached message
    • 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)
    • getPlotPanelName

      public String getPlotPanelName()
    • setPlotPanelName

      public void setPlotPanelName(String plotPanelName)
    • 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)