Package SoundRecorder

Class RecorderControl

java.lang.Object
PamController.PamControlledUnit
SoundRecorder.RecorderControl
All Implemented Interfaces:
PamSettings, SettingsNameProvider

public class RecorderControl extends PamControlledUnit implements PamSettings
Control a sound file recorder. The sound file recorder has two view panels - a main tab panel and also a smaller side panel which replicates some of the functionality of the main panel.

Author:
Doug Gillespie
See Also:
  • Field Details

  • Constructor Details

    • RecorderControl

      public RecorderControl(String name)
  • Method Details

    • notifyModelChanged

      public void notifyModelChanged(int changeType)
      Description copied from class: PamControlledUnit
      General notification when the PAMGAURD model changes.
      Overrides:
      notifyModelChanged in class PamControlledUnit
      Parameters:
      changeType - type of change
    • getRecorderStatus

      public int getRecorderStatus()
    • sayRecorderStatus

      public void sayRecorderStatus()
    • enableRecording

      public void enableRecording()
      Enables and disables the main control buttons for starting / stopping depending on whether or not the ADC is running.
    • enableRecordingControl

      public void enableRecordingControl(boolean enable)
      Enables and disables controls on the views such as the channel selection buttons, the main settings button and also the menus..
      Parameters:
      enable -
    • 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.

    • newData

      public void newData(PamDataBlock dataBlock, PamDataUnit dataUnit)
      Sends data to various views of the recorder (generally level meters)
      Parameters:
      dataBlock -
      dataUnit -
    • setRecorderStatus

      public void setRecorderStatus(int recorderStatus)
    • 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
    • actionRecorderTrigger

      public static void actionRecorderTrigger(RecorderTrigger recorderTrigger, PamDataUnit dataUnit, long timeNow)
      static version of actionRecordTrigger can be called from anywhere in PamGuard. It checks the index of the recordTrigger in the static list and then passes this out to individual recorders which can each check whether or not that trigger is enabled for that particular recorder
      Parameters:
      recorderTrigger -
    • registerRecorderTrigger

      public static void registerRecorderTrigger(RecorderTrigger recorderTrigger)
      Register recorder triggers with all recorders. If the triggers were created and registered before any recorders were created, then they will get added to each recorder as it is constructed. If recorders are created before the triggers, then the new triggers are added to the controller immediately on registration.
      Parameters:
      recorderTrigger -
    • findRecorderTrigger

      public static RecorderTrigger findRecorderTrigger(String triggerName)
      Find details of a recorder trigger by name.
      Parameters:
      triggerName -
      Returns:
      RecorderTrigger object or null if none found
    • getRecorderSettings

      public RecorderSettings getRecorderSettings()
    • getRecorderProcess

      public RecorderProcess getRecorderProcess()
    • getRecorderTriggers

      public static ArrayList<RecorderTrigger> getRecorderTriggers()
    • getBackupInformation

      public BackupInformation getBackupInformation()
      Overrides:
      getBackupInformation in class PamControlledUnit
    • tellModule

      public String tellModule(String command)
      Description copied from class: PamControlledUnit
      Handle a module specific command sent by the tellmodule command.
      Overrides:
      tellModule in class PamControlledUnit
      Parameters:
      command - command line (stripped of the command and the module type and name)
      Returns:
      response to command
    • getModuleSummary

      public String getModuleSummary(boolean clear)
      Description copied from class: PamControlledUnit
      Get a module summary text string for shorthand output to anyting wanting a short summary of data state / numbers of detections.
      Overrides:
      getModuleSummary in class PamControlledUnit
      Parameters:
      clear - clear data after generating string, so that counts of detections, etc. start again from 0.
      Returns:
      module summary string - goings on since the last call to this function