Class BaseProcessCheck

java.lang.Object
PamController.status.BaseProcessCheck
All Implemented Interfaces:
ProcessCheck

public class BaseProcessCheck extends Object implements ProcessCheck
Basic checks of one or more processes in a module. The module will have to add one of these process checks explicitly for every process it wan'ts to check, checks can include the input being connected, the output being connected, data arriving at the input and data arriving at the output
Author:
Doug
  • Constructor Details Link icon

    • BaseProcessCheck Link icon

      public BaseProcessCheck(PamProcess pamProcess, Class inputClass, double d, double e)
      Class to check a PAMProcess is doing it's stuff
      Parameters:
      pamProcess - process reference
      inputClass - input class (can be null if there is no input)
      d - minimum rate of input data
      e - minimum rate of output data
  • Method Details Link icon

    • newInput Link icon

      public void newInput(PamObservable obs, PamDataUnit data)
      Description copied from interface: ProcessCheck
      Called from a process every time new input data arrive
      Specified by:
      newInput in interface ProcessCheck
      Parameters:
      obs - PamObservable (always a PAMDataBlock)
      data - Data unit
    • newOutput Link icon

      public void newOutput(PamObservable obs, PamDataUnit data)
      Description copied from interface: ProcessCheck
      Called from a process every time new data are added to the output data block
      Specified by:
      newOutput in interface ProcessCheck
      Parameters:
      obs - PamObservable (always a PAMDataBlock)
      data - Data unit
    • setInputAveraging Link icon

      public void setInputAveraging(double averaging)
      Set and averaging for the input counter.
      This must me greater than or equal to 1. A value of 1 means no averaging, bigger values will be the number of measurements counts are averaged over using a simple decaying average calculation
      Parameters:
      averaging -
    • setOutputAveraging Link icon

      public void setOutputAveraging(double averaging)
      Set and averaging for the output counter.
      This must me greater than or equal to 1. A value of 1 means no averaging, bigger values will be the number of measurements counts are averaged over using a simple decaying average calculation
      Parameters:
      averaging -
    • reset Link icon

      public void reset()
    • getStatus Link icon

      public ModuleStatus getStatus()
      Description copied from interface: ProcessCheck
      Get the process status. Note that calling this will probably reset some counters, so don't call this multiple times in quick succession.
      Specified by:
      getStatus in interface ProcessCheck
      Returns:
      the status of this process
    • getIdleStatus Link icon

      public ModuleStatus getIdleStatus()
      Get a status when the system is idle. Generally this is just a warning, but it might get overridden for modules that are meant to operate even when PAM is idle.
      Returns:
      A status for when the system is idel.
    • getRunningStatus Link icon

      public ModuleStatus getRunningStatus()
      Returns:
      a status for if the idle stats was null
    • isNeverIdle Link icon

      public boolean isNeverIdle()
    • setNeverIdle Link icon

      public void setNeverIdle(boolean neverIdle)
    • getInputCounter Link icon

      public BaseProcessCheck.IOCounter getInputCounter()
    • getOutputCounter Link icon

      public BaseProcessCheck.IOCounter getOutputCounter()