whistleDetector
Class WhistleEventDetector

java.lang.Object
  extended by PamguardMVC.PamProcess
      extended by whistleDetector.WhistleEventDetector
All Implemented Interfaces:
Annotator, PamObserver

public class WhistleEventDetector
extends PamProcess
implements PamObserver


Nested Class Summary
(package private)  class WhistleEventDetector.WhistleRecorderTrigger
           
 
Field Summary
(package private)  long closeChecks
           
(package private)  PamDataBlock<EventDataUnit> eventDataBlock
           
(package private)  WhistleControl whistleControl
           
(package private)  PamDataBlock<ShapeDataUnit> whistleDataBlock
           
(package private)  WhistleDetector whistleDetector
           
(package private)  EventDataUnit whistleEvent
           
(package private)  WhistleEventLogger whistleEventLogger
           
(package private)  WhistleEventDetector.WhistleRecorderTrigger whistleRecorderTrigger
           
 
Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, processName, sampleRate
 
Constructor Summary
WhistleEventDetector(WhistleControl whistleControl, WhistleDetector whistleDetector)
           
 
Method Summary
private  boolean checkCloseEvent(long timeNow)
           
 void clearOldData()
          Clears all data from all output data blocks of this process
private  void closeEvent()
           
 long getRequiredDataHistory(PamObservable o, java.lang.Object arg)
           
 void newData(PamObservable o, PamDataUnit arg)
           
private  void newWhistle(ShapeDataUnit dataUnit)
           
 void pamStart()
          Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway.
 void pamStop()
          Stops the process.
 
Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addOutputDataBlock, changedThreading, createAnnotations, destroyProcess, fillXMLElement, fillXMLParameters, getAncestorDataBlock, getAnnotation, getBackendProcess, getChainPosition, getCpuPercent, getNumAnnotations, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOutputDataBlock, getPamControlledUnit, getParentDataBlock, getParentProcess, getProcessName, getRawSourceDataBlock, getSampleRate, getSourceDataBlock, getSourceProcess, isCanMultiThread, makePamProcess, masterClockUpdate, noteNewSettings, notifyModelChanged, prepareProcess, relMillisecondsToSamples, relSamplesToMilliseconds, removeObservable, removeOutputDatablock, saveViewerData, setBackendProcess, setCanMultiThread, setParentDataBlock, setParentDataBlock, setProcessName, setSampleRate, setupProcess, toString, update, updateData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface PamguardMVC.PamObserver
getObserverName, getObserverObject, masterClockUpdate, noteNewSettings, removeObservable, setSampleRate, update
 

Field Detail

whistleControl

WhistleControl whistleControl

eventDataBlock

PamDataBlock<EventDataUnit> eventDataBlock

whistleDetector

WhistleDetector whistleDetector

whistleDataBlock

PamDataBlock<ShapeDataUnit> whistleDataBlock

whistleEvent

EventDataUnit whistleEvent

closeChecks

long closeChecks

whistleRecorderTrigger

WhistleEventDetector.WhistleRecorderTrigger whistleRecorderTrigger

whistleEventLogger

WhistleEventLogger whistleEventLogger
Constructor Detail

WhistleEventDetector

public WhistleEventDetector(WhistleControl whistleControl,
                            WhistleDetector whistleDetector)
Method Detail

clearOldData

public void clearOldData()
Description copied from class: PamProcess
Clears all data from all output data blocks of this process

Overrides:
clearOldData in class PamProcess

getRequiredDataHistory

public long getRequiredDataHistory(PamObservable o,
                                   java.lang.Object arg)
Specified by:
getRequiredDataHistory in interface PamObserver
Overrides:
getRequiredDataHistory in class PamProcess
Parameters:
o - PamObservable class requiring the data
arg - optional argument from PamObservable
Returns:
time in milliseconds requried by data held in PamObservable

newData

public void newData(PamObservable o,
                    PamDataUnit arg)
Overrides:
newData in class PamProcess

newWhistle

private void newWhistle(ShapeDataUnit dataUnit)

checkCloseEvent

private boolean checkCloseEvent(long timeNow)

closeEvent

private void closeEvent()

pamStart

public void pamStart()
Description copied from class: PamProcess
Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway.

Specified by:
pamStart in class PamProcess

pamStop

public void pamStop()
Description copied from class: PamProcess
Stops the process.

Specified by:
pamStop in class PamProcess