Class AdcMonitor

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

public class AdcMonitor extends MonitorBase
Class to monitor an ADC
  • Constructor Details

    • AdcMonitor

      public AdcMonitor()
      Constructor.
  • 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
    • setAdcName

      public void setAdcName(String adcName)
      Parameters:
      adcName -
    • getAdcName

      public String getAdcName()
      Returns:
      name of the monitored adc
    • setChannel

      public void setChannel(int channel)
      Parameters:
      channel -
    • getChannel

      public int getChannel()
      Returns:
      name of the monitored channel
    • setPollTime

      public void setPollTime(long pollTime)
      Parameters:
      pollTime - the poll time in milliseconds
    • getPollTime

      public long getPollTime()
      Returns:
      The poll time.
    • getPosition

      public Object getPosition() throws DeviceException
      Returns the latest value of the ADC's channel this class is monitoring Returns the current position of the Scannable. Called by ConcurentScan at the end of the point. Reads an internal (hardware) position from rawGetPosition, converts this to an external (user) position and returns it.
      Specified by:
      getPosition in interface Scannable
      Overrides:
      getPosition in class ScannableBase
      Returns:
      Current position with an element for each input and extra field. null if their are no fields.
      Throws:
      DeviceException
      See Also:
    • getElementCount

      public int getElementCount() throws DeviceException
      Description copied from interface: Monitor
      returns the number of elements in this monitor.
      Specified by:
      getElementCount in interface Monitor
      Overrides:
      getElementCount in class MonitorBase
      Returns:
      int the element count
      Throws:
      DeviceException
    • getUnit

      public String getUnit() throws DeviceException
      Description copied from interface: Monitor
      gets the physical unit of the monitor.
      Specified by:
      getUnit in interface Monitor
      Overrides:
      getUnit in class MonitorBase
      Returns:
      String the physical unit
      Throws:
      DeviceException