Package alarm

Class AlarmDecibelCounter

java.lang.Object
alarm.AlarmCounter
alarm.AlarmDecibelCounter
Direct Known Subclasses:
ClickAlarmCounter, DbHtAlarmCounter, NoiseAlarmCounter, OneBandAlarmCounter, WMAlarmCounter

public abstract class AlarmDecibelCounter extends AlarmCounter
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 Details

    • AlarmDecibelCounter

      public AlarmDecibelCounter(AlarmControl alarmControl)
  • Method Details

    • addCount

      public double addCount(double currentValue, double countToAdd, int countType)
      Description copied from class: AlarmCounter
      Add 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:
      addCount in class AlarmCounter
      Parameters:
      currentValue - current value
      countToAdd - amount to add
      countType - 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: AlarmCounter
      Subtract 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:
      subtractCount in class AlarmCounter
      Parameters:
      currentValue - current value
      countToSubtract - amount to subtract off
      countType - type of counting
      Returns:
      the two subtracted from one another in whichever way is most appropriate.