Package Acquisition
Class icListenSystem
java.lang.Object
Acquisition.DaqSystem
Acquisition.icListenSystem
- All Implemented Interfaces:
 PamSettings,SettingsNameProvider
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
 
- 
Field Summary
Fields inherited from class Acquisition.DaqSystem
PARAMETER_FIXED, PARAMETER_UNKNOWN, STREAM_CLOSED, STREAM_ENDED, STREAM_OPEN, STREAM_PAUSED, STREAM_RUNNING - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlayBack(float sampleRate) voidCalled after DAQ has stopped - for whatever reason.booleanFunction gets called when the OK of the settings panel is pressed.voidSets the fields of the data acquisition when the settings are brought upgetDaqSpecificDialogComponent(AcquisitionDialog acquisitionDialog) Get the data acquisition dialog box component of this systemintGets a name for the acquisition device (may just be a number but need to generalise).intintdoublegetPeak2PeakVoltage(int swChannel) getPlaybackSystem(PlaybackControl playbackControl, DaqSystem daqSystem) Gets a playback system for playing sound back out through headphones / speakers, etc.longReturns the name of the current systemReturns the type of the systembooleanbooleanprepareSystem(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 valuesbooleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) booleanstartSystem(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 threadsvoidstopSystem(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.Methods inherited from class Acquisition.DaqSystem
areSampleSettingsOk, getChannelGain, getDaqSpecificChannelListNode, getDaqSpecificChannelListPanel, getDAQSpecificPane, getInputChannelMap, getSampleBits, getStallCheckSeconds, getStartButtonToolTip, getStatusBarComponent, getStreamStatus, notifyModelChanged, setSelected, setStreamStatus, showSampleSettingsDialog, startButtonXtraActions, supportsChannelLists 
- 
Constructor Details
- 
icListenSystem
public icListenSystem()Constructor registers settings 
 - 
 - 
Method Details
- 
getSystemType
Returns the type of the system- Specified by:
 getSystemTypein classDaqSystem- Returns:
 - The 'type' of data source for display in the Data Source dialog
 
Calling functions should be able to handle 'null'
 
 - 
getSystemName
Returns the name of the current system- Specified by:
 getSystemNamein classDaqSystem- Returns:
 - A string describing the data source, e.g. the sound card name, file name, udp port, etc.
 
 - 
getDaqSpecificDialogComponent
Get the data acquisition dialog box component of this system- Specified by:
 getDaqSpecificDialogComponentin classDaqSystem- 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:
 dialogSetParamsin classDaqSystem
 - 
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:
 dialogGetParamsin classDaqSystem- 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:
 getMaxSampleRatein classDaqSystem- Returns:
 - the maximum sample rate supporrted by the selected device, or PARAMETER_UNKNOWN
 
 - 
getMaxChannels
public int getMaxChannels()- Specified by:
 getMaxChannelsin classDaqSystem- Returns:
 - the maximum number of channels supporrted by the selected device, or PARAMETER_UNKNOWN
 
 - 
getPeak2PeakVoltage
public double getPeak2PeakVoltage(int swChannel) - Specified by:
 getPeak2PeakVoltagein classDaqSystem- Returns:
 - peak to peak voltage for the device or PARAMETER_UNKNOWN
 
 - 
prepareSystem
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:
 prepareSystemin classDaqSystem- Parameters:
 daqControl- AcquisitionControl unit.- Returns:
 - true if OK, false otherwise.
 
 - 
startSystem
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:
 startSystemin classDaqSystem- Parameters:
 daqControl- AcquisitionControl unit.- Returns:
 - true if OK, false otherwise
 
 - 
stopSystem
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:
 stopSystemin classDaqSystem- Parameters:
 daqControl-
 - 
isRealTime
public boolean isRealTime()- Specified by:
 isRealTimein classDaqSystem- 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:
 canPlayBackin classDaqSystem- 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:
 getDataUnitSamplesin classDaqSystem- Returns:
 - the number of samples expected in each data unit.
 
 - 
daqHasEnded
public void daqHasEnded()Description copied from class:DaqSystemCalled 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:
 daqHasEndedin classDaqSystem
 - 
getDeviceName
Description copied from class:DaqSystemGets a name for the acquisition device (may just be a number but need to generalise).- Specified by:
 getDeviceNamein classDaqSystem- Returns:
 
 - 
getUnitName
- Specified by:
 getUnitNamein interfaceSettingsNameProvider- Returns:
 - A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
 
 - 
getUnitType
- Specified by:
 getUnitTypein interfacePamSettings- Returns:
 - A Name specific to the type, e.g. Click detector
 
 - 
getSettingsReference
- Specified by:
 getSettingsReferencein interfacePamSettings- Returns:
 - The serialisable object that will be stored
 
 - 
getSettingsVersion
public long getSettingsVersion()- Specified by:
 getSettingsVersionin interfacePamSettings- Returns:
 - An integer version number for the settings
 
 - 
restoreSettings
- Specified by:
 restoreSettingsin interfacePamSettings- Parameters:
 pamControlledUnitSettings-- 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
Description copied from class:DaqSystemGets 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:
 getPlaybackSystemin classDaqSystem- Parameters:
 playbackControl-daqSystem-- Returns:
 - null if no playback available or a PlaybackSystem object.
 - See Also:
 
 
 -