public abstract class AlarmCounter
extends java.lang.Object
Constructor and Description |
---|
AlarmCounter(AlarmControl alarmControl) |
Modifier and Type | Method and Description |
---|---|
double |
addCount(double currentValue,
double countToAdd,
int countType)
Add a count to the total.
|
AlarmControl |
getAlarmControl() |
java.lang.String[] |
getExtraFieldData()
Get extra data to go into the new fields.
|
java.lang.String[] |
getExtraFieldNames()
Get the number of extra data fields to add to alarm data output
|
abstract double |
getValue(int countType,
PamDataUnit dataUnit)
Get a count value from a source of alarm trigger data
|
boolean |
hasOptions() |
abstract void |
resetCounter() |
boolean |
showOptions(java.awt.Window parent)
Show module specific options
|
double |
subtractCount(double currentValue,
double countToSubtract,
int countType)
Subtract a count from the total.
|
public AlarmCounter(AlarmControl alarmControl)
public abstract double getValue(int countType, PamDataUnit dataUnit)
Two types of counting are available. COUNT_SIMPLE in which case each data unit scores either 0 or 1 and COUNT_SCORES in which case each unit is assigned a value (could still be 0 or 1 !)
countType
- type of countingdataUnit
- dataunit to considerpublic boolean hasOptions()
public boolean showOptions(java.awt.Window parent)
parent
- parent frame for dialogpublic double addCount(double currentValue, double countToAdd, int countType)
currentValue
- current valuecountToAdd
- amount to addcountType
- type of countingpublic double subtractCount(double currentValue, double countToSubtract, int countType)
currentValue
- current valuecountToSubtract
- amount to subtract offcountType
- type of countingpublic abstract void resetCounter()
public java.lang.String[] getExtraFieldNames()
public java.lang.String[] getExtraFieldData()
public AlarmControl getAlarmControl()