Package ltsa

Class LtsaDataBlock


public class LtsaDataBlock extends FFTDataBlock
  • Constructor Details

    • LtsaDataBlock

      public LtsaDataBlock(String dataName, PamProcess parentProcess, boolean moreAveraged)
  • Method Details

    • getOfflineData

      public int getOfflineData(OfflineDataLoadInfo offlineLoadDataInfo)
      Description copied from class: PamDataBlock
      Gets data for offline display, playback, etc.

      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.

      Overrides:
      getOfflineData in class PamDataBlock<FFTDataUnit>
    • orderOfflineData

      public void orderOfflineData(PamObserver dataObserver, LoadObserver loadObserver, long startMillis, long endMillis, int loadKeepLayers, int interrupt, boolean allowRepeats)
      Description copied from class: PamDataBlock
      Similar functionality to getOfflineData, but this will launch a separate worker thread to do the actual work getting the data. The worker thread will call getOfflineData.

      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

      Overrides:
      orderOfflineData in class PamDataBlock<FFTDataUnit>
      Parameters:
      dataObserver - observer of the loaded data
      loadObserver - observer to get status information on the load.
      startMillis - data start time in milliseconds
      endMillis - data end time in milliseconds.
      loadKeepLayers - Number of layers of datablock which should hang on to loaded data rather than delete it immediately.
      interrupt - interrupt options.
      allowRepeats - allow repeated loads of exactly the same data.
    • getDataGain

      public double getDataGain(int iChan)
      Override the normal FFTDataBlock getDataGain method here and just return 1. If we use the FFTDataBlock version without running the normal FFTDataBlock initialization routines, we will always get 0 gain.
      Overrides:
      getDataGain in class FFTDataBlock
      Parameters:
      iChan - channel number
      Returns:
      gain as a factor (to allow for negative gains)