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
Modifier and TypeFieldDescriptionstatic final int
static final String
static final int
static final AudioFileFormat.Type
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
actionRecorderTrigger
(RecorderTrigger recorderTrigger, PamDataUnit dataUnit, long timeNow) static version of actionRecordTrigger can be called from anywhere in PamGuard.createDetectionMenu
(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcessesvoid
Enables and disables the main control buttons for starting / stopping depending on whether or not the ADC is running.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..static RecorderTrigger
findRecorderTrigger
(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.int
static ArrayList<RecorderTrigger>
long
void
newData
(PamDataBlock dataBlock, PamDataUnit dataUnit) Sends data to various views of the recorder (generally level meters)void
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.static void
registerRecorderTrigger
(RecorderTrigger recorderTrigger) Register recorder triggers with all recorders.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
void
setRecorderStatus
(int recorderStatus) 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, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setupControlledUnit, stopViewerSound, terminalPrint, terminalPrintln, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface PamController.PamSettings
getUnitType
Methods 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
-
recorderUnitType
- See Also:
-
-
Constructor Details
-
RecorderControl
-
-
Method Details
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamControlledUnit
General notification when the PAMGAURD model changes.- Overrides:
notifyModelChanged
in 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:PamControlledUnit
Create a JMenu object containing MenuItems associated with PamProcesses- Overrides:
createDetectionMenu
in 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
-
-
setRecorderStatus
public void setRecorderStatus(int recorderStatus) -
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- 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:
getBackupInformation
in classPamControlledUnit
-
tellModule
Description copied from class:PamControlledUnit
Handle a module specific command sent by the tellmodule command.- Overrides:
tellModule
in classPamControlledUnit
- Parameters:
command
- command line (stripped of the command and the module type and name)- Returns:
- response to command
-
getModuleSummary
Description copied from class:PamControlledUnit
Get a module summary text string for shorthand output to anyting wanting a short summary of data state / numbers of detections.- Overrides:
getModuleSummary
in 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
-