Class EpicsValve

All Implemented Interfaces:
ControllerRecord, Device, EnumPositioner, Scannable, Configurable, Findable, gda.observable.IObservable, gov.aps.jca.event.MonitorListener, EventListener
Direct Known Subclasses:
EpicsValveCallback

@ServiceInterface(EnumPositioner.class) public class EpicsValve extends EnumPositionerBase implements gov.aps.jca.event.MonitorListener, ControllerRecord
Control devices using the Epics Valve/Shutter template.

This class operates two Epics records: a record which controls the device and a record which holds the status. The positions are: "Open", "Close" and "Reset". There are 5 values for the status: "Open", "Opening", "Closed", "Closing" and "Fault".

The stop method in this class does nothing as the valves operate too fast for such a method to be meaningful.

  • Field Details

    • controller

      protected EpicsController controller
    • currentPositionChnl

      protected gov.aps.jca.Channel currentPositionChnl
    • currentStatusChnl

      protected gov.aps.jca.Channel currentStatusChnl
    • channelManager

      protected EpicsChannelManager channelManager
  • Constructor Details

    • EpicsValve

      public EpicsValve()
      Constructor.
  • Method Details

    • configure

      public void configure()
      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
    • rawAsynchronousMoveTo

      public void rawAsynchronousMoveTo(Object position) throws DeviceException
      Description copied from class: ScannableBase
      [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.
      Overrides:
      rawAsynchronousMoveTo in class ScannableBase
      Parameters:
      position - Position in its internal/hardware representation. e.g. with units and offsets removed
      Throws:
      DeviceException
      See Also:
    • getPosition

      public String 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
    • getStatus

      public EnumPositionerStatus getStatus() throws DeviceException
      Description copied from interface: EnumPositioner
      Returns the current status
      Specified by:
      getStatus in interface EnumPositioner
      Overrides:
      getStatus in class EnumPositionerBase
      Returns:
      the status
      Throws:
      DeviceException
    • fetchEpicsStatus

      protected EnumPositionerStatus fetchEpicsStatus() throws DeviceException
      Throws:
      DeviceException
    • getValveStatus

      public gda.device.enumpositioner.EpicsValve.ValveStatus getValveStatus() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Throws:
      gov.aps.jca.TimeoutException
      gov.aps.jca.CAException
      InterruptedException
    • stop

      public void stop() throws DeviceException
      Description copied from class: ScannableBase
      Stop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
      Specified by:
      stop in interface Scannable
      Overrides:
      stop in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • getEpicsRecordName

      public String getEpicsRecordName()
      Returns the name of the Epics valve/shutter template this object is using
      Returns:
      the name of the Epics valve/shutter template
    • setEpicsRecordName

      public void setEpicsRecordName(String recordName)
      Sets the name of the Epics valve/shutter template to use.
      Parameters:
      recordName -
    • getControllerRecordName

      public String getControllerRecordName()
      Description copied from interface: ControllerRecord
      Gets the name of the controller record, e.g. EPICS process variable name. For example, in NeXus this value can be written as the value of the controller_record field for the NXpositioner for the scannable.
      Specified by:
      getControllerRecordName in interface ControllerRecord
      Returns:
      controller record name
      See Also:
    • monitorChanged

      public void monitorChanged(gov.aps.jca.event.MonitorEvent arg0)
      Specified by:
      monitorChanged in interface gov.aps.jca.event.MonitorListener
    • isCheckDemandInStatus

      public boolean isCheckDemandInStatus()
    • setCheckDemandInStatus

      public void setCheckDemandInStatus(boolean checkDemandInStatus)
      If set to 'true', the demand and current valve positions will be checked in getStatus() - if the current position != demand position then state is set to EnumPositionerStatus.MOVING.
      Parameters:
      checkDemandInStatus -