Package gda.device

Interface Adc

All Superinterfaces:
Configurable, Device, Findable, gda.observable.IObservable
All Known Implementing Classes:
DummyAdc, EpicsADC

public interface Adc extends Device
Interface to control ADCs, for example EpicsADC.
  • Method Details

    • getVoltage

      double getVoltage(int channel) throws DeviceException
      Get the current voltage for the specified channel.
      Parameters:
      channel - the ADC channel to read
      Returns:
      the current voltage (units are implementation specific)
      Throws:
      DeviceException
    • getVoltages

      double[] getVoltages() throws DeviceException
      Get the current voltage from all open channels.
      Returns:
      the current voltages (units are implementation specific)
      Throws:
      DeviceException
    • setRange

      void setRange(int channel, int range) throws DeviceException
      Set the voltage Range for the specified channel.
      Parameters:
      channel - the ADC channel to set
      range - the range to set (units are implementation specific)
      Throws:
      DeviceException
      See Also:
    • getRange

      int getRange(int channel) throws DeviceException
      Get the current voltage Range for the specified channel.
      Parameters:
      channel - the ADC channel to get
      Returns:
      the range (units are implementation specific)
      Throws:
      DeviceException
      See Also:
    • setUniPolar

      void setUniPolar(int channel, boolean polarity) throws DeviceException
      Set the unipolar or bipolar mode for a specified channel.
      Parameters:
      channel - the ADC channel to set
      polarity - unipolar mode either true or false
      Throws:
      DeviceException
      See Also:
    • getRanges

      int[] getRanges() throws DeviceException
      Get the supported ranges for a particular ADC.
      Returns:
      the supported voltage ranges (units are implementation specific)
      Throws:
      DeviceException
    • isUniPolarSettable

      boolean isUniPolarSettable() throws DeviceException
      Get the polarity capability of the ADC.
      Returns:
      true if UNIPOLAR is supported else assume BIPOLAR
      Throws:
      DeviceException
    • setSampleCount

      void setSampleCount(int count) throws DeviceException
      Set the sample count for the ADC monitoring.
      Parameters:
      count - the number of samples to read
      Throws:
      DeviceException