Package clickDetector.alarm
Class ClickAlarmCounter
java.lang.Object
alarm.AlarmCounter
alarm.AlarmDecibelCounter
clickDetector.alarm.ClickAlarmCounter
- All Implemented Interfaces:
 PamSettings,SettingsNameProvider
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiondoubleaddCount(double currentValue, double countToAdd, int countType) Add a count to the total.longdoublegetValue(int countType, PamDataUnit dataUnit) Get a count value from a source of alarm trigger databooleanvoidbooleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) booleanshowOptions(Window parent) Show module specific optionsdoublesubtractCount(double currentValue, double countToSubtract, int countType) Subtract a count from the total.Methods inherited from class alarm.AlarmCounter
getAlarmControl, getExtraFieldData, getExtraFieldNames 
- 
Constructor Details
- 
ClickAlarmCounter
 
 - 
 - 
Method Details
- 
getValue
Description copied from class:AlarmCounterGet a count value from a source of alarm trigger dataTwo 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 !)
- Specified by:
 getValuein classAlarmCounter- Parameters:
 countType- type of countingdataUnit- dataunit to consider- Returns:
 - value to add to trigger count.
 
 - 
hasOptions
public boolean hasOptions()- Overrides:
 hasOptionsin classAlarmCounter- Returns:
 - true if the counter has module specific options.
 
 - 
showOptions
Description copied from class:AlarmCounterShow module specific options- Overrides:
 showOptionsin classAlarmCounter- Parameters:
 parent- parent frame for dialog- Returns:
 - true if options were changed (false if cancel button pressed on dialog)
 
 - 
getSettingsReference
- Specified by:
 getSettingsReferencein interfacePamSettings- Returns:
 - The serialisable object that will be stored
 
 - 
getSettingsVersion
public long getSettingsVersion()- Specified by:
 getSettingsVersionin interfacePamSettings- Returns:
 - An integer version number for the settings
 
 - 
getUnitName
- Specified by:
 getUnitNamein interfaceSettingsNameProvider- Returns:
 - A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
 
 - 
getUnitType
- Specified by:
 getUnitTypein interfacePamSettings- Returns:
 - A Name specific to the type, e.g. Click detector
 
 - 
restoreSettings
- Specified by:
 restoreSettingsin interfacePamSettings- Parameters:
 pamControlledUnitSettings-- Returns:
 - true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
 
 - 
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 classAlarmDecibelCounter- 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 classAlarmDecibelCounter- Parameters:
 currentValue- current valuecountToSubtract- amount to subtract offcountType- type of counting- Returns:
 - the two subtracted from one another in whichever way is most appropriate.
 
 - 
resetCounter
public void resetCounter()- Specified by:
 resetCounterin classAlarmCounter
 
 -