Class EpicsControlPoint

All Implemented Interfaces:
INeXusInfoWriteable, ControlPoint, Device, Scannable, ScannableMotion, InitializationListener, Configurable, Findable, gda.observable.IObservable
Direct Known Subclasses:
EpicsControlPointWithStatus

The Class EpicsControlPoint.
  • Field Details

  • Constructor Details

    • EpicsControlPoint

      public EpicsControlPoint()
      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 double getValue() throws DeviceException
      Description copied from interface: ControlPoint
      Returns the latest value observed by this Control Point.
      Specified by:
      getValue in interface ControlPoint
      Returns:
      the latest value of the monitor
      Throws:
      DeviceException
    • toFormattedString

      public String toFormattedString()
      Description copied from interface: Scannable
      Returns a string representation of the Scannable and its current position/value/status

      Typically should return:

      name : position

      or for detectors, name : status

      If the position/status cannot be determined, the function should return Scannable.VALUE_UNAVAILABLE in its place.

      Specified by:
      toFormattedString in interface Scannable
      Overrides:
      toFormattedString in class ScannableMotionBase
      Returns:
      string as defined above
    • setValue

      public void setValue(double newValue) throws DeviceException
      Description copied from interface: ControlPoint
      Set the target Control Point
      Specified by:
      setValue in interface ControlPoint
      Parameters:
      newValue - the target control point value
      Throws:
      DeviceException
    • getPvNameSetPoint

      public String getPvNameSetPoint()
      Returns the name of the pv this object is monitoring
      Returns:
      the name of the pv
    • setPvNameSetPoint

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

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

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

      public String getPvName()
    • setPvName

      public void setPvName(String pvName)
    • getSensitivity

      public double getSensitivity()
      Returns the sensitivity of updates from this monitor. The sensitivity is the percentage change which must occur in the pv value for the IObservers to be informed. This prevents unneccessary updating.
      Returns:
      the sensitivity of updates from this monitor
    • setSensitivity

      public void setSensitivity(double sensitivity)
      Sets the sensitivity level of updates to IObservers from this object.
      Parameters:
      sensitivity -
    • initializationCompleted

      public void initializationCompleted()
      Description copied from interface: InitializationListener
      Called when all critical channels are connected.
      Specified by:
      initializationCompleted in interface InitializationListener
    • 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 ScannableMotionBase
      Parameters:
      position - Position to move to should have an element for each input field.
      Throws:
      DeviceException
    • atCommandFailure

      public void atCommandFailure() throws DeviceException
      Description copied from class: ScannableBase
      Hook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred. However not called when the command is aborted using an InterruptionException. If a Scan is aborted then only Scannable.stop() will be called by the Scan or pos command.

      Useful for telling Scannables which hold state during a scan for example, to reset themselves. Used for example by CoordinatedMotionScannables. This hook should be used not in the same way as the stop hook. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.

      Specified by:
      atCommandFailure in interface Scannable
      Overrides:
      atCommandFailure in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • 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 class: ScannableMotionBase
      Check if the Scannable is moving/operating.. Calls onto rawIsBusy for historical reasons, although there is currently no need for this.
      Specified by:
      isBusy in interface Scannable
      Overrides:
      isBusy in class ScannableMotionBase
      Returns:
      true - if operation carried out by moveTo has not completed yet
      Throws:
      DeviceException
      See Also:
    • isMonitorChannels

      public boolean isMonitorChannels()
    • setMonitorChannels

      public void setMonitorChannels(boolean monitorChannels)
    • getUpperLimit

      public Double getUpperLimit()
    • setUpperLimit

      public void setUpperLimit(Double upperLimit)
    • getLowerLimit

      public Double getLowerLimit()
    • setLowerLimit

      public void setLowerLimit(Double lowerLimit)
    • setDynamicScannableLimits

      public void setDynamicScannableLimits(DynamicScannableLimits dynamicScannableLimits)