public class LtsaDataBlock extends FFTDataBlock
ITERATOR_END, MATCH_AFTER, MATCH_BEFORE, MATCH_EXACT, MIX_DONOTHING, MIX_INTODATABASE, MIX_OUTOFDATABASE, NOTIFY_NEW_DATA, NOTIFY_UPDATE_DATA, OFFLINE_DATA_CANCEL, OFFLINE_DATA_INTERRUPT, OFFLINE_DATA_WAIT, orderLock, 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
Constructor and Description |
---|
LtsaDataBlock(java.lang.String dataName,
PamProcess parentProcess,
boolean moreAveraged) |
Modifier and Type | Method and Description |
---|---|
int |
getOfflineData(PamObserver observer,
PamObserver endUser,
long startMillis,
long endMillis,
boolean allowRepeats,
RequestCancellationObject cancellationObject)
Gets data for offline display, playback, etc.
|
void |
orderOfflineData(PamObserver dataObserver,
LoadObserver loadObserver,
long startMillis,
long endMillis,
int interrupt,
boolean allowRepeats)
Similar functionality to getOfflineData, but this will launch a separate worker thread to
do the actual work getting the data.
|
clearAll, dumpBlockContents, getComplexArray, getDataGain, getFftHop, getFftLength, getWindowGain, isRecycle, recycleComplexArray, setFftHop, setFftLength, setRecycle, setWindowGain
getChannelListManager, getParentSourceData, notifyModelChanged
addDataAnnotationType, addLocalisationContents, addObserver, addObserver, addOfflineDataMap, addPamData, autoSetDataBlockMixMode, cancelDataOrder, clearChannelIterators, clearDeletedList, createProcessAnnotations, createProcessAnnotations, findAnnotation, findAnnotation, findByDatabaseIndex, findDataUnit, findDataUnit, findUnitsinInterval, getBinaryDataSource, getCanLog, getChannelIterator, getChannelIteratorCount, getChannelMap, getClosestUnitMillis, getClosestUnitMillis, getCurrentViewDataEnd, getCurrentViewDataStart, getDataAnnotationType, getDatagrammedMap, getDatagramProvider, getDataName, getDataSelectCreator, getDataSelector, getDataUnit, getFirstUnit, getFirstUnit, getFirstUnitAfter, getLastUnit, getLastUnit, getListIterator, getListIterator, getListIteratorFromEnd, getListIteratorFromStart, getLocalisationContents, getLogging, getLoggingName, getLongDataName, getMixedDirection, getNaturalLifetime, getNaturalLifetimeMillis, getNextDataStart, getNextUnit, getNextUnit, getNumDataAnnotationTypes, getNumOfflineDataMaps, getNumRequiredBeforeLoadTime, getOfflineDataMap, getOfflineDataMap, getOrderStatus, getParentProcess, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPreceedingUnit, getPrevDataEnd, getPrimaryDataMap, getProcessAnnotations, getQuickId, getRawSourceDataBlock, getRawSourceDataBlock2, getRecycledUnit, getRecyclingStoreLength, getRemovedItems, getReverseChannelIterator, getSampleRate, getSaveRequirements, getShouldBinary, getShouldLog, getSourceDataBlock, getSourceProcess, getUnitClass, getUnitIndex, getUnitsCount, getUnitsCountFromTime, isCanClipGenerate, isClearAtStart, isLinkGpsData, isRecycling, loadViewerData, masterClockUpdate, noteNewSettings, orderOfflineData, remove, remove, removeOfflineDataMap, reset, saveViewerData, setBinaryDataSource, setCanClipGenerate, setChannelMap, setClearAtStart, setDatagramProvider, setDataName, setLinkGpsData, setLocalisationContents, SetLogging, setMixedDirection, setNaturalLifetime, setNaturalLifetimeMillis, setRecordingTrigger, setRecycling, setRecyclingStoreLength, setSampleRate, setShouldBinary, setShouldLog, shouldNotify, sortData, toString, updatePamData
canDraw, clearchanged, countObservers, createKeyItem, deleteObserver, deleteObservers, drawDataUnit, findThreadedObserver, getCPUPercent, getCPUPercent, getHoverText, getLongestObserver, getPamObservers, getRequiredHistory, hasOptionsDialog, notifyObservers, notifyObservers, setChanged, setOverlayDraw, showOptions, waitForThreadedObservers
public LtsaDataBlock(java.lang.String dataName, PamProcess parentProcess, boolean moreAveraged)
public int getOfflineData(PamObserver observer, PamObserver endUser, long startMillis, long endMillis, boolean allowRepeats, RequestCancellationObject cancellationObject)
PamDataBlock
This is used to get data from some upstream process which is quite different to the function loadViewerData(...) which loads data directly associated with this data block.
For example, this might be called in the FFT data block by the spectrogram which wants some data to display. The FFT data block does not have this data, so it passes the request up to it's process which will in turn pass the request on until it reaches a module which is capable of loading data into data units and sending them back down the line.
getOfflineData
in class PamDataBlock<FFTDataUnit>
observer
- data observer which will receive the datastartMillis
- start time in millisecondsendMillis
- end time in millisecondsallowRepeats
- allow the same data to be loaded a second time.public void orderOfflineData(PamObserver dataObserver, LoadObserver loadObserver, long startMillis, long endMillis, int interrupt, boolean allowRepeats)
PamDataBlock
getOfflineData will probably (if not overridden) be sending data to the update member function of the observer, but from the worker thread. Once it's complete, it will send a message to say that data are loaded.
It's possible that the user will do something which causes this to be called again before the previous thread completed execution, in which case there are three options:
OFFLINE_DATA_INTERRUPT - previous thread will be terminated
OFFLINE_DATA_WAIT - wait for previous thread to terminate, then start this load
OFFLINE_DATA_CANCEL - give up and return
orderOfflineData
in class PamDataBlock<FFTDataUnit>
dataObserver
- observer of the loaded dataloadObserver
- observer to get status information on the load.startMillis
- data start time in imillisecondsendMillis
- data end time in milliseconds.interrupt
- interrupt options.allowRepeats
- allow repeated loads of exactly the same data.