Package gda.device

Interface Scannable

All Superinterfaces:
Configurable, Device, Findable, gda.observable.IObservable
All Known Subinterfaces:
AlignmentStage, AmplifierAutoGain, Analyser, AperturePositioner, Assembly, AsynchronousDetector, Beamline, BufferedDetector, CoboldDetector, ContinuouslyScannable, ContinuouslyScannableViaController, ControlPoint, CounterTimer, CurrentAmplifier, DataLogger, Detector, DetectorMonitorDataProviderInterface, Diffractometer, EdeDetector, EditableEnumPositioner, EndStation, EnumPositioner, EpicsAreaDetector, EpicsMcsSis3820, EtlDetector, FrelonDetector, Gonio, HardwareTriggerableDetector, HardwareTriggeredDetector, HardwareTriggeredNexusXmap, IAirBearingScannableMotor, IAravisCamera, IEDXDElement, IEpicsChannel, IEpicsMCA, IEpicsMCASimple, IMythenDetector, IPCODetector, IPixiumDetector, IScannableGroup, IScannableGroupNamed, IScannableMotor, IScannableMotorObservable, ISpin, ITweakableScannableMotor, IXesEnergyScannable, IXesSpectrometerScannable, Mar345, Monitor, Mythen, NamedEnumPositioner, NcdDetector, NexusDetector, NXPluginDetector, ODCCD, PCO4000, Pilatus, PlateLoader, Robot, SampleEnvironment, SamplePlateMover, ScannableMotion, ScannableMotionUnits, ShutterController, SimpleArray, SimulatedBufferedDetector, SimulatedContinuouslyScannable, StanfordAmplifier, StripDetector, Temperature, VariableCollectionTimeDetector, XCHIPDetector, XmapDetector, Xspress3, Xspress3Mini, XspressDetector, XspressFluorescenceDetector
All Known Implementing Classes:
AbsorptionCoefficient, AbstractKeithley2600Series, AbstractKeithley6400Series, AbstractPlateLoader, AbstractScanHook, AbstractWriteRegionsImmediatelyNXDetector, AceApdDetector, ADCameraDetector, ADCameraDetector, AdcMonitor, ADCMonitor, ADDetector, AdDetectorExtRoiDraw, ADPco, ADPilatus, AgilentWaveform, AirBearingScannableMotor, AlignmentStageScannable, AnalyserBase, AndorZylaDetector, Apple2IDGapPolar, Apple2IDGapPolarPos, Apple2IDScannableBase, AravisCamera, AsciiFileProcessor, AsciiReaderDetector, AsciiReaderScannable, AssemblyAdapter, AssemblyBase, B18EnergyScannable, BaseChipRegScannable, BeamDimensions, BeamlineConditionMonitorBase, BeamlineWavelength, BeamMonitor, BeamMonitor, BeamSize, BeforeAfterScannable, BeforeAfterScannables, BeforeCheckScannable, BimorphMirrorScannable, BSSCScannable, BufferedEdeDetector, BufferedNXDetector, BufferedPandaDetector, BufferedScaler, BufferedScannablePositions, CalibratedAmplifier, CallableTfgScalerWithLogValues, CallableTfgXmap, CallableTfgXspress2, CallableXmap, Cam4Detector, CameraXYScannable, CamZoomPositioner, CheckingScannable, ChipRegAnperScannable, CircHklScannable, CoboldTDC, CombinedManipulator, ConicHklScannable, ConicIndexScannable, ConicThScannable, ContinuousScannable, ControllerScannable, ConvertorScannable, CoordinatedScannableGroup, CounterTimerBase, CoupledScannable, Crystal1PitchScannable, CurrentAmplifierBase, CVScan, CVScan, DAServerStatusChecker, DataReductionScannable, DatasetNexusDetector, DataSocketDetector, DeferredAndTrajectoryScannableGroup, DeferredScannable, DeferredScannableGroup, DetectorArm, DetectorBase, DetectorDistance, DetectorFillingMonitorScannable, DetectorMonitorDataProvider, Diffractometer, DiffractometerBase, DoseCalculator, DummyBufferedDetector, DummyCoboldTDC, DummyConstantVelocityRasterScannable, DummyContinuouslyScannable, DummyControlPoint, DummyCounterTimer, DummyCurrentAmplifier, DummyDAServerStatusChecker, DummyDetector, DummyEnumPositioner, DummyEpicsCurrAmpSingle, DummyEpicsLakeshore336, DummyEpicsMcaForXmap, DummyEpicsMonitor, DummyEpicsMonitorDouble, DummyEtlDetector, DummyHardwareTriggerableAreaDetector, DummyHardwareTriggerableDetector, DummyHardwareTriggerableDetectorBase, DummyHardwareTriggerableSimpleDetector, DummyHardwareTriggeredDetector, DummyHardwareTriggeredNexusXmap, DummyHardwareTriggerProvider, DummyImageCreator, DummyKeithley2600AverageMode, DummyKeithley2600Series, DummyKeithley2600SweepMode, DummyKeithley6487, DummyLakeshoreScannable, DummyMandelbrotMappingDetector, DummyMonitor, DummyMultiFieldUnitsScannable, DummyNamedEnumPositioner, DummyNexusDetector, DummyNXDetector, DummyPersistentEnumScannable, DummyPersistentNamedEnumPositioner, DummyPersistentScannable, DummyPersistentUnitsScannable, DummyPilatus, DummyQbpm, DummyRealPositionReader, DummySampleWheel, DummyScalarChannelDetector, DummyScannable, DummyScannableFieldScannableMotion, DummyScannableMotor, DummySpinner, DummyStanfordScannable, DummyTemp, DummyTemperature, DummyTopupScannable, DummyUnitsScannable, DummyValve, DummyXmapBufferedDetector, DummyXmapEDXDMappingController, DummyXspress3Detector, DummyXspress3MiniDetector, EdeDetectorBase, EdeDummyDetector, EdeFrelon, EditableEnumPositionerBase, EDXD, EDXDController, EDXDControllerQMap, EDXDElement, EDXDMappingController, EDXDMappingElement, EH2ShutterControl, EigerThresholdScannable, EndStationBase, EndstationPhotonEnergyProvider, EnergyScannable, EnergyScannable, EnumPositionerBase, EpicsAirBearingControl, EpicsBeamMonitor, EpicsBekhoffAdc, EpicsBpmController, EpicsControlPoint, EpicsControlPointWithStatus, EpicsCurrAmpGain, EpicsCurrAmpQuadController, EpicsCurrAmpSingle, EpicsDetector, EpicsDouble, EpicsEditablePositionerCallback, EpicsEnumPositioner, EpicsEurotherm903, EpicsFemtoAmplifier, EpicsFemtoWithBekhoffAdc, EpicsLakeshore336, EpicsLimitBasedPositioner, EpicsLocum4Controller, EpicsMCA, EpicsMCA2, EpicsMCACounterTimer, EpicsMCASimple, EpicsMonitor, EpicsMultiChannelScaler, EpicsPilatus, EpicsPneumaticCallback, EpicsPositioner, EpicsPositionerCallback, EpicsQbpm, EpicsRecord, EpicsScaler, EpicsScalerSimple, EpicsScanData, EpicsScannable, EpicsSimpleArray, EpicsSimpleBinary, EpicsSimpleMbbinary, EpicsSimplePneumatic, EpicsSimplePositioner, EpicsStanfordAmplifer, EpicsTypedMonitor, EpicsValve, EpicsValveCallback, EtherCATSignal, ETLDetector, Eurotherm, Eurotherm2K, ExafsScannable, ExperimentShutterController, ExternalSourceWrapper, FastAttenuatorFilters, FastAttenuatorScannable, FrameIndexer, GainModeScannable, GainWithScalingAndOffset, GantryPositioner, GapControlCheckingEnergyController, GasInjectionScannable, GasInjectionScannable, GasInjectionScannablePumpOn, GdaLakeshore340, GeFanuc110BLADC, GonioBase, HardwareTriggerableADDetector, HardwareTriggerableDetectorBase, HardwareTriggeredNexusXmapImpl, HardwareTriggeredNXDetector, HardwareTriggeredNXDetectorWithReadoutTime, HardwareTriggeredNXDetectorWithReadoutTimeAndVariableCollectionTime, HardwareTriggeredXspress3Detector, HidenRGAScannable, HklScannable, I05Apple, I11Robot, I18SampleFocusScannable, I19BeamlineHealthScannable, I21Detector, I23FluoScanEnergyControllerWrapper, IdealBaseX, IntegerMapperBasedEnumPositioner, IonChamberBeamMonitor, IPPserver, JEPScannable, JohannSpectrometer, JythonEnumPositionerWrapper, JythonScannableWrapper, Keithley2600Series, Keithley2600SeriesAverageMode, Keithley2600SeriesSweepMode, Keithley6487, Keyence, KeyenceLightScannable, Lakeshore340Scannable, Lakeshore340With4Outputs, LakeshoreScannable, LakeshoreScannable, Lauda, LineRepeatingBeamMonitor, LinkamCI, LinkamT95, Ln2Scannable, MapperBasedEnumPositionerBase, Marlow, MaskScannable, MbsAnalyser, ME2Positioner, MecaRobotMover, MecaSampleHolderControl, MerlinDetector, MetashopDataScannable, MiniKappaGoniometerScannableGroup, MirrorCoating, MirrorCommissioningDetector, MirrorInOut, MjpegDetector, MonitorBase, MonitorZebraAndMoveScannable, MonoCoolScannable, MonoMoveWithOffsetScannable, MotomanRobotScannableGroup, MoveableImageDetector, MultiPVScannable, MythenDetector, MythenDetectorImpl, MythenNexusImpl, NameMappedEpicsPneumaticCallback, NcdDetectorSystem, NexusDetectorProcessor, NexusXmap, NXDetector, NXDetectorSnappingDecorator, ODCCDController, OdinDetector, OfflineCoboldTDC, OxfordCryostream700, P2RZebraConstantVelMoveController, PandaDetector, ParametrisedHklScannable, PassthroughDetectorWrapper, PassthroughScannableDecorator, PassthroughScannableMotionUnitsDecorator, PCO4000, PCODetector, PersistentAperturePositioner, PersistentEpicsAperturePositioner, PIE725ConstantVelocityRasterScannable, PIE725ConstantVelocityRasterScannable3Axis, PixiumNXDetector, PlateLoaderAdapter, PolarisationScannable, PositionerDeterminedScannable, PositionStreamingTfgScaler, PowerSupplyScannable, PressureCell, ProcessingScannable, PulseTube, PulseTubeMeta, PVConditionMonitorBase, PVScannable, PVStringScannable, QexafsFFoverIO, QexafsGMSDOverI0, QexafsScannable, QexafsTestingScannable, QueuedScriptDrivenScannableMotionUnits, ReadbackDemandDifference, RemainingScanTimeEstimator, RestrictedScannableManager.RestrictedScannable, RingCurrentMonitor, RoiExtractor, RotatedXyScannable, RotationAxisXScannable, SamplePlateEnumPositioner, SamplePlateMoverBase, SampleStage, SampleWheel, SampleXYZAxis, ScaledScannable, ScanDataListenerScannable, ScanEventHandlerScannable, ScannableAttenuatorWedge, ScannableBase, ScannableGaussian, ScannableGaussian, ScannableGroup, ScannableGroupNamed, ScannableGroupSinglePosition, ScannableMotionBase, ScannableMotionUnitsBase, ScannableMotionUnitsObservableWrapper, ScannableMotionWithScannableFieldsBase, ScannableMotionWithScannableFieldsBase.ScannableField, ScannableMotor, ScannableRotatingGonio, ScannableSine, ScanResetDummyUnitScannable, ScriptAdapter, ScriptDrivenScannableMotionUnits, SequentialScannable, SesoXbpmDetector, ShutterChecker, ShutterControlledMythenDetectorImpl, ShutterOpenClose, SimpleDummyNexusDetector, SimpleEpicsTemperatureController, SimplePVScannable, SimpleScannable, SimpleScannable, SimpleUDPServerScannable, SingleFileProcessingRequest, SmarGonScannableMotor, SmarGonXyzScannableGroup, SpecsPhoibosAnalyser, SpecsPhoibosAnalyserSeparateIterations, SpecsPhoibosSolsticeAnalyser, SpELExpressionScannable, Spin, Spinner, StanfordScannable, StepScanEdeDetector, StringMapperBasedEnumPositioner, StringPVConditionMonitor, StringValueScannable, SummingMythenDetector, TemperatureBase, TestingEurotherm, TestScannable, TfgChannelEnum, TFGCounterTimer, TfgEncoderCounter, TfgEpicsMCACounterTimer, TfgFFoverI0, TfgScaler, TfgScalerWithDarkCurrent, TfgScalerWithFrames, TfgScalerWithLogValues, TFGScalerWithRatio, TFGStruck, TFGTriggeredScaler, TfgXmap, TfgXMapFFoverI0, TfgXspress2, TfgXspress2NoCorrection, TfgXspress2Raw, Threshold0Scannable, Threshold1Scannable, ThresholdAScannable, ThresholdBScannable, TimeDelayScannable, TimeResolvedTFGDetector, TimeScannable, TimeTravelScannable, TogglerScannable, TopupChecker, TpRefAScannable, TpRefBScannable, TpRefScannable, TpScannableGroup, TrajectoryScannableMotor, TurboXasScannable, TweakableScannableMotor, TwoDScanPlotter, TwoJawSlitGap, TwoJawSlitPosition, UpdateLimitedScannable, VGScientaAnalyser, VGScientaAnalyserCamOnly, VGScientaAnalyserNXDetector, VGScientaAnalyserTotalOnly, VmxmJacksPiezoScannable, VortexDetector, VortexQexafsFFIO, WheelAttenuators, XasProgressUpdater, XasScannable, XasScannableDetectorWithHarmonics, XasScannableWithDetectorFramesSetup, XESEnergyScannable, XesIf, XesSpectrometerCrystal, XesSpectrometerScannable, XesSpectrometerScannableBase, XhDetector, Xmap, XmapBufferedDetector, XmapDetectorFromEpicsMca, XmapwithSlaveMode, XpsConstantVelocityMoveController, Xspress2BufferedDetector, Xspress2Detector, Xspress3BufferedDetector, Xspress3Detector, Xspress3FFoverI0BufferedDetector, Xspress3FFoverI0Detector, Xspress3MiniDetector, Xspress3MiniSingleChannelDetector, Xspress3QexafsDetector, Xspress4BufferedDetector, Xspress4Detector, Xspress4OdinDetector, XspressFillMonitor, XspressHdfWriter, XspressSystem, ZebraConstantVelocityMoveController, ZebraConstantVelocityMoveControllerForQexafs, ZebraExternallyTriggeredDetector, ZebraMonitorController, ZebraQexafsScannable, ZebraScannableMonitor, ZebraScannableMotor, ZebraScannableMotorForQexafs, ZebraShutterPositioner

