Package fftManager
Class PamFFTProcess
java.lang.Object
PamguardMVC.PamProcess
fftManager.PamFFTProcess
- All Implemented Interfaces:
 PamObserver,ProcessAnnotator
- Author:
 - Doug Gillespie
 
 PamFFTProcess is a extends the PamProcess superclass
 
Main processing class to calculate FFT data.
Modified October 13 2009 to correctly interleave data from > 1 channel rather then sending data out in chunks corresponding to individual input raw data which is packed as single channels
PamFFTProcess is then notified when new chunks of raw data have been generated (e.g. by reading from a file or taking input from a sound card). It then processes the data to produce blocks of overlapping FFT data which are used to create a new PamDataUnit that is sent to be included in a new PamDataBlock of type PamFFTDataBlock 
- 
Field Summary
Fields inherited from class PamguardMVC.PamProcess
outputDataBlocks, parentDataBlock, processName, sampleRate - 
Constructor Summary
ConstructorsConstructorDescriptionPamFFTProcess(PamFFTControl pamControlledUnit, PamDataBlock parentDataBlock)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidClear all temporary output stores.voiddumpBufferStatus(String message, boolean sayEmpties) Say the status of any buffers, particularly in output buffers of data blocks, but can add bespoke info for other internal buffers for some processes.getAnnotation(PamDataBlock pamDataBlock, int annotation) Get an AnnotationintA list of data block class types which are compatible as parent data blocks for the PamProcess.intintintgetNumAnnotations(PamDataBlock pamDataBlock) longvoidvoidnewData(PamObservable obs, PamDataUnit pamRawData) 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.booleanNew version of prepareProcess which get's called from PAMController prior to PAMGuard starting up.voidsetupFFT()Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, destroyProcess, flushDataBlockBuffers, getAncestorDataBlock, getChainPosition, getCpuPercent, getFrequencyRange, getLastSourceNotificationObject, getLastSourceNotificationType, getMuiltiplexDataBlock, getNumMuiltiplexDataBlocks, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentDataBlocks, getParentProcess, getProcessCheck, getProcessName, getRawSourceDataBlock, getRawSourceDataBlock, getSampleRate, getSourceDataBlock, getSourceProcess, hasOutputDatablock, isCanMultiThread, isExternalProcess, isMultiplex, makePamProcess, masterClockUpdate, noteNewSettings, notifyModelChanged, prepareProcess, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setParentDataBlock, setParentDataBlock, setProcessCheck, setProcessName, setSampleRate, setupProcess, toString, updateData 
- 
Constructor Details
- 
PamFFTProcess
 
 - 
 - 
Method Details
- 
setupFFT
public void setupFFT() - 
getFftLength
public int getFftLength() - 
getFftHop
public int getFftHop() - 
getChannelMap
public int getChannelMap() - 
newData
- Overrides:
 newDatain classPamProcess
 - 
getRequiredDataHistory
- Specified by:
 getRequiredDataHistoryin interfacePamObserver- Overrides:
 getRequiredDataHistoryin classPamProcess- Parameters:
 arg- optional argument from PamObservable- Returns:
 - time in milliseconds required by data held in PamObservable
 
 - 
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
 - 
prepareProcessOK
public boolean prepareProcessOK()Description copied from class:PamProcessNew version of prepareProcess which get's called from PAMController prior to PAMGuard starting up. If a single process returns false from this function, startup will be aborted.For backwards compatibility (to save the need to modify every process) there is a default function which simply calls the older prepareProcess() function, then return true, but processes which might fail can override this and return false instead if they so wish.
Initial motivation for this function was to stop millions of empty files being created when the watchdog is running but the DAQ can't start.
- Overrides:
 prepareProcessOKin classPamProcess- Returns:
 - true if it's looking highly likely that the process is going to start OK.
 
 - 
pamStop
public void pamStop()Description copied from class:PamProcessStops the process.- Specified by:
 pamStopin classPamProcess
 - 
getOutputData
 - 
getAnnotation
Description copied from interface:ProcessAnnotatorGet an Annotation- Specified by:
 getAnnotationin interfaceProcessAnnotator- Overrides:
 getAnnotationin classPamProcess- Parameters:
 pamDataBlock- Annotated datablockannotation- annotation number- Returns:
 - Annotation
 
 - 
getNumAnnotations
- Specified by:
 getNumAnnotationsin interfaceProcessAnnotator- Overrides:
 getNumAnnotationsin classPamProcess- Parameters:
 pamDataBlock- Annotated datablock- Returns:
 - the number of annotations
 
 - 
makeAnnotations
public void makeAnnotations() - 
clearTempStores
public void clearTempStores()Clear all temporary output stores. - 
getFftControl
 - 
getCompatibleDataUnits
Description copied from class:PamProcessA list of data block class types which are compatible as parent data blocks for the PamProcess. This can return null, e.g. in the case of Acquisition process.- Overrides:
 getCompatibleDataUnitsin classPamProcess- Returns:
 - a list of PamDataBlock sub class types which can be used as parent data blocks for the process.
 
 - 
dumpBufferStatus
Description copied from class:PamProcessSay the status of any buffers, particularly in output buffers of data blocks, but can add bespoke info for other internal buffers for some processes.- Overrides:
 dumpBufferStatusin classPamProcess- Parameters:
 message-sayEmpties- include info even if a buffer is empty.
 
 -