Package Array

Class HydrophoneDataBlock


public class HydrophoneDataBlock extends PamDataBlock<HydrophoneDataUnit>
  • Constructor Details Link icon

    • HydrophoneDataBlock Link icon

      public HydrophoneDataBlock(String dataName, HydrophoneProcess hydrophoneProcess, int channelMap)
  • Method Details Link icon

    • clearAll Link icon

      public void clearAll()
      Description copied from class: PamDataBlock
      Clears all PamDataUnits from memory

      In viewer mode, data are also re-saved.

      Overrides:
      clearAll in class PamDataBlock<HydrophoneDataUnit>
    • removeOldUnitsT Link icon

      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 class PamDataBlock<HydrophoneDataUnit>
      Parameters:
      currentTimeMS - Time in milliseconds of the first data which must be kept
      Returns:
      the number of units removed
    • shouldNotify Link icon

      public boolean shouldNotify()
      Overrides:
      shouldNotify in class PamDataBlock<HydrophoneDataUnit>
    • getNumRequiredBeforeLoadTime Link icon

      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 class PamDataBlock<HydrophoneDataUnit>
      Returns:
      number of units required.
    • getShouldLog Link icon

      public boolean getShouldLog(PamDataUnit pamDataUnit)
      Description copied from class: PamDataBlock
      Should log the data unit to the database ?
      Overrides:
      getShouldLog in class PamDataBlock<HydrophoneDataUnit>
      Parameters:
      pamDataUnit - dataunit to consider
      Returns:
      true if data should be logged.
    • loadViewerData Link icon

      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 class PamDataBlock<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 Link icon

      public HydrophoneDataUnit getClosestHydrophone(long startTime, int ihydrophone)
      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 Link icon

      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 class PamDataBlock<HydrophoneDataUnit>
      Parameters:
      startTime - data start time
      endTime - data end time
      taskGroup - task group
      Returns:
      copy of data within those times, possibly modified for specific tasks