Package Array
Class HydrophoneDataBlock
-
Field Summary
Fields inherited from class PamguardMVC.PamDataBlock
ITERATOR_END, MATCH_AFTER, MATCH_BEFORE, MATCH_EXACT, MIX_DONOTHING, MIX_INTODATABASE, MIX_OUTOFDATABASE, naturalLifetime, NOTIFY_NEW_DATA, NOTIFY_UPDATE_DATA, pamDataUnits, parentProcess, POSITION_AFTER, POSITION_BEFORE, REFERENCE_ABSOLUTE, REFERENCE_CURRENT, REQUEST_DATA_LOADED, REQUEST_DATA_PARTIAL_LOAD, REQUEST_EXCEPTION, REQUEST_INTERRUPTED, REQUEST_NO_DATA, REQUEST_SAME_REQUEST, unitsAdded, unitsRemoved, unitsUpdated
Fields inherited from class PamguardMVC.PamObservable
masterClockSample, objectChanged, overlayDraw, pamProfiler
-
Constructor Summary
ConstructorsConstructorDescriptionHydrophoneDataBlock
(String dataName, HydrophoneProcess hydrophoneProcess, int channelMap) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearAll()
Clears all PamDataUnits from memorygetClosestHydrophone
(long startTime, int ihydrophone) Find the closest hydrophone unit to a given time.int
Get the number of pam data units that are required prior to the load times that get sent to loadViewerData.boolean
getShouldLog
(PamDataUnit pamDataUnit) Should log the data unit to the database ?getTaskDataCopy
(long startTime, long endTime, OfflineTaskGroup taskGroup) Get a copy of the data for offline tasks.boolean
loadViewerData
(OfflineDataLoadInfo offlineDataLoadInfo, ViewLoadObserver loadObserver) Instruction from the viewer scroll manager to load new data.protected int
removeOldUnitsT
(long currentTimeMS) Removes olderPamDataUnits from memory, starting at the first unit and continuing until if finds one with data coming earlier than the given time in milliseconds.boolean
Methods inherited from class PamguardMVC.PamDataBlock
addDataAnnotationType, addLocalisationContents, addObserver, addObserver, addOfflineDataMap, addOldPamData, addPamData, addPamData, autoEffortProvider, autoSetDataBlockMixMode, cancelDataOrder, cancelDataOrder, checkOfflineDataUIDs, clearAll, clearChannelIterators, clearDeletedList, clearOnViewerLoad, copyDataList, createProcessAnnotations, createProcessAnnotations, dispose, dumpBlockContents, dumpBufferStatus, findAnnotation, findAnnotation, findByDatabaseIndex, findDataUnit, findDataUnit, findFirstUnitAfter, findLastUnitBefore, findUnitByUIDandUTC, findUnitsinInterval, getAbsoluteDataUnit, getAnnotationHandler, getARealChannel, getBackgroundManager, getBespokeDataMapGraphic, getBinaryDataSource, getCanLog, getChannelIterator, getChannelIteratorCount, getChannelMap, getChannelsForSequenceMap, getClosestUnitMillis, getClosestUnitMillis, getClosestUnitMillisUsingSeq, getCrossReferenceInformation, getCumulativeGain, getCurrentViewDataEnd, getCurrentViewDataStart, getDataAutomationInfo, getDatablockSpeciesManager, getDataBlockXML, getDataCopy, getDataCopy, getDataCopy, getDataCopy, getDataCopyFromEnd, getDataCopyFromStart, getDataGain, getDatagrammedMap, getDatagramProvider, getDataName, getDataSelectCreator, getDataSelector, getDataSelector, getDataSelector, getDataUnit, getDataUnitMenuItems, getDataUnitPopupMenu, getDurationRange, getEffortProvider, getFirstRawSourceDataBlock, getFirstUnit, getFirstUnit, getFirstUnitAfter, getFirstViewerUID, getFrequencyRange, getHydrophoneMap, getJSONDataSource, getLastUnit, getLastUnit, getLastUnitMillis, getLastViewerUID, getListIterator, getListIterator, getListIteratorFromEnd, getListIteratorFromStart, getLocalisationAlgorithm, getLocalisationContents, getLogging, getLoggingName, getLongDataName, getMixedDirection, getMyDataUnits, getNanoTimeCalculator, getNaturalLifetime, getNaturalLifetimeMillis, getNextDataStart, getNextUnit, getNextUnit, getNumOfflineDataMaps, getOfflineData, getOfflineDataMap, getOfflineDataMap, getPamConfiguration, getPamSymbolManager, getParentProcess, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnitFromSeq, getPreceedingUnitFromSeq, getPrevDataEnd, getPrimaryDataMap, getProcessAnnotations, getQuickId, getQuickId2, getRawSourceDataBlock, getRawSourceDataBlock2, getRecordingTrigger, getRecycledUnit, getRecyclingStoreLength, getRemovedItems, getReverseChannelIterator, getSampleRate, getSaveRequirements, getSequenceCount, getSequenceIterator, getSequenceMap, getSequenceMapObject, getShouldBinary, getShouldLog, getSourceDataBlock, getSourceProcess, getSuperDetectionClass, getSynchLock, getTethysDataProvider, getTOADCalculator, getUidHandler, getUIDRepairLogging, getUniqueParentList, getUnitClass, getUnitIndex, getUnitsCount, getUnitsCountFromTime, hasDataRange, isCanClipGenerate, isClearAtStart, isLinkGpsData, isOffline, isRecycling, loadViewerData, masterClockUpdate, needViewerDataLoad, noteNewSettings, notifyModelChanged, notifyOfflineObservers, orderOfflineData, orderOfflineData, orderOfflineData, pamStart, pamStop, remove, remove, remove, removedDataUnit, removeOfflineDataMap, removeOldUnitsS, reset, saveViewerData, setAnnotationHandler, setBackgroundManager, setBinaryDataSource, setCanClipGenerate, setChannelMap, setClearAtStart, setCurrentViewDataEnd, setCurrentViewDataStart, setDatagramProvider, setDataName, setDataSelectCreator, setEffortProvider, setJSONDataSource, setLinkGpsData, setLocalisationContents, SetLogging, setMixedDirection, setNanoTimeCalculator, setNaturalLifetime, setNaturalLifetimeMillis, setPamSymbolManager, setParentProcess, setRecordingTrigger, setRecycling, setRecyclingStoreLength, setSampleRate, setSequenceMap, setShouldBinary, setShouldLog, setSynchLock, setUidHandler, sortData, sortOutputMaps, stopTimer, toString, updatePamData
Methods inherited from class PamguardMVC.PamObservable
addInstantObserver, canDraw, canDraw, clearchanged, countObservers, createKeyItem, deleteObserver, deleteObservers, drawDataUnit, findThreadedObserver, getCPUPercent, getCPUPercent, getHoverText, getInstantObservers, getLongestObserver, getMaxThreadJitter, getOverlayDraw, getPamObserver, getPamObservers, getRequiredHistory, isInstantObserver, notifyInstantObservers, notifyNornalObservers, notifyObservers, notifyObservers, setChanged, setOverlayDraw, updateObservers, waitForThreadedObservers
-
Constructor Details
-
Method Details
-
clearAll
public void clearAll()Description copied from class:PamDataBlock
Clears all PamDataUnits from memoryIn viewer mode, data are also re-saved.
- Overrides:
clearAll
in classPamDataBlock<HydrophoneDataUnit>
-
removeOldUnitsT
protected int removeOldUnitsT(long currentTimeMS) Description copied from class:PamDataBlock
Removes olderPamDataUnits from memory, starting at the first unit and continuing until if finds one with data coming earlier than the given time in milliseconds.If the data are acoustic, it tries to find the data source and looks to see how much data has been placed in the source data unit and does the calculation in samples.
- Overrides:
removeOldUnitsT
in classPamDataBlock<HydrophoneDataUnit>
- Parameters:
currentTimeMS
- Time in milliseconds of the first data which must be kept- Returns:
- the number of units removed
-
shouldNotify
public boolean shouldNotify()- Overrides:
shouldNotify
in classPamDataBlock<HydrophoneDataUnit>
-
getNumRequiredBeforeLoadTime
public int getNumRequiredBeforeLoadTime()Description copied from class:PamDataBlock
Get the number of pam data units that are required prior to the load times that get sent to loadViewerData. This can be used for things like hydrophone data where it may be necessary to load up a few earlier points to complete a trackline, etc.- Overrides:
getNumRequiredBeforeLoadTime
in classPamDataBlock<HydrophoneDataUnit>
- Returns:
- number of units required.
-
getShouldLog
Description copied from class:PamDataBlock
Should log the data unit to the database ?- Overrides:
getShouldLog
in classPamDataBlock<HydrophoneDataUnit>
- Parameters:
pamDataUnit
- dataunit to consider- Returns:
- true if data should be logged.
-
loadViewerData
public boolean loadViewerData(OfflineDataLoadInfo offlineDataLoadInfo, ViewLoadObserver loadObserver) Description copied from class:PamDataBlock
Instruction from the viewer scroll manager to load new data.- Overrides:
loadViewerData
in classPamDataBlock<HydrophoneDataUnit>
- Parameters:
offlineDataLoadInfo
- - the load object which contains all info on the data to be loaded.loadObserver
- - the load observer. Can be used as a callback for load progress.
-
getClosestHydrophone
Find the closest hydrophone unit to a given time.- Parameters:
startTime
- Start time of data unit (milliseconds)channelBitMap
- Channel map - must be some overlap, not an exact match.- Returns:
- closest data unit
-
getTaskDataCopy
public ArrayList<HydrophoneDataUnit> getTaskDataCopy(long startTime, long endTime, OfflineTaskGroup taskGroup) Description copied from class:PamDataBlock
Get a copy of the data for offline tasks. Required since one or two data blocks have to do something a bit different for some specific tasks.- Overrides:
getTaskDataCopy
in classPamDataBlock<HydrophoneDataUnit>
- Parameters:
startTime
- data start timeendTime
- data end timetaskGroup
- task group- Returns:
- copy of data within those times, possibly modified for specific tasks
-