whistleDetector
Class WhistleLinker

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

public class WhistleLinker
extends PamProcess

Author:
Doug Gillespie

Links up peaks into chains which may become whistles


Field Summary
private  int detectionChannel
           
(package private)  long firstReqSample
           
private  int groupChannels
           
(package private)  java.util.ArrayList<PeakDataUnit> localSliceList
           
(package private)  PamDataBlock<PeakDataUnit> peakDataBlock
           
(package private)  PeakDetector peakDetector
           
(package private)  WhistleControl whistleControl
           
(package private)  WhistleDetector whistleDetector
           
(package private)  java.util.LinkedList<WhistleShape> whistleShapes
           
 
Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, processName, sampleRate
 
Constructor Summary
WhistleLinker(WhistleControl whistleControl, WhistleDetector whistleDetector, PeakDetector peakDetector, int groupChannels)
           
 
Method Summary
 long getFirstShapeStart()
           
 int getGroupChannels()
           
 long getRequiredDataHistory(PamObservable o, java.lang.Object arg)
           
 void newData(PamObservable obs, PamDataUnit newUnit)
           
 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.
 void prepareProcess()
          Called for each process before any of them receive the PamStart command
private  void searchForLinks(PamObservable obs, PeakDataUnit newDataUnit, int channel)
           
 void setGroupChannels(int groupChannels)
           
 
Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addOutputDataBlock, changedThreading, clearOldData, 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, 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
 

Field Detail

whistleDetector

WhistleDetector whistleDetector

peakDetector

PeakDetector peakDetector

whistleControl

WhistleControl whistleControl

whistleShapes

java.util.LinkedList<WhistleShape> whistleShapes

peakDataBlock

PamDataBlock<PeakDataUnit> peakDataBlock

firstReqSample

long firstReqSample

groupChannels

private int groupChannels

detectionChannel

private int detectionChannel

localSliceList

java.util.ArrayList<PeakDataUnit> localSliceList
Constructor Detail

WhistleLinker

public WhistleLinker(WhistleControl whistleControl,
                     WhistleDetector whistleDetector,
                     PeakDetector peakDetector,
                     int groupChannels)
Method Detail

getFirstShapeStart

public long getFirstShapeStart()

prepareProcess

public void prepareProcess()
Description copied from class: PamProcess
Called for each process before any of them receive the PamStart command

Overrides:
prepareProcess in class PamProcess

newData

public void newData(PamObservable obs,
                    PamDataUnit newUnit)
Overrides:
newData in class PamProcess

searchForLinks

private void searchForLinks(PamObservable obs,
                            PeakDataUnit newDataUnit,
                            int channel)

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

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

getGroupChannels

public int getGroupChannels()

setGroupChannels

public void setGroupChannels(int groupChannels)