Package eventCounter

Class DataCounter

All Implemented Interfaces:
PamObserver

public class DataCounter extends PamObserverAdapter
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.
Author:
Doug Gillespie
  • Constructor Details

    • DataCounter

      public DataCounter(String name, PamDataBlock sourceData, int countSeconds)
  • Method Details

    • getDataCountSeconds

      public int getDataCountSeconds()
    • setDataCountSeconds

      public void setDataCountSeconds(int countSeconds)
    • getObserverName

      public String getObserverName()
    • masterClockUpdate

      public void masterClockUpdate(long milliSeconds, long sampleNumber)
      Specified by:
      masterClockUpdate in interface PamObserver
      Overrides:
      masterClockUpdate in class PamObserverAdapter
    • addData

      public void addData(PamObservable o, PamDataUnit arg)
      Description copied from interface: PamObserver
      Informs the PamObserver that new data have been added to the Observable class
      Specified by:
      addData in interface PamObserver
      Overrides:
      addData in class PamObserverAdapter
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getShortName

      public String getShortName()
    • setShortName

      public void setShortName(String shortName)
    • getSourceData

      public PamDataBlock getSourceData()
    • setSourceData

      public void setSourceData(PamDataBlock sourceData)
    • setEventTrigger

      public void setEventTrigger(int eventTriggerSeconds, int eventTriggerCount)
    • getChannelMap

      public int getChannelMap()
    • setChannelMap

      public void setChannelMap(int channelMap)
    • getSidePanel

      public EventCounterSidePanel getSidePanel()
    • setEventCounterMonitor

      public void setEventCounterMonitor(EventCounterMonitor eventCounterMonitor)
      Parameters:
      eventCounterMonitor - the eventCounterMonitor to set
    • getEventCounterMonitor

      public EventCounterMonitor getEventCounterMonitor()
      Returns:
      the eventCounterMonitor