Class CurrentAmplifierBase

All Implemented Interfaces:
CurrentAmplifier, Device, Scannable, Configurable, Findable, gda.observable.IObservable
Direct Known Subclasses:
DummyCurrentAmplifier, DummyEpicsCurrAmpSingle, DummyStanfordScannable, EpicsCurrAmpSingle, EpicsFemtoAmplifier, EpicsStanfordAmplifer, StanfordScannable

@ServiceInterface(CurrentAmplifier.class) public abstract class CurrentAmplifierBase extends ScannableBase implements CurrentAmplifier
Base class for the CurrentAmplifier interface
  • Field Details

    • gainPositions

      protected final List<String> gainPositions
    • gainUnits

      protected final List<String> gainUnits
    • modePositions

      protected final List<String> modePositions
  • Constructor Details

    • CurrentAmplifierBase

      public CurrentAmplifierBase()
  • Method Details

    • getGainPositions

      public String[] getGainPositions() throws DeviceException
      Description copied from interface: CurrentAmplifier
      Returns an array of all possible gain positions which this device can be moved to.
      Specified by:
      getGainPositions in interface CurrentAmplifier
      Returns:
      an array of gain positions
      Throws:
      DeviceException
    • getGainUnits

      public String[] getGainUnits() throws DeviceException
      Description copied from interface: CurrentAmplifier
      Returns an array of all possible gain units which this device can be moved to.
      Specified by:
      getGainUnits in interface CurrentAmplifier
      Returns:
      an array of gain units
      Throws:
      DeviceException
    • getModePositions

      public String[] getModePositions() throws DeviceException
      Description copied from interface: CurrentAmplifier
      Returns an array of all possible mode positions which this device can be set to.
      Specified by:
      getModePositions in interface CurrentAmplifier
      Returns:
      an array of mode positions
      Throws:
      DeviceException
    • 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()
      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
    • checkPositionValid

      public String checkPositionValid(Object position)
      Description copied from class: ScannableBase
      This default behaviour should be extended by most subclasses! Tests if the given object is meaningful to this Scannable and so could be used by one of the move commands. May check limits and other things too. This is the method called by scans on all points before the scan is run.
      Specified by:
      checkPositionValid in interface Scannable
      Overrides:
      checkPositionValid in class ScannableBase
      Parameters:
      position -
      Returns:
      null if position is valid, or returns a description if not.
      See Also: