Package Acquisition

Class RonaInputSystem

All Implemented Interfaces:
FileDateObserver, ActionListener, EventListener, DataInputStore, PamSettings, SettingsNameProvider

public class RonaInputSystem extends FolderInputSystem
Bespoke system for handling data from the Rona hydrophone array which consists of sets of seven files, each with different ends in th ename.
Author:
Doug
  • Field Details

  • Constructor Details

  • Method Details

    • getSystemType

      public String getSystemType()
      Overrides:
      getSystemType in class FolderInputSystem
      Returns:
      The 'type' of data source for display in the Data Source dialog

      Calling functions should be able to handle 'null'

    • getUnitName

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Overrides:
      getUnitName in class FolderInputSystem
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Overrides:
      getUnitType in class FolderInputSystem
      Returns:
      A Name specific to the type, e.g. Click detector
    • getFolderFileFilter

      public PamFileFilter getFolderFileFilter()
      Overrides:
      getFolderFileFilter in class FolderInputSystem
    • getMaxChannels

      public int getMaxChannels()
      Overrides:
      getMaxChannels in class FileInputSystem
      Returns:
      the maximum number of channels supporrted by the selected device, or PARAMETER_UNKNOWN
    • getChannels

      public int getChannels()
      Overrides:
      getChannels in class FileInputSystem
    • getInputChannelMap

      public int getInputChannelMap(AcquisitionParameters acquisitionParameters)
      Overrides:
      getInputChannelMap in class DaqSystem
      Returns:
      a bitmap of output channels. this should ALWAYS be a bitmap of channels 0 to n-1 even if different hardware channels are used since hardware channels are no longer passed through PAMGUARD.
    • prepareInputFile

      public boolean prepareInputFile()
      Description copied from class: FileInputSystem
      Open the audio stream for processing.
      Overrides:
      prepareInputFile in class FolderInputSystem
      Returns:
      true if audio stream opened correctly.
    • getChannelFile

      public File getChannelFile(File baseFile, int index)
      swap the last digit in a file name for the higher channel number - rememebr the channels are one indexed.
      Parameters:
      baseFile - base file
      index - 0 based file index
      Returns:
      new file with the 1 replaced by another number
    • findChannelFile

      public File findChannelFile(File baseFile, int index, int searchRange)
      Search for a nearby file with the same name, but secondds may differ by one or two secs - may need to generate complete new file names !
      Parameters:
      baseFile -
      index -
      searchRange -
      Returns:
    • prepareSystem

      public boolean prepareSystem(AcquisitionControl daqControl)
      Description copied from class: DaqSystem
      Prepare the DaqSystem.

      Usually this is the time for opening files, preparing data buffers, etc.

      Overrides:
      prepareSystem in class FileInputSystem
      Parameters:
      daqControl - AcquisitionControl unit.
      Returns:
      true if OK, false otherwise.
    • startSystem

      public boolean startSystem(AcquisitionControl daqControl)
      Description copied from class: DaqSystem
      Start the DaqSystem. This is called immediately after PrepareSystem

      Most things should be ready from the call to PrepareSystem. In StartSystem you will generally need to start a thread which will read in the data and place PamDataUnits in a buffer from where they are read by the main thred and passed on to other Pam modules for processing (see SoundCardSystem for an example)

      Overrides:
      startSystem in class FolderInputSystem
      Parameters:
      daqControl - AcquisitionControl unit.
      Returns:
      true if OK, false otherwise
    • setChannelRunning

      public void setChannelRunning(int channel, boolean running)
    • stopSystem

      public void stopSystem(AcquisitionControl daqControl)
      Description copied from class: DaqSystem
      Stop the DaqSystem.
      Overrides:
      stopSystem in class FileInputSystem