Package Acquisition

Class icListenSystem

java.lang.Object
Acquisition.DaqSystem
Acquisition.icListenSystem
All Implemented Interfaces:
PamSettings, SettingsNameProvider

public class icListenSystem extends DaqSystem implements PamSettings
A data acquisition system that uses an Ocean Sonics icListen to acquire the data to be streamed to and used by PAMGUARD.
Author:
John Bowdridge
  • Constructor Details

    • icListenSystem

      public icListenSystem()
      Constructor registers settings
  • Method Details

    • getSystemType

      public String getSystemType()
      Returns the type of the system
      Specified by:
      getSystemType in class DaqSystem
      Returns:
      The 'type' of data source for display in the Data Source dialog

      Calling functions should be able to handle 'null'

    • getSystemName

      public String getSystemName()
      Returns the name of the current system
      Specified by:
      getSystemName in class DaqSystem
      Returns:
      A string describing the data source, e.g. the sound card name, file name, udp port, etc.
    • getDaqSpecificDialogComponent

      public JComponent getDaqSpecificDialogComponent(AcquisitionDialog acquisitionDialog)
      Get the data acquisition dialog box component of this system
      Specified by:
      getDaqSpecificDialogComponent in class DaqSystem
      Parameters:
      acquisitionDialog - the AcquisitionDialog this component will be added to
      Returns:
      dialog component specific to this DAQ device
    • dialogSetParams

      public void dialogSetParams()
      Sets the fields of the data acquisition when the settings are brought up
      Specified by:
      dialogSetParams in class DaqSystem
    • dialogGetParams

      public boolean dialogGetParams()
      Function gets called when the OK of the settings panel is pressed. It saves all the settings entered by the user Make sure the IP Address is set to the latest address entered by the user, Get the Time out specified and get the sample rate using the bandwidth
      Specified by:
      dialogGetParams in class DaqSystem
      Returns:
      true if the parameters and selections are OK. If false is returned the Acquisition dialog will not respond to its Ok button.
    • getMaxSampleRate

      public int getMaxSampleRate()
      Specified by:
      getMaxSampleRate in class DaqSystem
      Returns:
      the maximum sample rate supporrted by the selected device, or PARAMETER_UNKNOWN
    • getMaxChannels

      public int getMaxChannels()
      Specified by:
      getMaxChannels in class DaqSystem
      Returns:
      the maximum number of channels supporrted by the selected device, or PARAMETER_UNKNOWN
    • getPeak2PeakVoltage

      public double getPeak2PeakVoltage(int swChannel)
      Specified by:
      getPeak2PeakVoltage in class DaqSystem
      Returns:
      peak to peak voltage for the device or PARAMETER_UNKNOWN
    • prepareSystem

      public boolean prepareSystem(AcquisitionControl daqControl)
      Prepares the system to Start its data acquisition An icListen should be connected at this point This function sets up the proper data references and updates the acquisition control's fields with the proper values
      Specified by:
      prepareSystem in class DaqSystem
      Parameters:
      daqControl - AcquisitionControl unit.
      Returns:
      true if OK, false otherwise.
    • startSystem

      public boolean startSystem(AcquisitionControl daqControl)
      Start the data acquisition system by telling the icListen to start streaming data then start separate threads to handle capturing data and processing it as well as sets up a queue to pass messages between these threads
      Specified by:
      startSystem in class DaqSystem
      Parameters:
      daqControl - AcquisitionControl unit.
      Returns:
      true if OK, false otherwise
    • stopSystem

      public void stopSystem(AcquisitionControl daqControl)
      Stop the data acquisition Request the capture thread to stop and wait for it to finish up then close/free all the nesc. objects
      Specified by:
      stopSystem in class DaqSystem
    • isRealTime

      public boolean isRealTime()
      Specified by:
      isRealTime in class DaqSystem
      Returns:
      true for real time systems (e.g. sound cards, NI cards, wav files which are being played back over speakers. false for reading files which are to be processed as fast as possible with no playback.
    • canPlayBack

      public boolean canPlayBack(float sampleRate)
      Specified by:
      canPlayBack in class DaqSystem
      Returns:
      true if the system can also play back sound - likely to be true for sound cards and ASIO, and some NI cards, false for wav files. Simulator ?
    • getDataUnitSamples

      public int getDataUnitSamples()
      Specified by:
      getDataUnitSamples in class DaqSystem
      Returns:
      the number of samples expected in each data unit.
    • daqHasEnded

      public void daqHasEnded()
      Description copied from class: DaqSystem
      Called after DAQ has stopped - for whatever reason. Nost DAQ systems will not need to do anything here, but they could potentially clean up memory The motivation for putting this here now is for the folder analysis system so that it can start analysing the next file.
      Specified by:
      daqHasEnded in class DaqSystem
    • getDeviceName

      public String getDeviceName()
      Description copied from class: DaqSystem
      Gets a name for the acquisition device (may just be a number but need to generalise).
      Specified by:
      getDeviceName in class DaqSystem
      Returns:
    • getUnitName

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      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
      Returns:
      A Name specific to the type, e.g. Click detector
    • 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
    • getPlaybackSystem

      public PlaybackSystem getPlaybackSystem(PlaybackControl playbackControl, DaqSystem daqSystem)
      Description copied from class: DaqSystem
      Gets a playback system for playing sound back out through headphones / speakers, etc.

      Generally, anything acquiring data in real time should play the sound back through itself so that clocks are correctly synchronised. i.e. A sound card input will go to the same sound card output, etc. At a later date, we may try to support output through different devices at different speeds - but this will be problematic !

      If data are being read from a file, then playback is through a sound card which sits in a stand alone implementation of PlaybackSystem

      Overrides:
      getPlaybackSystem in class DaqSystem
      Returns:
      null if no playback available or a PlaybackSystem object.
      See Also: