public class ClickAlarmCounter extends AlarmDecibelCounter implements PamSettings
Constructor and Description |
---|
ClickAlarmCounter(AlarmControl alarmControl,
ClickControl clickControl) |
Modifier and Type | Method and Description |
---|---|
double |
addCount(double currentValue,
double countToAdd,
int countType)
Add a count to the total.
|
java.io.Serializable |
getSettingsReference() |
long |
getSettingsVersion() |
java.lang.String |
getUnitName() |
java.lang.String |
getUnitType() |
double |
getValue(int countType,
PamDataUnit dataUnit)
Get a count value from a source of alarm trigger data
|
boolean |
hasOptions() |
void |
resetCounter() |
boolean |
restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) |
boolean |
showOptions(java.awt.Window parent)
Show module specific options
|
double |
subtractCount(double currentValue,
double countToSubtract,
int countType)
Subtract a count from the total.
|
getAlarmControl, getExtraFieldData, getExtraFieldNames
public ClickAlarmCounter(AlarmControl alarmControl, ClickControl clickControl)
public double getValue(int countType, PamDataUnit dataUnit)
AlarmCounter
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 !)
getValue
in class AlarmCounter
countType
- type of countingdataUnit
- dataunit to considerpublic boolean hasOptions()
hasOptions
in class AlarmCounter
public boolean showOptions(java.awt.Window parent)
AlarmCounter
showOptions
in class AlarmCounter
parent
- parent frame for dialogpublic java.io.Serializable getSettingsReference()
getSettingsReference
in interface PamSettings
public long getSettingsVersion()
getSettingsVersion
in interface PamSettings
public java.lang.String getUnitName()
getUnitName
in interface PamSettings
public java.lang.String getUnitType()
getUnitType
in interface PamSettings
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings
in interface PamSettings
public double addCount(double currentValue, double countToAdd, int countType)
AlarmCounter
addCount
in class AlarmDecibelCounter
currentValue
- current valuecountToAdd
- amount to addcountType
- type of countingpublic double subtractCount(double currentValue, double countToSubtract, int countType)
AlarmCounter
subtractCount
in class AlarmDecibelCounter
currentValue
- current valuecountToSubtract
- amount to subtract offcountType
- type of countingpublic void resetCounter()
resetCounter
in class AlarmCounter