Package gda.device

Interface ScannableMotionUnits

All Superinterfaces:
Configurable, Device, Findable, gda.observable.IObservable, Scannable, ScannableMotion
All Known Subinterfaces:
ContinuouslyScannable, IAirBearingScannableMotor, IScannableMotor, IScannableMotorObservable, ITweakableScannableMotor, IXesEnergyScannable, IXesSpectrometerScannable, SimulatedContinuouslyScannable
All Known Implementing Classes:
AirBearingScannableMotor, B18EnergyScannable, BeamlineWavelength, BeamSize, BeforeAfterScannable, BeforeAfterScannables, BeforeCheckScannable, CalibratedAmplifier, ControllerScannable, ConvertorScannable, CoupledScannable, Crystal1PitchScannable, DeferredScannable, DummyContinuouslyScannable, DummyMultiFieldUnitsScannable, DummyPersistentUnitsScannable, DummyRealPositionReader, DummyScannableMotor, DummyUnitsScannable, EpicsScannable, GapControlCheckingEnergyController, I18SampleFocusScannable, I23FluoScanEnergyControllerWrapper, IdealBaseX, JohannSpectrometer, KeyenceLightScannable, MultiPVScannable, PassthroughScannableMotionUnitsDecorator, QexafsScannable, QexafsTestingScannable, QueuedScriptDrivenScannableMotionUnits, SampleXYZAxis, ScannableAttenuatorWedge, ScannableMotionUnitsBase, ScannableMotionUnitsObservableWrapper, ScannableMotionWithScannableFieldsBase.ScannableField, ScannableMotor, ScannableRotatingGonio, ScanResetDummyUnitScannable, ScriptDrivenScannableMotionUnits, SequentialScannable, SmarGonScannableMotor, TrajectoryScannableMotor, TurboXasScannable, TweakableScannableMotor, TwoJawSlitGap, TwoJawSlitPosition, VmxmJacksPiezoScannable, XESEnergyScannable, XesSpectrometerScannable, XesSpectrometerScannableBase, ZebraQexafsScannable, ZebraScannableMotor, ZebraScannableMotorForQexafs

public interface ScannableMotionUnits extends ScannableMotion
An interface for ScannableMotion classes which provide a unit conversion from lower level hardware to an 'user unit' from a list of 'acceptable units'.

This provides a set of standard methods to use to enable this conversion.

Classes implementing this interface are recommended to use the UnitsComponent component to make the conversion between 'user units' and 'hardware units' easier.

Strings are used rather than Unit objects to enable use of these classes in the Jython environment.

  • Field Details

  • Method Details

    • getUserUnits

      String getUserUnits()
      Returns a string representation of the current reporting units
      Returns:
      Returns the reportingUnitsString.
    • setUserUnits

      void setUserUnits(String userUnitsString) throws DeviceException
      Sets the user unit to userUnitString. If a hardware unit has not been explicitly set, then the hardware unit is also set to userUnitString. If a hardware unit has been set, and the userUnit is not compatible with this, then a DeviceException is thrown.
      Parameters:
      userUnitsString - The reportingUnitsString to set.
      Throws:
      DeviceException - if string not found in list of acceptable units
    • getHardwareUnitString

      String getHardwareUnitString()
      Returns:
      Returns the motorUnitString.
    • setHardwareUnitString

      void setHardwareUnitString(String hardwareUnitString) throws DeviceException
      Sets the hardware unit to hardwareUnitString. If a user unit has not been explicitly set then the user unit is also set to hardwareUnitString. If the user unit has been explicitly set and the new hardware unit would invalidate this then a DeviceException is thrown.

      Based on this string, this method will build a list of acceptable user-units. Afterwards, the acceptable units list can be added to via the addAcceptableUnits method if the defaults do not cover enough.

      Parameters:
      hardwareUnitString - The motorUnitString to set.
      Throws:
      DeviceException
    • getAcceptableUnits

      String[] getAcceptableUnits()
      Returns:
      Returns the acceptableUnitStrings.
    • addAcceptableUnit

      void addAcceptableUnit(String newUnit) throws DeviceException
      Adds a new unit to the list of acceptable units based on the supllied string
      Parameters:
      newUnit - - string representation of the new acceptable unit
      Throws:
      DeviceException
    • setOffset

      void setOffset(Object offsetPositionInExternalUnits)
      Set offset(s) in amounts of external quantities as ScannableMotion.setOffset(Double...), but allows any position container containing objects that may be quantities. ScannableMotion.setOffset(Double...)
      Parameters:
      offsetPositionInExternalUnits -