Package loggerForms

Class FormsDataBlock


public class FormsDataBlock extends PamDataBlock<FormsDataUnit>
Author:
Graham Weatherup
  • Constructor Details Link icon

  • Method Details Link icon

    • getFormDescription Link icon

      public FormDescription getFormDescription()
    • getShouldLog Link icon

      public boolean getShouldLog(PamDataUnit pamDataUnit)
      Override this for Logger forms so that they always save.
      Overrides:
      getShouldLog in class PamDataBlock<FormsDataUnit>
      Parameters:
      pamDataUnit - dataunit to consider
      Returns:
      true if data should be logged.
    • addPamData Link icon

      public void addPamData(FormsDataUnit pamDataUnit)
      Description copied from class: PamDataBlock
      Adds a new PamDataUnit to the PamDataBlock. When the data unit is added, PamObservers that have subscribed to the block will be notified.
      If the data unit already has a UID, it will be left as is.
      Overrides:
      addPamData in class PamDataBlock<FormsDataUnit>
      Parameters:
      pamDataUnit - Reference to a PamDataUnit
    • updatePamData Link icon

      public void updatePamData(FormsDataUnit pamDataUnit, long timeMillis)
      Description copied from class: PamDataBlock
      update a dataunit. Does little except flag that the data unit is updated (so it will get saved), and sends notifications to other modules.
      Overrides:
      updatePamData in class PamDataBlock<FormsDataUnit>
      Parameters:
      pamDataUnit -
      timeMillis -
    • 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<FormsDataUnit>
      Parameters:
      currentTimeMS - Time in milliseconds of the first data which must be kept
      Returns:
      the number of units removed
    • removeOldUnitsS Link icon

      protected int removeOldUnitsS(long mastrClockSample)
      Overrides:
      removeOldUnitsS in class PamDataBlock<FormsDataUnit>