Class PamController
- All Implemented Interfaces:
 PamControllerInterface,PamSettings,SettingsNameProvider
- Author:
 - Doug Gillespie
         
Main Pam Controller class which will communicate with the PamModelInterface and with the PamViewInterface
PamController contains a list of PamControlledUnit's each of which has it's own process, simpleMapRef.gpsTextPanel.setPixelsPerMetre(getPixelsPerMetre()); input and output data and display (Tab Panel, Menus, etc.)
 - See Also:
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final intstatic final intstatic doubleThe java version being run.static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intPamGuard view params.static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final StringNever changed.static final StringFields inherited from interface PamController.PamControllerInterface
ADD_CONTROLLEDUNIT, ADD_DATABLOCK, ADD_PROCESS, CHANGED_DISPLAY_SETTINGS, CHANGED_MULTI_THREADING, CHANGED_OFFLINE_DATASTORE, CHANGED_PROCESS_SETTINGS, DATA_LOAD_COMPLETE, DESTROY_EVERYTHING, EXTERNAL_DATA_IMPORTED, GLOBAL_MEDIUM_UPDATE, GLOBAL_TIME_UPDATE, HYDROPHONE_ARRAY_CHANGED, INITIALIZATION_COMPLETE, INITIALIZE_LOADDATA, MASTER_REFERENCE_CHANGED, NEW_SCROLL_TIME, OFFLINE_DATA_LOADED, OFFLINE_PROCESS_COMPLETE, PROJECT_META_UPDATE, READY_TO_RUN, REMOVE_CONTROLLEDUNIT, REMOVE_DATABLOCK, REMOVE_PROCESS, RENAME_CONTROLLED_UNIT, REORDER_CONTROLLEDUNITS - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddControlledUnit(PamControlledUnit controlledUnit) Adds a PamControlledUnit to the controller.addModule(Frame parentFrame, PamModuleInfo moduleInfo) Add a new PamControlledUnitaddModule(PamModuleInfo moduleInfo, String moduleName) Add a module to the controller.voidaddView(PamViewInterface newView) Adds a new view to the systemvoidbooleancanClose()Can PAMGUARD shut down.static booleanCheck if PAMGuard is being controlled through the networkvoidClears the variable holding info about the unit currently being loadedbooleancontinueStart(boolean saveSettings, long startTime) Second half of the start process.static voidcreate(int runMode) Create an instance of the PAMController.static voidCreate an instance of the PAMcController.voidCreate the datamap from the databasevoidCreate a watchdog which will run independently and keep this thing going !voidvoidCalled from PamDialog whenever the OK button is pressed.voiddumpBufferStatus(String message, boolean sayEmpties) Look in every data block, particularly threaded ones, and dump the buffer status.voidenableGUIControl(boolean enable) Enables / Disables GUI for input.voidexportData(JFrame parentFrame) Show export options tp export data to other formatsvoidexportGeneralXMLSettings(JFrame parentFrame, long timeMillis) Export configuration into an XML filevoidexportSettingsAsXML(PamSettingsGroup settingsGroup) Load settings for all modules in this group, then export as XML.Find the path to the binary store ....findControlledUnit(Class unitClass, String unitName) Find the first instance of a module with a given class type and name.findControlledUnit(String unitType) Finds a PamControlledUnit of a given type but with any namefindControlledUnit(String unitType, String unitName) Finds a PamControlledUnit of a given type and namefindControlledUnits(Class unitClass) Get an Array list of PamControlledUnits of a particular class (exact matches only).findControlledUnits(Class unitClass, boolean includeSubClasses) Get an Array list of PamControlledUnits of a particular class (exact matches only).findControlledUnits(String unitType) Get a list of PamControlledUnit units of a given typefindControlledUnits(String unitType, String unitName) Get a list of PamControlledUnit units of a given type and name, allowing for nulls.findOfflineDataStore(Class sourceClass) getControlledUnit(int iUnit) Returns a reference to a PamControlledUnit within the COntrollergetDataBlock(Class blockType, int id) Find a block of a given type with the id number, or null if the number is out of range.getDataBlock(Class blockType, String name) Find a block of a given type with the given name, or null if it doesn't exist.getDataBlockByLongName(String longName) Find a block with the given long name, or null if it doesn't exist.getDataBlocks(Class blockType, boolean includeSubClasses) Returns an ArrayList of PamDataBlocks from all PamProcesses in all PamControlledUnits that contain data of a specific type.getDetectorDataBlock(int id) Gets a specific data block from the list, or null.getDetectorDataBlock(String name) Gets a specific data block from the list, or null.getDetectorEventDataBlock(int id) getFFTDataBlock(int id) Gets a specific data block from the list, or null.getFFTDataBlock(String name) Gets a specific data block from the list, or null.Get the global medium manager.Get the GUI Frame manager.Deprecated.Returns the current installation folder, or null if there was a problem determining the folder location.static PamControllerdoubleGet the Java compliance, i.e.static FrameGet the main frame if there is one.static javafx.stage.StageGets a reference to the PamModel (where all the data are stored and the algorithms are running)intGets the total number of PamControlledUnitsGet the main PAMGuard configuration (list of connected modules).intreturns the status of Pamguard.getPlottableDataBlocks(GeneralProjector generalProjector) Get the name of the psf or database used to contain settings for this run.Get the name of the psf or database used to contain settings for this run.getRawDataBlock(int id) Gets a specific data block from the list, or null.getRawDataBlock(String name) Gets a specific data block from the list, or null.intThis was within the StatusCommand class, but useful to have it here since it's needed in more than one place.intGets the Pamguard running mode.longReturns the module that is currently being loaded.intReturn a verbose level for debug outputbooleanisControlledUnit(String controlName) Check whether a controlled unit exists based on it's name.booleanbooleanvoidloadOldSettings(PamSettingsGroup settingsGroup) Called to load a specific set of PAMGUARD settings in viewer mode, which were previously loaded in from a database or binary store.voidloadOldSettings(PamSettingsGroup settingsGroup, boolean initialiseNow) Called to load a specific set of PAMGUARD settings in viewer mode, which were previously loaded in from a database or binary store.booleanCalled from the start button.voidCalled from the stop button.booleanmodelSettings(JFrame frame) Menu command to open dialog to adjust model settingsbooleanmoduleChange(int changeType) Has there been a module change AFTER initial module loading.voidnetReceiveStatus(long timeMilliseconds, int nPrepared, int nStarted, int nStopped) Called when the number of Networked remote stations changes so that the receiver can make a decision as to what to do in terms of preparing detectors, opening files, etc.voidnotifyModelChanged(int changeType) Tell the controller that the model may have changed (i.e.voidnotifyTaskProgress(PamTaskUpdate progress) Notify the PamController that progress has been made in loading something.booleanorderModules(Frame parentFrame) Take actions to alow the user to change the order modules apear in.voidpamClose()Called after canClose has returned true to finally tell all modules that PAMGUARD is definitely closing down.so they can free any resources, etc.voidpamEnded()Sent from the model when Pam ends - this can happen when a file finishes or after Pam ends following a PamStop command sent by the controllerbooleanpamStart()Start PAMGUARD.booleanpamStart(boolean saveSettings) Start PAMGuard with an option on saving settings.booleanpamStart(boolean saveSettings, long startTime) Starts PAMGuard, but with the option to save settings (to binary and to database) and also to give a specific start time for the session.voidNotification received from the model that data collection has started.voidpamStop()Stopping PAMGUARD.voidremoveControlledUnt(PamControlledUnit controlledUnit) Removes a PamControlledUnit from the controllervoidRestart PAMguard.booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidGo through all data blocks in all modules and tell them to save.voidsetInstallFolder(String installFolder) Set the install folder.voidsetManualStop(boolean manualStop) voidsetPamStatus(int pamStatus) voidvoidSetup the PAMController.voidvoidShut down Pamguardvoidvoidcalls pamStart using the SwingUtilities invokeLater command to start PAMGAURD later in the AWT event queue.voidstartLater(boolean saveSettings) voidCalled when batch processing offline tasks from the AUTOSTART functions.voidcalls pamStop using the SwingUtilities invokeLater command to stop PAMGAURD later in the AWT event queue.voidstorageOptions(JFrame parentFrame) Respond to storage options dialog.voidtoolBarStartButton(PamControlledUnit currentControlledUnit) voidtoolBarStopButton(PamControlledUnit currentControlledUnit) voidDo a total rebuild of the Pam model based on the contents of the set settings file.voidUpdates the entire datamap.voidupdateMasterClock(long timeInMillis) Gets called on a timer when NOT processing from files. 
- 
Field Details
- 
PAM_IDLE
public static final int PAM_IDLE- See Also:
 
 - 
PAM_RUNNING
public static final int PAM_RUNNING- See Also:
 
 - 
PAM_STALLED
public static final int PAM_STALLED- See Also:
 
 - 
PAM_INITIALISING
public static final int PAM_INITIALISING- See Also:
 
 - 
PAM_STOPPING
public static final int PAM_STOPPING- See Also:
 
 - 
PAM_COMPLETE
public static final int PAM_COMPLETE- See Also:
 
 - 
PAM_MAPMAKING
public static final int PAM_MAPMAKING- See Also:
 
 - 
PAM_OFFLINETASK
public static final int PAM_OFFLINETASK- See Also:
 
 - 
BUTTON_START
public static final int BUTTON_START- See Also:
 
 - 
BUTTON_STOP
public static final int BUTTON_STOP- See Also:
 
 - 
PAM_LOADINGDATA
public static final int PAM_LOADINGDATA- See Also:
 
 - 
RUN_NORMAL
public static final int RUN_NORMAL- See Also:
 
 - 
RUN_PAMVIEW
public static final int RUN_PAMVIEW- See Also:
 
 - 
RUN_MIXEDMODE
public static final int RUN_MIXEDMODE- See Also:
 
 - 
RUN_REMOTE
public static final int RUN_REMOTE- See Also:
 
 - 
RUN_NOTHING
public static final int RUN_NOTHING- See Also:
 
 - 
RUN_NETWORKRECEIVER
public static final int RUN_NETWORKRECEIVER- See Also:
 
 - 
AUTOSTART
- See Also:
 
 - 
AUTOEXIT
- See Also:
 
 - 
unitName
Never changed. Needed to identify settings for list of modules in prfx files.- See Also:
 
 - 
unitType
- See Also:
 
 - 
pamViewParameters
PamGuard view params. - 
JAVA_VERSION
public static double JAVA_VERSIONThe java version being run. e.g. Java 8u111 will be 8.111; 
 - 
 - 
Method Details
- 
create
public static void create(int runMode) Create an instance of the PAMController.- Parameters:
 runMode- - the run mode
 - 
startOfflineTasks
public void startOfflineTasks()Called when batch processing offline tasks from the AUTOSTART functions. Will start an offline task controller, which will then work it's way through the groups of tasks. - 
create
Create an instance of the PAMcController.- Parameters:
 runMode- - the run modeobject- - extra information. Can be null.
 - 
setupPamguard
public void setupPamguard()Setup the PAMController. - 
netReceiveStatus
public void netReceiveStatus(long timeMilliseconds, int nPrepared, int nStarted, int nStopped) Called when the number of Networked remote stations changes so that the receiver can make a decision as to what to do in terms of preparing detectors, opening files, etc.- Parameters:
 timeMilliseconds-nPrepared- number of remote stations currently prepared (called just before start)nStarted- number of remote stations currently startednStopped- number of remote stations currently stopped
 - 
canClose
public boolean canClose()Can PAMGUARD shut down. This question is asked in turn to every module. Each module should attempt to make sure it can answer true, e.g. by closing files, but if any module returns false, then canClose() will return false;- Returns:
 - whether it's possible to close PAMGUARD without corrupting or losing data.
 
 - 
pamClose
public void pamClose()Called after canClose has returned true to finally tell all modules that PAMGUARD is definitely closing down.so they can free any resources, etc.- Specified by:
 pamClosein interfacePamControllerInterface
 - 
shutDownPamguard
public void shutDownPamguard()Shut down Pamguard - 
saveViewerData
public void saveViewerData()Go through all data blocks in all modules and tell them to save. This has been built into PamProcess and PamDataBlock since we want it to be easy to override this for specific modules / processes / data blocks. - 
addControlledUnit
Description copied from interface:PamControllerInterfaceAdds a PamControlledUnit to the controller.- Specified by:
 addControlledUnitin interfacePamControllerInterface- Parameters:
 controlledUnit- - Reference to a PamcontrolledUnit
 - 
addModule
Description copied from interface:PamControllerInterfaceAdd a new PamControlledUnit- Specified by:
 addModulein interfacePamControllerInterface- Parameters:
 moduleInfo- Information about the PamControlled unit to add- Returns:
 - true if created sucessfully
 
 - 
addModule
Add a module to the controller.- Parameters:
 moduleInfo- - the module info i.e. the type of module to addmoduleName- - the module name.- Returns:
 
 - 
removeControlledUnt
Description copied from interface:PamControllerInterfaceRemoves a PamControlledUnit from the controller- Specified by:
 removeControlledUntin interfacePamControllerInterface- Parameters:
 controlledUnit-
 - 
orderModules
Description copied from interface:PamControllerInterfaceTake actions to alow the user to change the order modules apear in.- Specified by:
 orderModulesin interfacePamControllerInterface
 - 
getControlledUnit
Description copied from interface:PamControllerInterfaceReturns a reference to a PamControlledUnit within the COntroller- Specified by:
 getControlledUnitin interfacePamControllerInterface- Parameters:
 iUnit- Index of the unit- Returns:
 - reference to a PamControlledUnit
 
 - 
findControlledUnit
Description copied from interface:PamControllerInterfaceFinds a PamControlledUnit of a given type but with any name- Specified by:
 findControlledUnitin interfacePamControllerInterface- Parameters:
 unitType- Type of PamControlledUnit- Returns:
 - reference to PamControlledUnit
 
 - 
findControlledUnits
Get a list of PamControlledUnit units of a given type- Parameters:
 unitType- Controlled unit type- Returns:
 - list of units.
 
 - 
findControlledUnits
Get a list of PamControlledUnit units of a given type and name, allowing for nulls.- Parameters:
 unitType- Controlled unit type, can be null for all units of nameunitName- Controlled unit name, can be null for all units of type- Returns:
 - list of units.
 
 - 
findControlledUnit
Description copied from interface:PamControllerInterfaceFinds a PamControlledUnit of a given type and name- Specified by:
 findControlledUnitin interfacePamControllerInterface- Parameters:
 unitType- Type of PamControlledUnitunitName- Name of PamControlledUnit- Returns:
 - reference to PamControlledUnit
 
 - 
findControlledUnit
Find the first instance of a module with a given class type and name.Name can be null in which case the first module with the correct class will be returned
- Parameters:
 unitClass- Module class (sub class of PamControlledUnit)unitName- Module Name- Returns:
 - Existing module with that class and name.
 
 - 
findControlledUnits
Get an Array list of PamControlledUnits of a particular class (exact matches only).- Parameters:
 unitClass- PamControlledUnit class- Returns:
 - List of current instances of this class.
 
 - 
findControlledUnits
Get an Array list of PamControlledUnits of a particular class (exact matches only).- Parameters:
 unitClass- PamControlledUnit class- Returns:
 - List of current instances of this class.
 
 - 
isControlledUnit
Check whether a controlled unit exists based on it's name.- Parameters:
 the- controlled unit name e.g. "my crazy click detector", not the default name.
 - 
getNumControlledUnits
public int getNumControlledUnits()Description copied from interface:PamControllerInterfaceGets the total number of PamControlledUnits- Specified by:
 getNumControlledUnitsin interfacePamControllerInterface- Returns:
 - the number of PamControlledUnits
 
 - 
getInstance
 - 
getModelInterface
Description copied from interface:PamControllerInterfaceGets a reference to the PamModel (where all the data are stored and the algorithms are running)- Specified by:
 getModelInterfacein interfacePamControllerInterface- Returns:
 - Reference to the PamGuard model
 
 - 
addView
Description copied from interface:PamControllerInterfaceAdds a new view to the system- Specified by:
 addViewin interfacePamControllerInterface- Parameters:
 newView-
 - 
showControlledUnit
 - 
restartPamguard
public void restartPamguard()Restart PAMguard. Can be called when something is mildly wrong such as a DAQ glitch, so that acquisition is stopped and restarted. - 
startLater
public void startLater()calls pamStart using the SwingUtilities invokeLater command to start PAMGAURD later in the AWT event queue. - 
startLater
public void startLater(boolean saveSettings)  - 
stopLater
public void stopLater()calls pamStop using the SwingUtilities invokeLater command to stop PAMGAURD later in the AWT event queue. - 
manualStart
public boolean manualStart()Called from the start button. A little book keeping to distinguish this from automatic starts / restarts- Specified by:
 manualStartin interfacePamControllerInterface- Returns:
 - true if started.
 
 - 
manualStop
public void manualStop()Called from the stop button. A little book keeping to distinguish this from automatic starts / restarts- Specified by:
 manualStopin interfacePamControllerInterface
 - 
pamStart
public boolean pamStart()Start PAMGUARD. This function also gets called from the GUI menu start button and from the Network control system.As well as actually starting PAMGUARD it will write settings to the database and to the binary data store.
- Specified by:
 pamStartin interfacePamControllerInterface- Returns:
 - true if all modules start successfully
 
 - 
pamStart
public boolean pamStart(boolean saveSettings) Start PAMGuard with an option on saving settings.- Parameters:
 saveSettings- flag to save settings to database and binary store- Returns:
 - true if all modules start successfully
 
 - 
pamStart
public boolean pamStart(boolean saveSettings, long startTime) Starts PAMGuard, but with the option to save settings (to binary and to database) and also to give a specific start time for the session. When data are being received over the network, this may be in the past !- Parameters:
 saveSettings- flag to say whether or not settings should be saved.startTime- start time in millis- Returns:
 - true if all modules start successfully
 
 - 
continueStart
public boolean continueStart(boolean saveSettings, long startTime) Second half of the start process. This was originally in pamStart, but had to be split out, so that the reprocessManager checks can run in a separate thread in order to display a progress bar as files are catalogued.- Parameters:
 saveSettings-startTime-- Returns:
 
 - 
pamStop
public void pamStop()Stopping PAMGUARD. Harder than you might think ! First a pamStop() is sent to all processes, then once that's done, a pamHasStopped is sent to all Controllers.This is necessary when running in a multi-thread mode since some processes may still be receiving data and may still pass if on to other downstream processes, storage, etc.
- Specified by:
 pamStopin interfacePamControllerInterface
 - 
dumpBufferStatus
Look in every data block, particularly threaded ones, and dump the buffer status. This will have to go via PamProcess so that additional information can be added from any processes that hold additional data in other internal buffers.- Parameters:
 message- Message to print prior to dumping buffers for debug.sayEmpties- dump info even if a buffer is empty (otherwise, only ones that have stuff still)
 - 
batchProcessingComplete
public void batchProcessingComplete() - 
exportGeneralXMLSettings
Export configuration into an XML file- Parameters:
 parentFrame-timeMillis- time stamp that will get added to file name and content.
 - 
findBinaryStorePath
Find the path to the binary store ....- Returns:
 - path to the binary store.
 
 - 
findSettingsSources
- Returns:
 - a list of PamControlledUnits which implements the PamSettingsSource interface
 - See Also:
 
 - 
modelSettings
Description copied from interface:PamControllerInterfaceMenu command to open dialog to adjust model settings- Specified by:
 modelSettingsin interfacePamControllerInterface- Returns:
 - true if dialog returned Ok.
 
 - 
pamStarted
public void pamStarted()Description copied from interface:PamControllerInterfaceNotification received from the model that data collection has started.- Specified by:
 pamStartedin interfacePamControllerInterface
 - 
pamEnded
public void pamEnded()Description copied from interface:PamControllerInterfaceSent from the model when Pam ends - this can happen when a file finishes or after Pam ends following a PamStop command sent by the controller- Specified by:
 pamEndedin interfacePamControllerInterface
 - 
getFFTDataBlocks
- Specified by:
 getFFTDataBlocksin interfacePamControllerInterface- Returns:
 - List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain FFT data.
 
 - 
getFFTDataBlock
Description copied from interface:PamControllerInterfaceGets a specific data block from the list, or null.- Specified by:
 getFFTDataBlockin interfacePamControllerInterface- Parameters:
 id-- Returns:
 - an FFT data block at index id within Pamguards list of FFT type data blocks
 
 - 
getFFTDataBlock
Description copied from interface:PamControllerInterfaceGets a specific data block from the list, or null.- Specified by:
 getFFTDataBlockin interfacePamControllerInterface- Parameters:
 name-- Returns:
 - the first FFT data block at with the given name within Pamguards list of FFT type data blocks
 
 - 
getRawDataBlocks
- Specified by:
 getRawDataBlocksin interfacePamControllerInterface- Returns:
 - List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain raw audio data.
 
 - 
getRawDataBlock
Description copied from interface:PamControllerInterfaceGets a specific data block from the list, or null.- Specified by:
 getRawDataBlockin interfacePamControllerInterface- Parameters:
 id-- Returns:
 - a raw data block at index id within Pamguards list of RAW type data blocks
 
 - 
getRawDataBlock
Description copied from interface:PamControllerInterfaceGets a specific data block from the list, or null.- Specified by:
 getRawDataBlockin interfacePamControllerInterface- Parameters:
 name-- Returns:
 - the first raw data block at with the given name within Pamguards list of RAW type data blocks
 
 - 
getDetectorDataBlocks
- Specified by:
 getDetectorDataBlocksin interfacePamControllerInterface- Returns:
 - List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain detector output data.
 
 - 
getDetectorDataBlock
Description copied from interface:PamControllerInterfaceGets a specific data block from the list, or null.- Specified by:
 getDetectorDataBlockin interfacePamControllerInterface- Parameters:
 id-- Returns:
 - PamDataBlock -- a detector data block at index id within Pamguard's list of RAW type data blocks.
 
 - 
getDetectorDataBlock
Description copied from interface:PamControllerInterfaceGets a specific data block from the list, or null.- Specified by:
 getDetectorDataBlockin interfacePamControllerInterface- Parameters:
 name-- Returns:
 - PamDataBlock -- the first detector data block with the given name within Pamguard's list of DETECTOR type data blocks.
 
 - 
getDetectorEventDataBlocks
- Specified by:
 getDetectorEventDataBlocksin interfacePamControllerInterface- Returns:
 - List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain data of a specific type.
 
 - 
getDetectorEventDataBlock
- Specified by:
 getDetectorEventDataBlockin interfacePamControllerInterface
 - 
getDetectorEventDataBlock
- Specified by:
 getDetectorEventDataBlockin interfacePamControllerInterface
 - 
getDataBlocks
Description copied from interface:PamControllerInterfaceReturns an ArrayList of PamDataBlocks from all PamProcesses in all PamControlledUnits that contain data of a specific type. In order to return a list of PamDataBlocks that contain objects implementing a certain interface (such as AcousticDataUnit or PamDetection), the includeSubClasses boolean must be TRUE- Specified by:
 getDataBlocksin interfacePamControllerInterface- Parameters:
 blockType- DataType of PamDatablockincludeSubClasses- whether or not to include classes that extend/implement the blockType parameter.- Returns:
 - List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain data of a specific type.
 
 - 
getDataBlocks
- Specified by:
 getDataBlocksin interfacePamControllerInterface- Returns:
 - All data blocks
 
 - 
getPlottableDataBlocks
 - 
getDataBlock
Find a block of a given type with the id number, or null if the number is out of range.- Specified by:
 getDataBlockin interfacePamControllerInterface- Parameters:
 blockType-id- -- the block id number- Returns:
 - block, which you may want to cast to a subtype
 
 - 
getDataBlock
Find a block of a given type with the given name, or null if it doesn't exist.- Specified by:
 getDataBlockin interfacePamControllerInterface- Parameters:
 blockType- -- RAW, FFT, DETECTOR, null, etc.name- -- the block name- Returns:
 - block, which you may want to cast to a subtype
 
 - 
getDataBlockByLongName
Find a block with the given long name, or null if it doesn't exist.- Parameters:
 longName- the long name of the PamDataBlock- Returns:
 - block
 
 - 
findOfflineDataStores
- Returns:
 - a list of offline data sources.
 
 - 
findOfflineDataStore
 - 
updateDataMap
public void updateDataMap()Updates the entire datamap. - 
createDataMap
public void createDataMap()Create the datamap from the database - 
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from interface:PamControllerInterfaceTell the controller that the model may have changed (i.e. a process connection changed, or a process added, etc.) This will be passes on to the view and used by the controller as necessary.- Specified by:
 notifyModelChangedin interfacePamControllerInterface- See Also:
 
 - 
moduleChange
public boolean moduleChange(int changeType) Has there been a module change AFTER initial module loading.- Parameters:
 changeType-- Returns:
 - true if modules added or removed after initialisation complete
 
 - 
setupGarbageCollector
public void setupGarbageCollector() - 
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
 
 - 
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
 
 - 
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
 
 - 
destroyModel
public void destroyModel() - 
totalModelRebuild
public void totalModelRebuild()Description copied from interface:PamControllerInterfaceDo a total rebuild of the Pam model based on the contents of the set settings file.- Specified by:
 totalModelRebuildin interfacePamControllerInterface
 - 
getPamStatus
public int getPamStatus()returns the status of Pamguard. The available status' will depend on the run mode. For instance, if run mode is RUN_NORMAL then status can be either PAM_IDLE or PAM_RUNNING.- Returns:
 - Pamguard status
 
 - 
setPamStatus
public void setPamStatus(int pamStatus)  - 
getRealStatus
public int getRealStatus()This was within the StatusCommand class, but useful to have it here since it's needed in more than one place. In viewer mode at startup there are a number of things going on in different threads, such as the creation of datamaps, and this can (hopefully) handle those bespoke goings on.- Returns:
 - program status for multithreaded statup tasks.
 
 - 
getRunMode
public int getRunMode()Gets the Pamguard running mode. This is set at startup (generally through slightly different versions of the main class). It will be one of RUN_NORMAL RUN_PAMVIEW RUN_MIXEDMODE- Returns:
 - Pamguards run mode
 
 - 
getRunModeName
 - 
isInitializationComplete
public boolean isInitializationComplete() - 
dialogOKButtonPressed
public void dialogOKButtonPressed()Called from PamDialog whenever the OK button is pressed. Don't do anything immediately to give the module that opened the dialog time to respond to it's closing (e.g. make the new settings from the dialog it's default). Use invokeLater to send out a message as soon as the awt que is clear. - 
enableGUIControl
public void enableGUIControl(boolean enable) Enables / Disables GUI for input. This is used when data are being loaded in viewer mode to prevetn impatient users from clicking on extra things while long background processes take place.Many of the processes loading data are run in the background in SwingWorker threads scheduled with the AWTScheduler so that they are able to update progress on teh screen
- Parameters:
 enable- enable or disable the GUI.
 - 
loadOldSettings
Called to load a specific set of PAMGUARD settings in viewer mode, which were previously loaded in from a database or binary store.- Parameters:
 settingsGroup- settings informationinitialiseNow- Immediately data are loaded, initialise which will load data from storages.
 - 
loadOldSettings
Called to load a specific set of PAMGUARD settings in viewer mode, which were previously loaded in from a database or binary store.- Parameters:
 settingsGroup- settings informationinitialiseNow- Immediately data are loaded, initialise which will load data from storages.
 - 
exportSettingsAsXML
Load settings for all modules in this group, then export as XML.- Parameters:
 settingsGroup-
 - 
getPSFName
Get the name of the psf or database used to contain settings for this run.- Returns:
 - name of psf or database
 
 - 
getPSFNameWithPath
Get the name of the psf or database used to contain settings for this run.- Returns:
 - name of psf or database
 
 - 
toolBarStartButton
 - 
toolBarStopButton
 - 
storageOptions
Respond to storage options dialog. Selects whether data are stored in binary, database or both- Parameters:
 parentFrame-
 - 
exportData
Show export options tp export data to other formats- Parameters:
 parentFrame-
 - 
getVerboseLevel
public int getVerboseLevel()Return a verbose level for debug output- Returns:
 - a verbose level for debug output.
 
 - 
createWatchDog
public void createWatchDog()Create a watchdog which will run independently and keep this thing going ! - 
getUidManager
- Returns:
 - the uidManager
 
 - 
getUnitBeingLoaded
Returns the module that is currently being loaded. If null, it means we aren't loading anything right now- Returns:
 
 - 
clearLoadedUnit
public void clearLoadedUnit()Clears the variable holding info about the unit currently being loaded - 
getJCompliance
public double getJCompliance()Get the Java compliance, i.e. what Java version is running.- Returns:
 - integer value of java version e.g. Java 8 is return 1.8
 
 - 
notifyTaskProgress
Notify the PamController that progress has been made in loading something.- Parameters:
 progress- - holds progress info.
 - 
checkIfNetworkControlled
public static boolean checkIfNetworkControlled()Check if PAMGuard is being controlled through the network- Returns:
 - true if network controlled, false otherwise
 
 - 
getInstallFolder
Returns the current installation folder, or null if there was a problem determining the folder location. Note that the default file separator is included at the end of the string.- Returns:
 
 - 
getMainFrame
Get the main frame if there is one. Can be used by dialogs when no one else has sorted out a frame reference to pass to them.- Returns:
 - reference to main GUI frame.
 
 - 
getGuiFrameManager
Description copied from interface:PamControllerInterfaceGet the GUI Frame manager.- Specified by:
 getGuiFrameManagerin interfacePamControllerInterface- Returns:
 - GUIFrameManager
 
 - 
sortFrameTitles
public void sortFrameTitles() - 
getGuiManagerFX
Deprecated.FX Gui - 
getMainStage
public static javafx.stage.Stage getMainStage() - 
setInstallFolder
Set the install folder.- Parameters:
 installFolder-
 - 
getGlobalTimeManager
- Returns:
 - the globalTimeManager
 
 - 
isManualStop
public boolean isManualStop()- Returns:
 - the manualStop
 
 - 
setManualStop
public void setManualStop(boolean manualStop) - Parameters:
 manualStop- the manualStop to set
 - 
getWatchdogComms
- Returns:
 - the watchdogComms
 
 - 
getGlobalMediumManager
Get the global medium manager. This indicates whether PG is being used in air or water and handles things like dB references, default sound speed etc.- Returns:
 - the global medium manager;
 
 - 
getPamConfiguration
Get the main PAMGuard configuration (list of connected modules).- Returns:
 - the pamConfiguration
 
 - 
updateMasterClock
public void updateMasterClock(long timeInMillis) Gets called on a timer when NOT processing from files. OR if processing files, gets called whenever the Calendar session start time or file time millis gets updated.- Parameters:
 timeInMillis-
 
 -