Class SampleChangerStateMonitor

All Implemented Interfaces:
Device, Configurable, Findable, gda.observable.IObservable

public class SampleChangerStateMonitor extends DeviceBase
Monitors the sample changer and various scannables, using their status to update the value of three 'overall status' scannables.

The three 'overall status' scannables can be observed by the GUI, and their values used to disable/enable controls. They are configured in Spring and passed in (to an instance of this class) using setters:

  • #sampleControlState - indicate the state of script that controls the changing of the sample and the movement of the other related equipment
  • #sampleChangerState - indicates status of the sampleChanger
  • #beamlineBusyState - either Idle or Active used as a global indicator that the beamline is running a script or is busy performing a sequence of actions.

Possible values:

  • ACTIVE - sample changer is in one of ANNEALING, DISPOSING, LOADING, MOVINGROBOT or UNLOADING
  • MOVING_STAGE - sample changer is in SAMPLESTAGEIDLE or MOVINGSAMPLESTAGE
  • DISCONNECTED - sample changer is in NOTCONNECTED
  • CONNECTING - sample changer is in CONNECTING
  • UNINITIALISED - sample changer is in NOTINITIALISED
  • ERROR - sample changer is in ERROR
  • DRYING - sample changer is in DRYING
  • ACTIVE - none of above but the sample_control script is running OR the hutchutils script is running
  • IDLE - none of above but and the sample_control script is NOT running AND the hutchutils script is NOT running
  • Field Details

  • Constructor Details

    • SampleChangerStateMonitor

      public SampleChangerStateMonitor()
  • 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
    • setSampleChanger

      public void setSampleChanger(SampleChanger sampleChanger)
      Parameters:
      sampleChanger - that is monitored for changes in SampleChangerStatus
    • setSampleControlScriptState

      public void setSampleControlScriptState(Scannable sampleControlScriptState)
      Parameters:
      sampleControlScriptState - Scannable with position ACTIVE when running
    • setSampleControlScriptAction

      public void setSampleControlScriptAction(Scannable sampleControlScriptAction)
      Parameters:
      sampleControlScriptAction - Scannable with position indicate current action
    • setHutchutilsScriptState

      public void setHutchutilsScriptState(Scannable hutchutilsScriptState)
      Parameters:
      hutchutilsScriptState - Scannable with position ACTIVE when running
    • setDataCollectionScript

      public void setDataCollectionScript(Scannable dataCollectionScript)
      Parameters:
      dataCollectionScript - Scannable with position equal to current data collection script or ""
    • setSampleControlState

      public void setSampleControlState(Scannable sampleControlState)
      Parameters:
      sampleControlState - Scannable to hold value
    • setSampleChangerState

      public void setSampleChangerState(Scannable sampleChangerState)
      Parameters:
      sampleChangerState - EnumPositioner to hold value
    • setBeamlineBusyState

      public void setBeamlineBusyState(Scannable beamlineBusyState)
      Parameters:
      beamlineBusyState - Scannable with position ACTIVE when running