Package eventCounter
Class DataCounter
java.lang.Object
PamguardMVC.PamObserverAdapter
eventCounter.DataCounter
- All Implemented Interfaces:
PamObserver
Class for counting events - e.g. clicks, whistles, etc.
Does not hold references to original dataunits but just holds a time reference for each event so that not too much memory is used. The click counter was causing problems since it would hold far too many clicks in memory.
Does not hold references to original dataunits but just holds a time reference for each event so that not too much memory is used. The click counter was causing problems since it would hold far too many clicks in memory.
- Author:
- Doug Gillespie
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addData
(PamObservable o, PamDataUnit arg) Informs the PamObserver that new data have been added to the Observable classint
int
getName()
void
masterClockUpdate
(long milliSeconds, long sampleNumber) void
setChannelMap
(int channelMap) void
setDataCountSeconds
(int countSeconds) void
setEventCounterMonitor
(EventCounterMonitor eventCounterMonitor) void
setEventTrigger
(int eventTriggerSeconds, int eventTriggerCount) void
void
setShortName
(String shortName) void
setSourceData
(PamDataBlock sourceData) Methods inherited from class PamguardMVC.PamObserverAdapter
getObserverObject, getRequiredDataHistory, noteNewSettings, receiveSourceNotification, removeObservable, setSampleRate, updateData
-
Constructor Details
-
DataCounter
-
-
Method Details
-
getDataCountSeconds
public int getDataCountSeconds() -
setDataCountSeconds
public void setDataCountSeconds(int countSeconds) -
getObserverName
-
masterClockUpdate
public void masterClockUpdate(long milliSeconds, long sampleNumber) - Specified by:
masterClockUpdate
in interfacePamObserver
- Overrides:
masterClockUpdate
in classPamObserverAdapter
-
addData
Description copied from interface:PamObserver
Informs the PamObserver that new data have been added to the Observable class- Specified by:
addData
in interfacePamObserver
- Overrides:
addData
in classPamObserverAdapter
-
getName
-
setName
-
getShortName
-
setShortName
-
getSourceData
-
setSourceData
-
setEventTrigger
public void setEventTrigger(int eventTriggerSeconds, int eventTriggerCount) -
getChannelMap
public int getChannelMap() -
setChannelMap
public void setChannelMap(int channelMap) -
getSidePanel
-
setEventCounterMonitor
- Parameters:
eventCounterMonitor
- the eventCounterMonitor to set
-
getEventCounterMonitor
- Returns:
- the eventCounterMonitor
-