Package Acquisition
Class RonaInputSystem
java.lang.Object
Acquisition.DaqSystem
Acquisition.FileInputSystem
Acquisition.FolderInputSystem
Acquisition.RonaInputSystem
- All Implemented Interfaces:
FileDateObserver
,ActionListener
,EventListener
,DataInputStore
,PamSettings
,SettingsNameProvider
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
-
Nested Class Summary
Nested classes/interfaces inherited from class Acquisition.FileInputSystem
FileInputSystem.CollectorThread
-
Field Summary
Fields inherited from class Acquisition.FolderInputSystem
daqType, GlobalWavFolderArg, sysType
Fields inherited from class Acquisition.DaqSystem
PARAMETER_FIXED, PARAMETER_UNKNOWN, STREAM_CLOSED, STREAM_ENDED, STREAM_OPEN, STREAM_PAUSED, STREAM_RUNNING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindChannelFile
(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 !getChannelFile
(File baseFile, int index) swap the last digit in a file name for the higher channel number - rememebr the channels are one indexed.int
int
getInputChannelMap
(AcquisitionParameters acquisitionParameters) int
boolean
Open the audio stream for processing.boolean
prepareSystem
(AcquisitionControl daqControl) Prepare the DaqSystem.void
setChannelRunning
(int channel, boolean running) boolean
startSystem
(AcquisitionControl daqControl) Start the DaqSystem.void
stopSystem
(AcquisitionControl daqControl) Stop the DaqSystem.Methods inherited from class Acquisition.FolderInputSystem
checkFileHeaders, daqHasEnded, dialogFXSetParams, dialogGetParams, dialogSetParams, getAudioFileFilter, getBatchStatus, getCurrentFile, getCurrentFolder, getDAQSpecificPane, getDeviceName, getEta, getFolderInputParameters, getSettingsReference, getSettingsVersion, getStatusBarComponent, getStoreInfo, interpretNewFile, makeSelFileList, makeSelFileList, newFileList, restoreSettings, runFileAnalysis, setAnalysisStartTime, setAudioFileFilter, setFileDateText, setFileOptionPanel, setFolderInputParameters, setSelected
Methods inherited from class Acquisition.FileInputSystem
actionPerformed, bytesToSamples, canPlayBack, fileDateChange, getAquisitionControl, getDaqSpecificDialogComponent, getDataUnitSamples, getFileStartTime, getFirstFile, getMaxSampleRate, getPeak2PeakVoltage, getSample, getSampleBits, getSampleRate, getSelectedFileTypes, getSkipStartFileTime, getSystemName, isRealTime, sayEta, sayEta, setNewFile, setSelectedFileTypes, setStreamStatus, systemHasStopped
Methods inherited from class Acquisition.DaqSystem
areSampleSettingsOk, getChannelGain, getDaqSpecificChannelListNode, getDaqSpecificChannelListPanel, getPlaybackSystem, getStallCheckSeconds, getStreamStatus, notifyModelChanged, showSampleSettingsDialog, supportsChannelLists
-
Field Details
-
systemType
- See Also:
-
-
Constructor Details
-
RonaInputSystem
-
-
Method Details
-
getSystemType
- Overrides:
getSystemType
in classFolderInputSystem
- Returns:
- The 'type' of data source for display in the Data Source dialog
Calling functions should be able to handle 'null'
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- Overrides:
getUnitName
in classFolderInputSystem
- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Overrides:
getUnitType
in classFolderInputSystem
- Returns:
- A Name specific to the type, e.g. Click detector
-
getFolderFileFilter
- Overrides:
getFolderFileFilter
in classFolderInputSystem
-
getMaxChannels
public int getMaxChannels()- Overrides:
getMaxChannels
in classFileInputSystem
- Returns:
- the maximum number of channels supporrted by the selected device, or PARAMETER_UNKNOWN
-
getChannels
public int getChannels()- Overrides:
getChannels
in classFileInputSystem
-
getInputChannelMap
- Overrides:
getInputChannelMap
in classDaqSystem
- 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 classFolderInputSystem
- Returns:
- true if audio stream opened correctly.
-
getChannelFile
swap the last digit in a file name for the higher channel number - rememebr the channels are one indexed.- Parameters:
baseFile
- base fileindex
- 0 based file index- Returns:
- new file with the 1 replaced by another number
-
findChannelFile
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
Description copied from class:DaqSystem
Prepare the DaqSystem.Usually this is the time for opening files, preparing data buffers, etc.
- Overrides:
prepareSystem
in classFileInputSystem
- Parameters:
daqControl
- AcquisitionControl unit.- Returns:
- true if OK, false otherwise.
-
startSystem
Description copied from class:DaqSystem
Start the DaqSystem. This is called immediately after PrepareSystemMost 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 classFolderInputSystem
- Parameters:
daqControl
- AcquisitionControl unit.- Returns:
- true if OK, false otherwise
-
setChannelRunning
public void setChannelRunning(int channel, boolean running) -
stopSystem
Description copied from class:DaqSystem
Stop the DaqSystem.- Overrides:
stopSystem
in classFileInputSystem
-