Package IshmaelLocator
Class IshLocProcess
java.lang.Object
PamguardMVC.PamProcess
IshmaelLocator.IshLocProcess
- All Implemented Interfaces:
 PamObserver,ProcessAnnotator,SpectrogramMarkObserver
- Direct Known Subclasses:
 IshLocHyperbProcess,IshLocPairProcess
This is a superclass to a "real" localization class. It gathers the
 necessary data (samples, phone positions, etc.) for the subclass, then calls
 calcData(), which the subclass should define. Current children include
 IshLocPairProcess and IshLocHyperbProcess.
- Author:
 - Dave Mellinger
 
- 
Field Summary
FieldsFields inherited from class PamguardMVC.PamProcess
outputDataBlocks, parentDataBlock, processName, sampleRateFields inherited from interface Spectrogram.SpectrogramMarkObserver
MOUSE_DOWN, MOUSE_DRAG, MOUSE_UP - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleancanMark()voidCalled from the PamControlled unit when a PamControlled unit is removed from the model.voiddoLocalisation(long startSam, long durationSam, double f0, double f1, PamRawDataBlock daqBlock) Do the localization for the call delineated by startMsec, durationMsec, f0, and f1.An IshLocProcess has one input stream (data block).abstract StringgetName()voidnewData(PamObservable o, PamDataUnit arg1) Data for localization can arrive from either an upstream data source or from the user drawing a box on the spectrogram.voidpamStart()Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).voidpamStop()Stops the process.protected voidvoidCalled for each process before any of them receive the PamStart commandvoidsetParentDataBlock(PamDataBlock newParentDataBlock) Set a parent data block with the default options of rethreading if setvoidvoidcalled for every process once the systemmodel has been created.booleanspectrogramNotification(SpectrogramDisplay display, MouseEvent mouseEvent, int downUp, int channel, long startMsec, long durationMsec, double f0, double f1, TDGraphFX tdDisplay) Data for localization can arrive from either an upstream data source or from the user drawing a box on the spectrogram.Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, dumpBufferStatus, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, getCompatibleDataUnits, getCpuPercent, getFrequencyRange, getLastSourceNotificationObject, getLastSourceNotificationType, getMuiltiplexDataBlock, getNumAnnotations, getNumMuiltiplexDataBlocks, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentDataBlocks, getParentProcess, getProcessCheck, getProcessName, getRawSourceDataBlock, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, hasOutputDatablock, isCanMultiThread, isExternalProcess, isMultiplex, makePamProcess, masterClockUpdate, noteNewSettings, notifyModelChanged, prepareProcessOK, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setParentDataBlock, setProcessCheck, setProcessName, setSampleRate, toString, updateDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Spectrogram.SpectrogramMarkObserver
getMarkName 
- 
Field Details
- 
inputData
 
 - 
 - 
Constructor Details
- 
IshLocProcess
 
 - 
 - 
Method Details
- 
getName
 - 
setParentDataBlock
Description copied from class:PamProcessSet a parent data block with the default options of rethreading if set- Overrides:
 setParentDataBlockin classPamProcess- Parameters:
 newParentDataBlock- source data block.
 - 
getInputDataBlock
An IshLocProcess has one input stream (data block). Return it, or null if it's not available. - 
setupProcess
public void setupProcess()Description copied from class:PamProcesscalled for every process once the systemmodel has been created. this is a good time to check out and find input data blocks and similar tasks.- Overrides:
 setupProcessin classPamProcess
 - 
destroyProcess
public void destroyProcess()Description copied from class:PamProcessCalled from the PamControlled unit when a PamControlled unit is removed from the model. Offers an opportunity to disconnect individual processed from the rest of the model. May be necessary to override to clean up some processes.- Overrides:
 destroyProcessin classPamProcess
 - 
setupConnections
public void setupConnections() - 
prepareMyParams
protected void prepareMyParams() - 
spectrogramNotification
public boolean spectrogramNotification(SpectrogramDisplay display, MouseEvent mouseEvent, int downUp, int channel, long startMsec, long durationMsec, double f0, double f1, TDGraphFX tdDisplay) Data for localization can arrive from either an upstream data source or from the user drawing a box on the spectrogram. This is the routine for capturing user box-drawing.- Specified by:
 spectrogramNotificationin interfaceSpectrogramMarkObserver- Parameters:
 display- spectrogram display; ignoreddownUp- mouse action (only MOUSE_UP events are used)channel- which channel was drawn on; ignoredstartMsec- in absolute msec (since 1970)durationMsec-f0- ,f1 frequency range of the selectionf1- max frequency in Hz- Returns:
 - true if the user has popped up a menu or done something that should stop the sending display from carrying out any further actions on this mouse action (put in place to prevent the spectrogram menu popping up when editing marks in viewer mode).
 
 - 
canMark
public boolean canMark()- Specified by:
 canMarkin interfaceSpectrogramMarkObserver- Returns:
 - whether or not it's possible to use this marker. Generally false when in viewer mode, but maynot always be.
 
 - 
newData
Data for localization can arrive from either an upstream data source or from the user drawing a box on the spectrogram. This is the routine for data arriving from upstream.- Overrides:
 newDatain classPamProcess- Parameters:
 arg1- data arriving from upstream; type must be PamDataUnit (or a subclass of it)
 - 
doLocalisation
public void doLocalisation(long startSam, long durationSam, double f0, double f1, PamRawDataBlock daqBlock) Do the localization for the call delineated by startMsec, durationMsec, f0, and f1.- Parameters:
 startSam- in absolute msec (since 1970)durationSam-f0- ,f1 frequency range to use in calculating the locdaqProcess- the PamProcess producing raw audio data, needed for getting hydrophone info
 - 
getMarkObserverName
- Specified by:
 getMarkObserverNamein interfaceSpectrogramMarkObserver- Returns:
 - Name for the mark observer to show in the spectrogram dialog.
 
 - 
pamStart
public void pamStart()Description copied from class:PamProcessCalled for each process to tell it to start (may not be necessary for processes which are listening for data anyway).- Specified by:
 pamStartin classPamProcess
 - 
pamStop
public void pamStop()Description copied from class:PamProcessStops the process.- Specified by:
 pamStopin classPamProcess
 - 
prepareProcess
public void prepareProcess()Description copied from class:PamProcessCalled for each process before any of them receive the PamStart command- Overrides:
 prepareProcessin classPamProcess
 
 -