Class EpicsSimpleArray

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

public class EpicsSimpleArray extends ScannableBase implements SimpleArray, InitializationListener
Class implements EPICS SimpleArray interface (record type in GDA interface is 'array', in EPICS is 'waveform'). It supports variable length String IO to EPICS waveform record. It has build-in string to/from int array conversion. The object of this class will monitor changes in waveform as well.
  • Field Details

  • Constructor Details

    • EpicsSimpleArray

      public EpicsSimpleArray()
      The 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
    • getValue

      public String getValue() throws DeviceException
      Description copied from interface: SimpleArray
      Returns the latest value.
      Specified by:
      getValue in interface SimpleArray
      Returns:
      the latest value of the monitor
      Throws:
      DeviceException
    • setValue

      public void setValue(String newValue) throws DeviceException
      Description copied from interface: SimpleArray
      Set the target value.
      Specified by:
      setValue in interface SimpleArray
      Parameters:
      newValue - the target control point value
      Throws:
      DeviceException
    • getPvName

      public String getPvName()
      Returns the name of the pv this object is monitoring
      Returns:
      the name of the pv
    • setPvName

      public void setPvName(String pvName)
      Sets the name of the pv this object monitors. This must be called before the configure method makes the connections to the pv.
      Parameters:
      pvName -
    • initializationCompleted

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

      public void destroy() throws IllegalStateException, gov.aps.jca.CAException
      Throws:
      IllegalStateException
      gov.aps.jca.CAException
    • asynchronousMoveTo

      public void asynchronousMoveTo(Object position) throws DeviceException
      Description copied from class: ScannableBase
      Trigger a move/operation and return immediately. Implementations of this method should be non-blocking to allow concurrent motion; the isBusy method will be used to determine when the move has completed. Converts the external (user) position to an internal position and passes this to rawAsynchronousMoveTo.
      Specified by:
      asynchronousMoveTo in interface Scannable
      Overrides:
      asynchronousMoveTo in class ScannableBase
      Parameters:
      position - Position to move to should have an element for each input field.
      Throws:
      DeviceException
    • getPosition

      public Object getPosition() throws DeviceException
      Description copied from class: ScannableBase
      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
    • isBusy

      public boolean isBusy() throws DeviceException
      Description copied from interface: Scannable
      Check if the Scannable is moving/operating.
      Specified by:
      isBusy in interface Scannable
      Returns:
      true - if operation carried out by moveTo has not completed yet
      Throws:
      DeviceException