Package PamController.status
Class BaseProcessCheck
java.lang.Object
PamController.status.BaseProcessCheck
- All Implemented Interfaces:
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
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionBaseProcessCheck
(PamProcess pamProcess, Class inputClass, double d, double e) Class to check a PAMProcess is doing it's stuff -
Method Summary
Modifier and TypeMethodDescriptionGet a status when the system is idle.Get the process status.boolean
void
newInput
(PamObservable obs, PamDataUnit data) Called from a process every time new input data arrivevoid
newOutput
(PamObservable obs, PamDataUnit data) Called from a process every time new data are added to the output data blockvoid
reset()
void
setInputAveraging
(double averaging) Set and averaging for the input counter.void
setNeverIdle
(boolean neverIdle) void
setOutputAveraging
(double averaging) Set and averaging for the output counter.
-
Constructor Details
-
BaseProcessCheck
Class to check a PAMProcess is doing it's stuff- Parameters:
pamProcess
- process referenceinputClass
- input class (can be null if there is no input)d
- minimum rate of input datae
- minimum rate of output data
-
-
Method Details
-
newInput
Description copied from interface:ProcessCheck
Called from a process every time new input data arrive- Specified by:
newInput
in interfaceProcessCheck
- Parameters:
obs
- PamObservable (always a PAMDataBlock)data
- Data unit
-
newOutput
Description copied from interface:ProcessCheck
Called from a process every time new data are added to the output data block- Specified by:
newOutput
in interfaceProcessCheck
- Parameters:
obs
- PamObservable (always a PAMDataBlock)data
- Data unit
-
setInputAveraging
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
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
public void reset() -
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 interfaceProcessCheck
- Returns:
- the status of this process
-
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
- Returns:
- a status for if the idle stats was null
-
isNeverIdle
public boolean isNeverIdle() -
setNeverIdle
public void setNeverIdle(boolean neverIdle) -
getInputCounter
-
getOutputCounter
-