Package SoundRecorder
Class RecorderControl
java.lang.Object
PamController.PamControlledUnit
SoundRecorder.RecorderControl
- All Implemented Interfaces:
 PamSettings,SettingsNameProvider
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected MenuItemEnablerprotected static ArrayList<RecorderTrigger> static final Stringstatic final intstatic final AudioFileFormat.TypeFields inherited from class PamController.PamControlledUnit
isMixed, isViewer - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic voidactionRecorderTrigger(RecorderTrigger recorderTrigger, PamDataUnit dataUnit, long timeNow) static version of actionRecordTrigger can be called from anywhere in PamGuard.protected voidbuttonCommand(int command) createDetectionMenu(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcessesvoidEnables and disables the main control buttons for starting / stopping depending on whether or not the ADC is running.voidenableRecordingControl(boolean enable) Enables and disables controls on the views such as the channel selection buttons, the main settings button and also the menus..static RecorderTriggerfindRecorderTrigger(String triggerName) Find details of a recorder trigger by name.getModuleSummary(boolean clear) Get a module summary text string for shorthand output to anyting wanting a short summary of data state / numbers of detections.intstatic ArrayList<RecorderTrigger> longvoidnewData(PamDataBlock dataBlock, PamDataUnit dataUnit) Sends data to various views of the recorder (generally level meters)protected voidvoidnotifyModelChanged(int changeType) General notification when the PAMGAURD model changes.protected voidrecordSettingsDialog(Frame parentFrame) static voidregisterRecorderTrigger(RecorderTrigger recorderTrigger) Register recorder triggers with all recorders.booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidprotected voidsetFolderStatus(boolean folderOk) voidsetRecorderStatus(int recorderStatus) protected voidsetSampleRate(float sampleRate) Called mainly so that the samplerate notification from Acquisition can be used to check the number of channels is correctly displayed.tellModule(String command) Handle a module specific command sent by the tellmodule command.Methods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createDisplayMenu, createFileMenu, createHelpMenu, flushDataBlockBuffers, getFrameNumber, getGUI, getGuiFrame, getInstanceIndex, getModuleStatus, getModuleStatusManager, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitTaskManager, getUnitTaskManager, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setUnitTaskManager, setupControlledUnit, stopViewerSound, terminalPrint, terminalPrintln, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface PamController.PamSettings
getUnitTypeMethods inherited from interface PamController.SettingsNameProvider
getUnitName 
- 
Field Details
- 
RECORDING
public static final int RECORDING- See Also:
 
 - 
IDLE
public static final int IDLE- See Also:
 
 - 
X3
 - 
recorderTriggers
 - 
recorderUnitType
- See Also:
 
 
 - 
Constructor Details
- 
RecorderControl
 
 - 
 - 
Method Details
- 
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamControlledUnitGeneral notification when the PAMGAURD model changes.- Overrides:
 notifyModelChangedin classPamControlledUnit- 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
Description copied from class:PamControlledUnitCreate a JMenu object containing MenuItems associated with PamProcesses- Overrides:
 createDetectionMenuin classPamControlledUnit- 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
Sends data to various views of the recorder (generally level meters)- Parameters:
 dataBlock-dataUnit-
 - 
buttonCommand
protected void buttonCommand(int command)  - 
setRecorderStatus
public void setRecorderStatus(int recorderStatus)  - 
setFolderStatus
protected void setFolderStatus(boolean folderOk)  - 
recordSettingsDialog
 - 
newParams
protected void newParams() - 
setSampleRate
protected void setSampleRate(float sampleRate) Called mainly so that the samplerate notification from Acquisition can be used to check the number of channels is correctly displayed.- Parameters:
 sampleRate-
 - 
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
 
 - 
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
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
Find details of a recorder trigger by name.- Parameters:
 triggerName-- Returns:
 - RecorderTrigger object or null if none found
 
 - 
getRecorderSettings
 - 
getRecorderProcess
 - 
getRecorderTriggers
 - 
getBackupInformation
- Overrides:
 getBackupInformationin classPamControlledUnit
 - 
tellModule
Description copied from class:PamControlledUnitHandle a module specific command sent by the tellmodule command.- Overrides:
 tellModulein classPamControlledUnit- Parameters:
 command- command line (stripped of the command and the module type and name)- Returns:
 - response to command
 
 - 
getModuleSummary
Description copied from class:PamControlledUnitGet a module summary text string for shorthand output to anyting wanting a short summary of data state / numbers of detections.- Overrides:
 getModuleSummaryin classPamControlledUnit- 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
 
 
 -