Package alarm
Class AlarmDecibelCounter
java.lang.Object
alarm.AlarmCounter
alarm.AlarmDecibelCounter
- Direct Known Subclasses:
ClickAlarmCounter,DbHtAlarmCounter,NoiseAlarmCounter,OneBandAlarmCounter,WMAlarmCounter
BAse class for any alarm data source which is returning
some kind of data measured in dB, which needs
to be added in a different way to normal.
- Author:
- Doug Gillespie
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleaddCount(double currentValue, double countToAdd, int countType) Add a count to the total.doublesubtractCount(double currentValue, double countToSubtract, int countType) Subtract a count from the total.Methods inherited from class alarm.AlarmCounter
getAlarmControl, getExtraFieldData, getExtraFieldNames, getValue, hasOptions, resetCounter, showOptions
-
Constructor Details
-
AlarmDecibelCounter
-
-
Method Details
-
addCount
public double addCount(double currentValue, double countToAdd, int countType) Description copied from class:AlarmCounterAdd a count to the total. This has been put in this abstract class so that individual modules can override how they add things up, e.g. a noise measurement in dB may need to be converted to energy before adding.- Overrides:
addCountin classAlarmCounter- Parameters:
currentValue- current valuecountToAdd- amount to addcountType- type of counting- Returns:
- the two added together in whichever way is most appropriate.
-
subtractCount
public double subtractCount(double currentValue, double countToSubtract, int countType) Description copied from class:AlarmCounterSubtract a count from the total. This has been put in this abstract class so that individual modules can override how they subtract things, e.g. a noise measurement in dB may need to be converted to energy before subtracting.- Overrides:
subtractCountin classAlarmCounter- Parameters:
currentValue- current valuecountToSubtract- amount to subtract offcountType- type of counting- Returns:
- the two subtracted from one another in whichever way is most appropriate.
-