Class EpicsPositioner

All Implemented Interfaces:
ControllerRecord, Device, EnumPositioner, Scannable, InitializationListener, Configurable, Findable, gda.observable.IObservable
Direct Known Subclasses:
EpicsPositionerCallback

This class maps to EPICS positioner template.
See Also:
  • Field Details

    • controller

      protected EpicsController controller
    • channelManager

      protected EpicsChannelManager channelManager
    • select

      protected gov.aps.jca.Channel select
    • dmovMonitor

      protected gda.device.enumpositioner.EpicsPositioner.DmovMonitorListener dmovMonitor
  • Constructor Details

    • EpicsPositioner

      public EpicsPositioner()
      Constructor
  • Method Details

    • getAllowPositionValueReads

      public boolean getAllowPositionValueReads()
    • setAllowPositionValueReads

      public void setAllowPositionValueReads(boolean allowPositionValueReads)
    • setRecordName

      public void setRecordName(String recordName)
      Sets the record name that this positioner will link to.
      Parameters:
      recordName - the record name
    • getRecordName

      public String getRecordName()
    • setRecordValuesSuffix

      public void setRecordValuesSuffix(String recordSuffix)
      Sets the suffix to find the individual values of the positioner.
      Parameters:
      recordSuffix - the record suffix
    • getRecordValuesSuffix

      public String getRecordValuesSuffix()
    • 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:
    • 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
    • setRecordNamesUsingBasePv

      protected void setRecordNamesUsingBasePv(String recordName)
      Builds the five PVs for this EpicsPositioner by appending suffixes to a base record name.
    • createChannelAccess

      protected void createChannelAccess() throws FactoryException
      Throws:
      FactoryException
    • 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
    • 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:
    • getAcceptNewMoveToPositionWhileMoving

      public boolean getAcceptNewMoveToPositionWhileMoving()
    • setAcceptNewMoveToPositionWhileMoving

      public void setAcceptNewMoveToPositionWhileMoving(boolean acceptNewMoveToPositionWhileMoving)
    • 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:
    • getPositions

      public String[] getPositions() throws DeviceException
      Description copied from interface: EnumPositioner
      Returns an array of the positions which this device can be moved to.
      Specified by:
      getPositions in interface EnumPositioner
      Overrides:
      getPositions in class EnumPositionerBase
      Returns:
      an array of positions
      Throws:
      DeviceException
    • isInPos

      public boolean isInPos() throws DeviceException
      Description copied from class: EnumPositionerBase
      Simple implementation that may not be reliable.
      Devices with a PV that indicates whether the device is in position should use this instead.
      Specified by:
      isInPos in interface EnumPositioner
      Overrides:
      isInPos in class EnumPositionerBase
      Throws:
      DeviceException
    • initializationCompleted

      public void initializationCompleted() throws DeviceException, InterruptedException
      Description copied from interface: InitializationListener
      Called when all critical channels are connected.
      Specified by:
      initializationCompleted in interface InitializationListener
      Throws:
      DeviceException
      InterruptedException
    • getPositionValue

      public Double getPositionValue(String position) throws DeviceException
      Returns:
      the physical motor value for the supplied position string.
      Throws:
      DeviceException
    • getPositionFromValue

      public String getPositionFromValue(double value) throws DeviceException
      Reverse lookup - potentially flawed because several positions may have the same value.
      Throws:
      DeviceException