public interface Scannable extends Device
An interface operated primarily by scans and the "pos" command..

The interface has a series of standard methods which need to be fulfilled by any object operating within a scan.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    When a Scannable is used in a GDA9 scan, the value of the scan metadata attribute (as returned by getScanMetadataAttribute(String) with this name is used to determine the parent nexus object to add the NeXus object for this scannable to.
    static final String
    When a Scannable is used in a GDA9 scan, the value of the scan metadata attribute (as returned by getScanMetadataAttribute(String) with this name is used to determine the NeXus base class to use for the NeXus object for this scannable.
    static final Object
     
    static final String
    If toFormattedString() cannot get the current value/position of a scannable, it should return this string.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Trigger a move/operation and return immediately.
    void
    Hook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred.
    void
     
    void
    Called by both the pos and scan commands at the start of each subsequent level move only on Scannables that will be moved as part that level's movement.
    void
    Called by both the pos and scan commands at the start of each subsequent level move on all Scannables that are part that level's movement.
    void
    Called on every Scannable at the end of every data point, for scans which are broken down into individual points (i.e.
    void
    Called on every Scannable at every data point, for scans which are broken down into individual points (i.e.
    void
    Called for every Scannable at the end of a group of nested scans (or a single scan if that is the case).
    void
    Called for every Scannable at the end of every scan
    void
    Called for every Scannable at the start of every scan
    void
    Called for every Scannable at the start of a group of nested scans (or a single scan if that is the case)
    Tests if the given object is meaningful to this Scannable and so could be used by one of the move commands.
    Additional names for extra values that returned by getPosition().
    gets a array of InputNames used by moveTo of this scannable.
    int
    get the operation level of this scannable.
    Returns an array of strings which are the format strings to use when pretty printing parts of the output
    Returns the current position of the Scannable.
    default Object
    Returns the value of the scan attribute, or null if no such attribute exists (or if the value of the attribute is null) The type of the value returned can be: a dataset; a primitive type supported by datasets; an array whose component type that is supported by datasets; a list whose element type is supported by datasets.
    default Set<String>
    Returns the name of the scan attributes.
    default Map<String,Object>
     
    boolean
    isAt(Object positionToTest)
    Tests if the scannable is at (or if appropriate, close to) the value positionToTest.
    boolean
    Check if the Scannable is moving/operating.
    void
    moveTo(Object position)
    Trigger a move/operation and block until completion.
    void
    Sets the array of names returned by getExtraNames of this scannable.
    void
    sets the array of names returned by getInputNames method of this scannable.
    void
    setLevel(int level)
    Used for ordering the operations of Scannables during scans
    void
    Sets the array of strings describing how best to format the positions from this scannable
    default void
    setScanMetadataAttribute(String attributeName, Object value)
    Sets the scan attribute with the given name to the given value.
    default void
     
    void
    Stop the current move/operation.
    Returns a string representation of the Scannable and its current position/value/status
    void
    Returns when operation carried out by moveTo has completed

    Methods inherited from interface gda.factory.Configurable

    configure, isConfigureAtStartup, isConfigured, reconfigure

    Methods inherited from interface gda.device.Device

    close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevel

    Methods inherited from interface gda.factory.Findable

    getName, setName

    Methods inherited from interface gda.observable.IObservable

    addIObserver, deleteIObserver, deleteIObservers
  • Field Details

    • DEFAULT_INPUT_NAME

      static final Object DEFAULT_INPUT_NAME
    • ATTR_NX_CLASS

      static final String ATTR_NX_CLASS
      When a Scannable is used in a GDA9 scan, the value of the scan metadata attribute (as returned by getScanMetadataAttribute(String) with this name is used to determine the NeXus base class to use for the NeXus object for this scannable.
      See Also:
    • ATTR_NEXUS_CATEGORY

      static final String ATTR_NEXUS_CATEGORY
      When a Scannable is used in a GDA9 scan, the value of the scan metadata attribute (as returned by getScanMetadataAttribute(String) with this name is used to determine the parent nexus object to add the NeXus object for this scannable to. For example, if the value of this property is 'NXsample' then the nexus object for this is added to the NeXusSample.
      See Also:
    • VALUE_UNAVAILABLE

      static final String VALUE_UNAVAILABLE
      If toFormattedString() cannot get the current value/position of a scannable, it should return this string.
      See Also:
  • Method Details

    • getPosition

      Object getPosition() throws DeviceException
      Returns the current position of the Scannable. Called by ConcurentScan at the end of the point.
      Returns:
      Current position with an element for each input and extra field. null if their are no fields.
      Throws:
      DeviceException
    • moveTo

      void moveTo(Object position) throws DeviceException
      Trigger a move/operation and block until completion.
      Parameters:
      position -
      Throws:
      DeviceException
    • asynchronousMoveTo

      void asynchronousMoveTo(Object position) throws DeviceException
      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.
      Parameters:
      position - Position to move to should have an element for each input field.
      Throws:
      DeviceException
    • checkPositionValid

      String checkPositionValid(Object position) throws DeviceException
      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.
      Parameters:
      position -
      Returns:
      null if position is valid, or returns a description if not.
      Throws:
      DeviceException
    • stop

      void stop() throws DeviceException
      Stop the current move/operation.
      Throws:
      DeviceException
    • isBusy

      boolean isBusy() throws DeviceException
      Check if the Scannable is moving/operating.
      Returns:
      true - if operation carried out by moveTo has not completed yet
      Throws:
      DeviceException
    • waitWhileBusy

      void waitWhileBusy() throws DeviceException, InterruptedException
      Returns when operation carried out by moveTo has completed
      Throws:
      DeviceException
      InterruptedException
    • isAt

      boolean isAt(Object positionToTest) throws DeviceException
      Tests if the scannable is at (or if appropriate, close to) the value positionToTest.
      Parameters:
      positionToTest - The position to compare the scannable's position to.
      Returns:
      true if scannable is at positionToTest
      Throws:
      DeviceException
    • setLevel

      void setLevel(int level)
      Used for ordering the operations of Scannables during scans
      Parameters:
      level -
    • getLevel

      int getLevel()
      get the operation level of this scannable.
      Returns:
      int - the level
    • getInputNames

      String[] getInputNames()
      gets a array of InputNames used by moveTo of this scannable.
      Returns:
      array of the names of the elements of the object returned by getPosition
    • setInputNames

      void setInputNames(String[] names)
      sets the array of names returned by getInputNames method of this scannable.
      Parameters:
      names -
    • getExtraNames

      String[] getExtraNames()
      Additional names for extra values that returned by getPosition().
      Returns:
      array of names of the extra elements if the array returned by getPosition is larger than the array required by moveTo
    • setExtraNames

      void setExtraNames(String[] names)
      Sets the array of names returned by getExtraNames of this scannable.
      Parameters:
      names -
    • setOutputFormat

      void setOutputFormat(String[] names)
      Sets the array of strings describing how best to format the positions from this scannable
      Parameters:
      names -
    • getOutputFormat

      String[] getOutputFormat()
      Returns an array of strings which are the format strings to use when pretty printing parts of the output
      Returns:
      string array
    • atScanStart

      void atScanStart() throws DeviceException
      Called for every Scannable at the start of a group of nested scans (or a single scan if that is the case)
      Throws:
      DeviceException
    • atScanEnd

      void atScanEnd() throws DeviceException
      Called for every Scannable at the end of a group of nested scans (or a single scan if that is the case).

      Note that this is only called if the Scan finishes normally, or has been requested to finish early. This will not be called if the scan finishes due to an exception of any kind. See atCommandFailure()

      Throws:
      DeviceException
    • atScanLineStart

      void atScanLineStart() throws DeviceException
      Called for every Scannable at the start of every scan
      Throws:
      DeviceException
    • atScanLineEnd

      void atScanLineEnd() throws DeviceException
      Called for every Scannable at the end of every scan
      Throws:
      DeviceException
    • atPointStart

      void atPointStart() throws DeviceException
      Called on every Scannable at every data point, for scans which are broken down into individual points (i.e. non-continuous scans)
      Throws:
      DeviceException
    • atPointEnd

      void atPointEnd() throws DeviceException
      Called on every Scannable at the end of every data point, for scans which are broken down into individual points (i.e. non-continous scans)
      Throws:
      DeviceException
    • atLevelMoveStart

      void atLevelMoveStart() throws DeviceException
      Called by both the pos and scan commands at the start of each subsequent level move only on Scannables that will be moved as part that level's movement.

      For example "pos a 1 b 2 c 3", will, if a and b have the same level and c a higher level will result in:

       a.atLevelMoveStart()   invalid input: '<'----
       b.atLevelMoveStart()   invalid input: '<'----
       a.asynchronousMoveTo()
       b.asynchronousMoveTo()
       a.waitWhileBusy()
       b.waitWhileBusy()
       c.atLevelMoveStart()   invalid input: '<'----
       c.asynchronousMoveTo()
       c.waitWhileBusy()
       
      This hook is used by CoordinatedMotionScannables.
      Throws:
      DeviceException
    • atLevelStart

      void atLevelStart() throws DeviceException
      Called by both the pos and scan commands at the start of each subsequent level move on all Scannables that are part that level's movement.

      This provides a useful mechanism for e.g. creating a Scannable that opens a shutter after motors have moved but before a detector is exposed.

      Throws:
      DeviceException
    • atLevelEnd

      void atLevelEnd() throws DeviceException
      Throws:
      DeviceException
    • atCommandFailure

      void atCommandFailure() throws DeviceException
      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 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.

      Throws:
      DeviceException
    • toFormattedString

      String toFormattedString()
      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 VALUE_UNAVAILABLE in its place.

      Returns:
      string as defined above
    • setScanMetadataAttribute

      default void setScanMetadataAttribute(String attributeName, Object value) throws DeviceException
      Sets the scan attribute with the given name to the given value. A scan attribute is an attribute that should be written into the scan output (e.g. a NeXus file). The type of the value can be:
      • a dataset;
      • a primitive type supported by datasets;
      • an array whose component type that is supported by datasets;
      • a list whose element type is supported by datasets.

      There are two special attributes, 'NXclass' and 'nexusCategory'. If set these attributes are not written into the nexus file as fields. Instead the control how the nexus object is created and added to the nexus tree. Specifically:

      • 'NXclass' specifies what Nexus base class the nexus object has;
      • 'nexusCategory' specifies the class of the parent group the nexus object is added to, e.g. if this attribute has the value 'NXsample' then the nexus object will be added to the NXsample group.
      Note: this is a temporary mechanism to allow GDA8 devices to work with the new scanning framework. It should be removed once GDA9 scans use templates to write Nexus files.
      Parameters:
      attributeName - attribute name
      value - value of attribute
      Throws:
      DeviceException - if the attribute could not be set for any reason
    • setScanMetadataAttributes

      default void setScanMetadataAttributes(Map<String,Object> attributes) throws DeviceException
      Throws:
      DeviceException
    • getScanMetadataAttributes

      default Map<String,Object> getScanMetadataAttributes() throws DeviceException
      Throws:
      DeviceException
    • getScanMetadataAttribute

      default Object getScanMetadataAttribute(String attributeName) throws DeviceException
      Returns the value of the scan attribute, or null if no such attribute exists (or if the value of the attribute is null) The type of the value returned can be:
      • a dataset;
      • a primitive type supported by datasets;
      • an array whose component type that is supported by datasets;
      • a list whose element type is supported by datasets.

      Note: this is a temporary mechanism to allow GDA8 devices to work with the new scanning framework. It should be removed once GDA9 scans use templates to write Nexus files.

      Parameters:
      attributeName - the name of the attribute
      Throws:
      DeviceException - if the value of the attribute could not be retrieved for any reason
    • getScanMetadataAttributeNames

      default Set<String> getScanMetadataAttributeNames() throws DeviceException
      Returns the name of the scan attributes. These are the attributes that should be written into the scan output (e.g. a NeXus file).

      Note: this is a temporary mechanism to allow GDA8 devices to work with the new scanning framework. It should be removed once GDA9 scans use templates to write Nexus files.

      Returns:
      names of scan attributes
      Throws:
      DeviceException - if the names of the scan attributes could not be retrieved for any reason