Package qa

Class QAControl

All Implemented Interfaces:
PamSettings, SettingsNameProvider, QANotifyable

public class QAControl extends PamControlledUnit implements PamSettings, QANotifyable
  • Field Details

  • Constructor Details

    • QAControl

      public QAControl(String unitName)
  • Method Details

    • getPositionReference

      public PositionReference getPositionReference()
      Returns:
      the positionReference
    • notifyModelChanged

      public void notifyModelChanged(int changeType)
      Description copied from class: PamControlledUnit
      General notification when the PAMGAURD model changes.
      Overrides:
      notifyModelChanged in class PamControlledUnit
      Parameters:
      changeType - type of change
    • getSettingsReference

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • restoreSettings

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      Returns:
      true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
    • getQaParameters

      public QAParameters getQaParameters()
      Returns:
      the qaParameters
    • getQaGeneratorProcess

      public QAGeneratorProcess getQaGeneratorProcess()
      Returns:
      the qaGeneratorProcess
    • getQaMonitorProcess

      public QAMonitorProcess getQaMonitorProcess()
      Returns:
      the qaMonitorProcess
    • checkDatabase

      public void checkDatabase(ArrayList<PamDataBlock> allDetectors)
      Called during setup to make sure that the database tables are all in place.
      Parameters:
      allDetectors -
    • pamToStart

      public void pamToStart()
      Description copied from class: PamControlledUnit
      called just before data acquisition starts. Note that PamObservers get a call to setSampleRate anyway so this mainly needs to be used for display elements that may need their scales adjusted before startup.
      Overrides:
      pamToStart in class PamControlledUnit
    • pamHasStopped

      public void pamHasStopped()
      Description copied from class: PamControlledUnit
      Called for all controlled units after Pam acquisition has stopped
      Overrides:
      pamHasStopped in class PamControlledUnit
    • isRunning

      public boolean isRunning()
      Quick access to an is running function
      Returns:
      true if PAMGuard is running
    • getQaAnalyser

      public QAAnalyser getQaAnalyser()
      Returns:
      the qaAnalyser
    • getAvailableClusters

      public ArrayList<QACluster> getAvailableClusters()
      Returns:
      the availableClusters
    • startQuickTests

      public void startQuickTests()
      Start a set of quick tests for all selected sequences.
    • getRangeLimits

      public double[] getRangeLimits(double nominalRange)
      Get min and max testing ranges as factors below and above nominal range
      Parameters:
      nominalRange - nominal range for a cluster
      Returns:
      min and max ranges as 2 element array.
    • checkCurrentQuickTests

      public void checkCurrentQuickTests()
      Called whenever a test ends. Check the quick tests and see if we want to report.
    • getQaOperationsStatus

      public QAOperationsStatus getQaOperationsStatus()
      Returns:
      the qaOperationsStatus
    • addNotifyable

      public void addNotifyable(QANotifyable notifyable)
      Add something that can receive notifications from QA Control
      Parameters:
      notifyable -
    • removeNotifyable

      public boolean removeNotifyable(QANotifyable notifyable)
      Add something that can receive notifications from QA Control
      Parameters:
      notifyable -
      Returns:
    • tellNotifyables

      public void tellNotifyables(int noteCode, Object noteObject)
      Send out notification messages to all registered components
      Parameters:
      noteCode - notification code, will include all standard PAMController ones, use -ve numbers for module specific ones.
      noteObject - Object to go with the code.
    • qaNotify

      public void qaNotify(int noteCode, Object noteObject)
      Description copied from interface: QANotifyable
      Something changed inQA module ...
      Specified by:
      qaNotify in interface QANotifyable
    • tellNotifyables

      public void tellNotifyables(int noteCode)
      Send out notification messages to all registered components with a null object
      Parameters:
      noteCode - notification code, will include all standard PAMController ones, use -ve numbers for module specific ones.
    • findCluster

      public QACluster findCluster(String clusterName)
      find a cluster from it's name.
      Parameters:
      clusterName -
      Returns:
      found cluster or null.
    • getSidePanel

      public PamSidePanel getSidePanel()
      Description copied from class: PamControlledUnit
      Gets a reference to a small panel to be displayed along the left hand edge of the main tab panel. Side panels should be small since they are always visible and any space they take will be taken from the main tab panel.

      It is possible for a PamControlled unit to have a side panel without having a pamTabPanel.

      Overrides:
      getSidePanel in class PamControlledUnit
      Returns:
      a pamSidePanel object.
      See Also:
    • getClusterPrimaryDetector

      public PamDataBlock getClusterPrimaryDetector(QACluster qaCluster)
      Get the primary detection data block for a cluster. Will try to use a user defined one, otherwise try to find a default.
      Parameters:
      qaCluster - cluster
      Returns:
      suitable primary datablock, or null.
    • setNewRangeFactor

      public void setNewRangeFactor(double newRangeFactor)
      Called when the range factor has been changed in the main control panel. Need to put in params and also tell all random tests to update their range limits.
      Parameters:
      newRangeFactor -