Package cpod

Class CPODControl2

All Implemented Interfaces:
PamSettings, SettingsNameProvider

public class CPODControl2 extends PamControlledUnit implements PamSettings
CPOD control. Loads and manages CPOD and FPOD data into PAMGaurd.

Note that this module (CPODControl) originally used a folder of CP1 files as it's file store but this version now converts CP1/CP3 etc. into binary files instead in order to integrate into PAMGuard's data management system better.

Author:
Jamie Macaulay
  • Constructor Details

    • CPODControl2

      public CPODControl2(String unitName)
  • Method Details

    • stretchClicktime

      public long stretchClicktime(long rawTime)
    • getSettingsReference

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • restoreSettings

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      Returns:
      true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
    • getCP1DataBlock

      public CPODClickDataBlock getCP1DataBlock()
    • getClickTrainDataBlock

      public CPODClickTrainDataBlock getClickTrainDataBlock()
      Get the CPOD click train data block.
      Returns:
      the CPOD click train data block.
    • setCPODParams

      public void setCPODParams(CPODParams newParams)
      Set the CPOD parameters.
      Parameters:
      newParams - - new parameters.
    • getCPODParam

      public CPODParams getCPODParam()
      Gets the CPOD parameters.
      Returns:
      the CPOD parameters
    • getSettingsPane

      public CPODSettingsPane getSettingsPane()
      Get the settings pane.
      Returns:
      the settings pane.
    • showSettingsDialog

      public void showSettingsDialog(Frame parentFrame)
      Show settings dialog.
      Parameters:
      parentFrame - - the frame.
    • getGUI

      public PamControlledUnitGUI getGUI(int flag)
      Get the GUI for the PAMControlled unit. This has multiple GUI options which are instantiated depending on the view type.
      Overrides:
      getGUI in class PamControlledUnit
      Parameters:
      flag - . The GUI type flag defined in PAMGuiManager.
      Returns:
      the GUI for the PamControlledUnit unit.
    • createDetectionMenu

      public JMenuItem createDetectionMenu(Frame parentFrame)
      Description copied from class: PamControlledUnit
      Create a JMenu object containing MenuItems associated with PamProcesses
      Overrides:
      createDetectionMenu in class PamControlledUnit
      Parameters:
      parentFrame - The owner frame of the menu
      Returns:
      reference to a JMenu which can be added to an existing menu or menu bar

      Note that if multiple views are to use the same menu, then they should each create a new menu (by setting Create to true) the first time they call this method.

    • getCpodImporter

      public CPODImporter getCpodImporter()
      Get the CPOD importer.
      Returns:
      the CPOD importer.
    • importPODData

      public javafx.concurrent.Task<Integer> importPODData(List<File> files)
      Import POD data. This will either be a list of CPOD or FPOD files.
      Parameters:
      files - - the files to import.
      Returns:
      a list of import Tasks.