Class EpicsDlsMcsSis3820Controller

java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.detector.multichannelscaler.EpicsDlsMcsSis3820Controller
All Implemented Interfaces:
Device, InitializationListener, Configurable, Findable, gda.observable.IObservable

public class EpicsDlsMcsSis3820Controller extends DeviceBase implements InitializationListener
mapping class for EPICS dlsMcsSIS3820 template. Note the current implementation treats MCA records in this template as PV only because we only use it to collect spectrum data from detectors, all the controls for MCAs are wrapped by this template. This may change in the future.
  • Field Details

    • MAXIMUM_NUMBER_OF_MCA

      public static final int MAXIMUM_NUMBER_OF_MCA
      Maximum number of MCA record supported by EPICS DlsMcsSis3820 template
      See Also:
    • MAXIMUM_NUMBER_BINS

      public static final int MAXIMUM_NUMBER_BINS
      Maximum number of bins in spectrum
      See Also:
  • Constructor Details

    • EpicsDlsMcsSis3820Controller

      public EpicsDlsMcsSis3820Controller()
  • Method Details

    • 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
    • getDataChannel

      public gov.aps.jca.Channel getDataChannel(int index)
      Gets the data Channel ID.
      Parameters:
      index -
      Returns:
      data channel ID
    • eraseStart

      public void eraseStart() throws DeviceException
      Activates the MCA using the Erase invalid input: '&' Start acquire.
      Throws:
      DeviceException
    • erase

      public void erase() throws DeviceException
      Erases the data array of the MCA
      Throws:
      DeviceException
    • start

      public void start() throws DeviceException
      Starts data acquisition
      Throws:
      DeviceException
    • stop

      public void stop() throws DeviceException
      Stops data acquisition
      Throws:
      DeviceException
    • getNumberOfBins

      public long getNumberOfBins() throws DeviceException
      Gets the number of bins to use in spectrum.
      Returns:
      the number of channels to use
      Throws:
      DeviceException
    • setNumberOfBins

      public void setNumberOfBins(long nbins) throws DeviceException
      Sets the number of bins (array elements) to use in spectrum.
      Parameters:
      nbins -
      Throws:
      DeviceException
    • setReadRate

      public void setReadRate(String value) throws DeviceException
      Sets a new read update rate for DlsMcsSIS3820.
      Parameters:
      value -
      Throws:
      DeviceException
    • getReadRate

      public void getReadRate(String value) throws DeviceException
      Gets the current read update rate from DlsMcsSIS3820.
      Parameters:
      value -
      Throws:
      DeviceException
    • getRealTime

      public double getRealTime() throws DeviceException
      Gets the real time since the start of acquisition
      Returns:
      elapsed real time
      Throws:
      DeviceException
    • getAcquiringStatus

      public int getAcquiringStatus() throws DeviceException
      Gets acquire status from MCA (poll from hardware)
      Returns:
      0 done, 1 Acquire
      Throws:
      DeviceException
    • getTotalTime

      public double getTotalTime() throws DeviceException
      Gets the total count/acquisition time
      Returns:
      elapsed real time
      Throws:
      DeviceException
    • setTotalTime

      public void setTotalTime(double value) throws DeviceException
      Sets the total count/acquisition time
      Parameters:
      value -
      Throws:
      DeviceException
    • getDwellTime

      public double getDwellTime() throws DeviceException
      Gets the integration time in seconds for incrementing bin number. i.e. the Dwell Time (DWEL) per bin.
      Returns:
      Dwell Time
      Throws:
      DeviceException
    • setDwellTime

      public void setDwellTime(double time) throws DeviceException
      Sets the integration time in seconds for incrementing bin number, i.e.
      Parameters:
      time -
      Throws:
      DeviceException
    • getBinAdv

      public String getBinAdv() throws DeviceException
      Gets the internal or external bin advance signal
      Returns:
      internal or external
      Throws:
      DeviceException
    • setBinAdv

      public void setBinAdv(String value) throws DeviceException
      Sets the internal or external bin advance signal
      Parameters:
      value -
      Throws:
      DeviceException
    • getExternalPreScaler

      public double getExternalPreScaler() throws DeviceException
      Gets the external bin advance pre-scaler, i.e. advance step.
      Returns:
      bin advance pre-scaler
      Throws:
      DeviceException
    • setExternalPreScaler

      public void setExternalPreScaler(String value) throws DeviceException
      Sets the external bin advance per-scaler, i.e. advance step size, default is 1.
      Parameters:
      value -
      Throws:
      DeviceException
    • getData

      public int[][] getData() throws DeviceException
      Gets all spectrum data from all channels
      Returns:
      spectrum data
      Throws:
      DeviceException
    • getData

      public int[] getData(int channel) throws DeviceException
      Gets the spectrum data for the specified channel
      Parameters:
      channel -
      Returns:
      spectrum data
      Throws:
      DeviceException
    • addDataMonitor

      public void addDataMonitor(int channel, EpicsDlsMcsSis3820Controller.DataMonitor ml) throws DeviceException
      Parameters:
      channel -
      ml -
      Throws:
      DeviceException
    • getStatus

      public MCAStatus getStatus()
      Get current dlsMcsSIS3820 status
      Returns:
      MCA status
    • initializationCompleted

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

      public void disablePollRealTime()
    • enablePollRealTime

      public void enablePollRealTime()
    • getReadRates

      public String[] getReadRates() throws DeviceException
      Gets all available read update rates from EPICS IOC
      Returns:
      available read update rates
      Throws:
      DeviceException
    • getRecordName

      public String getRecordName()
      Get Epics Record name
      Returns:
      record name
    • setRecordName

      public void setRecordName(String recordName)
      Sets EPICS record name
      Parameters:
      recordName -
    • getNumberOfMca

      public int getNumberOfMca()
      Gets number of MCA records in this template
      Returns:
      number of MCA record supported
    • setNumberOfMca

      public void setNumberOfMca(int numberOfMca)
      Sets number of MCA record in this template.
      Parameters:
      numberOfMca -
    • isPollElapsedRealTime

      public boolean isPollElapsedRealTime()
    • setPollElapsedRealTime

      public void setPollElapsedRealTime(boolean pollElapsedRealTime)