Package PamController

Class PamController

java.lang.Object
PamController.PamController
All Implemented Interfaces:
PamControllerInterface, PamSettings, SettingsNameProvider

public class PamController extends Object implements PamControllerInterface, PamSettings
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 Details Link icon

  • Method Details Link icon

    • create Link icon

      public static void create(int runMode)
      Create an instance of the PAMController.
      Parameters:
      runMode - - the run mode
    • startOfflineTasks Link icon

      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 Link icon

      public static void create(int runMode, Object object)
      Create an instance of the PAMcController.
      Parameters:
      runMode - - the run mode
      object - - extra information. Can be null.
    • setupPamguard Link icon

      public void setupPamguard()
      Setup the PAMController.
    • netReceiveStatus Link icon

      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 started
      nStopped - number of remote stations currently stopped
    • canClose Link icon

      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 Link icon

      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:
      pamClose in interface PamControllerInterface
    • shutDownPamguard Link icon

      public void shutDownPamguard()
      Shut down Pamguard
    • saveViewerData Link icon

      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 Link icon

      public void addControlledUnit(PamControlledUnit controlledUnit)
      Description copied from interface: PamControllerInterface
      Adds a PamControlledUnit to the controller.
      Specified by:
      addControlledUnit in interface PamControllerInterface
      Parameters:
      controlledUnit - - Reference to a PamcontrolledUnit
    • addModule Link icon

      public PamControlledUnit addModule(Frame parentFrame, PamModuleInfo moduleInfo)
      Description copied from interface: PamControllerInterface
      Add a new PamControlledUnit
      Specified by:
      addModule in interface PamControllerInterface
      Parameters:
      moduleInfo - Information about the PamControlled unit to add
      Returns:
      true if created sucessfully
    • addModule Link icon

      public PamControlledUnit addModule(PamModuleInfo moduleInfo, String moduleName)
      Add a module to the controller.
      Parameters:
      moduleInfo - - the module info i.e. the type of module to add
      moduleName - - the module name.
      Returns:
    • removeControlledUnt Link icon

      public void removeControlledUnt(PamControlledUnit controlledUnit)
      Description copied from interface: PamControllerInterface
      Removes a PamControlledUnit from the controller
      Specified by:
      removeControlledUnt in interface PamControllerInterface
      Parameters:
      controlledUnit -
    • orderModules Link icon

      public boolean orderModules(Frame parentFrame)
      Description copied from interface: PamControllerInterface
      Take actions to alow the user to change the order modules apear in.
      Specified by:
      orderModules in interface PamControllerInterface
    • getControlledUnit Link icon

      public PamControlledUnit getControlledUnit(int iUnit)
      Description copied from interface: PamControllerInterface
      Returns a reference to a PamControlledUnit within the COntroller
      Specified by:
      getControlledUnit in interface PamControllerInterface
      Parameters:
      iUnit - Index of the unit
      Returns:
      reference to a PamControlledUnit
    • findControlledUnit Link icon

      public PamControlledUnit findControlledUnit(String unitType)
      Description copied from interface: PamControllerInterface
      Finds a PamControlledUnit of a given type but with any name
      Specified by:
      findControlledUnit in interface PamControllerInterface
      Parameters:
      unitType - Type of PamControlledUnit
      Returns:
      reference to PamControlledUnit
    • findControlledUnits Link icon

      public ArrayList<PamControlledUnit> findControlledUnits(String unitType)
      Get a list of PamControlledUnit units of a given type
      Parameters:
      unitType - Controlled unit type
      Returns:
      list of units.
    • findControlledUnits Link icon

      public ArrayList<PamControlledUnit> findControlledUnits(String unitType, String unitName)
      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 name
      unitName - Controlled unit name, can be null for all units of type
      Returns:
      list of units.
    • findControlledUnit Link icon

      public PamControlledUnit findControlledUnit(String unitType, String unitName)
      Description copied from interface: PamControllerInterface
      Finds a PamControlledUnit of a given type and name
      Specified by:
      findControlledUnit in interface PamControllerInterface
      Parameters:
      unitType - Type of PamControlledUnit
      unitName - Name of PamControlledUnit
      Returns:
      reference to PamControlledUnit
    • findControlledUnit Link icon

      public PamControlledUnit findControlledUnit(Class unitClass, String unitName)
      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 Link icon

      public ArrayList<PamControlledUnit> findControlledUnits(Class unitClass)
      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 Link icon

      public ArrayList<PamControlledUnit> findControlledUnits(Class unitClass, boolean includeSubClasses)
      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 Link icon

      public boolean isControlledUnit(String controlName)
      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 Link icon

      public int getNumControlledUnits()
      Description copied from interface: PamControllerInterface
      Gets the total number of PamControlledUnits
      Specified by:
      getNumControlledUnits in interface PamControllerInterface
      Returns:
      the number of PamControlledUnits
    • getInstance Link icon

      public static PamController getInstance()
    • getModelInterface Link icon

      public PamModel getModelInterface()
      Description copied from interface: PamControllerInterface
      Gets a reference to the PamModel (where all the data are stored and the algorithms are running)
      Specified by:
      getModelInterface in interface PamControllerInterface
      Returns:
      Reference to the PamGuard model
    • addView Link icon

      public void addView(PamViewInterface newView)
      Description copied from interface: PamControllerInterface
      Adds a new view to the system
      Specified by:
      addView in interface PamControllerInterface
      Parameters:
      newView -
    • showControlledUnit Link icon

      public void showControlledUnit(PamControlledUnit unit)
    • restartPamguard Link icon

      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 Link icon

      public void startLater()
      calls pamStart using the SwingUtilities invokeLater command to start PAMGAURD later in the AWT event queue.
    • startLater Link icon

      public void startLater(boolean saveSettings)
    • stopLater Link icon

      public void stopLater()
      calls pamStop using the SwingUtilities invokeLater command to stop PAMGAURD later in the AWT event queue.
    • manualStart Link icon

      public boolean manualStart()
      Called from the start button. A little book keeping to distinguish this from automatic starts / restarts
      Specified by:
      manualStart in interface PamControllerInterface
      Returns:
      true if started.
    • manualStop Link icon

      public void manualStop()
      Called from the stop button. A little book keeping to distinguish this from automatic starts / restarts
      Specified by:
      manualStop in interface PamControllerInterface
    • pamStart Link icon

      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:
      pamStart in interface PamControllerInterface
      Returns:
      true if all modules start successfully
    • pamStart Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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:
      pamStop in interface PamControllerInterface
    • dumpBufferStatus Link icon

      public void dumpBufferStatus(String message, boolean sayEmpties)
      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 Link icon

      public void batchProcessingComplete()
    • exportGeneralXMLSettings Link icon

      public void exportGeneralXMLSettings(JFrame parentFrame, long timeMillis)
      Export configuration into an XML file
      Parameters:
      parentFrame -
      timeMillis - time stamp that will get added to file name and content.
    • findBinaryStorePath Link icon

      public String findBinaryStorePath()
      Find the path to the binary store ....
      Returns:
      path to the binary store.
    • findSettingsSources Link icon

      public ArrayList<PamSettingsSource> findSettingsSources()
      Returns:
      a list of PamControlledUnits which implements the PamSettingsSource interface
      See Also:
    • modelSettings Link icon

      public boolean modelSettings(JFrame frame)
      Description copied from interface: PamControllerInterface
      Menu command to open dialog to adjust model settings
      Specified by:
      modelSettings in interface PamControllerInterface
      Returns:
      true if dialog returned Ok.
    • pamStarted Link icon

      public void pamStarted()
      Description copied from interface: PamControllerInterface
      Notification received from the model that data collection has started.
      Specified by:
      pamStarted in interface PamControllerInterface
    • pamEnded Link icon

      public void pamEnded()
      Description copied from interface: PamControllerInterface
      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 controller
      Specified by:
      pamEnded in interface PamControllerInterface
    • getFFTDataBlocks Link icon

      public ArrayList<PamDataBlock> getFFTDataBlocks()
      Specified by:
      getFFTDataBlocks in interface PamControllerInterface
      Returns:
      List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain FFT data.
    • getFFTDataBlock Link icon

      public PamDataBlock getFFTDataBlock(int id)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getFFTDataBlock in interface PamControllerInterface
      Parameters:
      id -
      Returns:
      an FFT data block at index id within Pamguards list of FFT type data blocks
    • getFFTDataBlock Link icon

      public PamDataBlock getFFTDataBlock(String name)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getFFTDataBlock in interface PamControllerInterface
      Parameters:
      name -
      Returns:
      the first FFT data block at with the given name within Pamguards list of FFT type data blocks
    • getRawDataBlocks Link icon

      public ArrayList<PamDataBlock> getRawDataBlocks()
      Specified by:
      getRawDataBlocks in interface PamControllerInterface
      Returns:
      List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain raw audio data.
    • getRawDataBlock Link icon

      public PamRawDataBlock getRawDataBlock(int id)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getRawDataBlock in interface PamControllerInterface
      Parameters:
      id -
      Returns:
      a raw data block at index id within Pamguards list of RAW type data blocks
    • getRawDataBlock Link icon

      public PamRawDataBlock getRawDataBlock(String name)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getRawDataBlock in interface PamControllerInterface
      Parameters:
      name -
      Returns:
      the first raw data block at with the given name within Pamguards list of RAW type data blocks
    • getDetectorDataBlocks Link icon

      public ArrayList<PamDataBlock> getDetectorDataBlocks()
      Specified by:
      getDetectorDataBlocks in interface PamControllerInterface
      Returns:
      List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain detector output data.
    • getDetectorDataBlock Link icon

      public PamDataBlock getDetectorDataBlock(int id)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getDetectorDataBlock in interface PamControllerInterface
      Parameters:
      id -
      Returns:
      PamDataBlock -- a detector data block at index id within Pamguard's list of RAW type data blocks.
    • getDetectorDataBlock Link icon

      public PamDataBlock getDetectorDataBlock(String name)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getDetectorDataBlock in interface PamControllerInterface
      Parameters:
      name -
      Returns:
      PamDataBlock -- the first detector data block with the given name within Pamguard's list of DETECTOR type data blocks.
    • getDetectorEventDataBlocks Link icon

      public ArrayList<PamDataBlock> getDetectorEventDataBlocks()
      Specified by:
      getDetectorEventDataBlocks in interface PamControllerInterface
      Returns:
      List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain data of a specific type.
    • getDetectorEventDataBlock Link icon

      public PamDataBlock getDetectorEventDataBlock(int id)
      Specified by:
      getDetectorEventDataBlock in interface PamControllerInterface
    • getDetectorEventDataBlock Link icon

      public PamDataBlock getDetectorEventDataBlock(String name)
      Specified by:
      getDetectorEventDataBlock in interface PamControllerInterface
    • getDataBlocks Link icon

      public ArrayList<PamDataBlock> getDataBlocks(Class blockType, boolean includeSubClasses)
      Description copied from interface: PamControllerInterface
      Returns 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:
      getDataBlocks in interface PamControllerInterface
      Parameters:
      blockType - DataType of PamDatablock
      includeSubClasses - 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 Link icon

      public ArrayList<PamDataBlock> getDataBlocks()
      Specified by:
      getDataBlocks in interface PamControllerInterface
      Returns:
      All data blocks
    • getPlottableDataBlocks Link icon

      public ArrayList<PamDataBlock> getPlottableDataBlocks(GeneralProjector generalProjector)
    • getDataBlock Link icon

      public PamDataBlock getDataBlock(Class blockType, int id)
      Find a block of a given type with the id number, or null if the number is out of range.
      Specified by:
      getDataBlock in interface PamControllerInterface
      Parameters:
      blockType -
      id - -- the block id number
      Returns:
      block, which you may want to cast to a subtype
    • getDataBlock Link icon

      public PamDataBlock getDataBlock(Class blockType, String name)
      Find a block of a given type with the given name, or null if it doesn't exist.
      Specified by:
      getDataBlock in interface PamControllerInterface
      Parameters:
      blockType - -- RAW, FFT, DETECTOR, null, etc.
      name - -- the block name
      Returns:
      block, which you may want to cast to a subtype
    • getDataBlockByLongName Link icon

      public PamDataBlock getDataBlockByLongName(String longName)
      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 Link icon

      public ArrayList<OfflineDataStore> findOfflineDataStores()
      Returns:
      a list of offline data sources.
    • findOfflineDataStore Link icon

      public OfflineDataStore findOfflineDataStore(Class sourceClass)
    • updateDataMap Link icon

      public void updateDataMap()
      Updates the entire datamap.
    • createDataMap Link icon

      public void createDataMap()
      Create the datamap from the database
    • notifyModelChanged Link icon

      public void notifyModelChanged(int changeType)
      Description copied from interface: PamControllerInterface
      Tell 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:
      notifyModelChanged in interface PamControllerInterface
      See Also:
      • invalid reference
        values are
         
        1. CHANGED_PROCESS_SETTINGS
        2. ADD_PROCESS
        3. REMOVE_PROCESS
        4. ADD_DATABLOCK
        5. REMOVE_DATABLOCK
        6. ADD_CONTROLLEDUNIT
        7. REMOVE_CONTROLLEDUNIT
        8. REORDER_CONTROLLEDUNITS
        9. INITIALIZATION_COMPLETE
        10. DESTROY_EVERYTHING
        11. RENAME_CONTROLLED_UNIT
        12. NEW_VIEW_TIMES
        13. NEW_VIEW_TIME
        14. CHANGED_DISPLAY_SETTINGS
        15. CHANGED_MULTI_THREADING
        16. HYDROPHONE_ARRAY_CHANGED
        17. EXTERNAL_DATA_LOADED
    • moduleChange Link icon

      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 Link icon

      public void setupGarbageCollector()
    • getSettingsReference Link icon

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion Link icon

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • getUnitName Link icon

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType Link icon

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Returns:
      A Name specific to the type, e.g. Click detector
    • restoreSettings Link icon

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      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 Link icon

      public void destroyModel()
    • totalModelRebuild Link icon

      public void totalModelRebuild()
      Description copied from interface: PamControllerInterface
      Do a total rebuild of the Pam model based on the contents of the set settings file.
      Specified by:
      totalModelRebuild in interface PamControllerInterface
    • getPamStatus Link icon

      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 Link icon

      public void setPamStatus(int pamStatus)
    • getRealStatus Link icon

      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 Link icon

      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 Link icon

      public String getRunModeName()
    • isInitializationComplete Link icon

      public boolean isInitializationComplete()
    • dialogOKButtonPressed Link icon

      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 Link icon

      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 Link icon

      public void loadOldSettings(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.
      Parameters:
      settingsGroup - settings information
      initialiseNow - Immediately data are loaded, initialise which will load data from storages.
    • loadOldSettings Link icon

      public void loadOldSettings(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.
      Parameters:
      settingsGroup - settings information
      initialiseNow - Immediately data are loaded, initialise which will load data from storages.
    • exportSettingsAsXML Link icon

      public void exportSettingsAsXML(PamSettingsGroup settingsGroup)
      Load settings for all modules in this group, then export as XML.
      Parameters:
      settingsGroup -
    • getPSFName Link icon

      public String getPSFName()
      Get the name of the psf or database used to contain settings for this run.
      Returns:
      name of psf or database
    • getPSFNameWithPath Link icon

      public String getPSFNameWithPath()
      Get the name of the psf or database used to contain settings for this run.
      Returns:
      name of psf or database
    • toolBarStartButton Link icon

      public void toolBarStartButton(PamControlledUnit currentControlledUnit)
    • toolBarStopButton Link icon

      public void toolBarStopButton(PamControlledUnit currentControlledUnit)
    • storageOptions Link icon

      public void storageOptions(JFrame parentFrame)
      Respond to storage options dialog. Selects whether data are stored in binary, database or both
      Parameters:
      parentFrame -
    • exportData Link icon

      public void exportData(JFrame parentFrame)
      Show export options tp export data to other formats
      Parameters:
      parentFrame -
    • getVerboseLevel Link icon

      public int getVerboseLevel()
      Return a verbose level for debug output
      Returns:
      a verbose level for debug output.
    • createWatchDog Link icon

      public void createWatchDog()
      Create a watchdog which will run independently and keep this thing going !
    • getUidManager Link icon

      public UIDManager getUidManager()
      Returns:
      the uidManager
    • getUnitBeingLoaded Link icon

      public PamControlledUnit getUnitBeingLoaded()
      Returns the module that is currently being loaded. If null, it means we aren't loading anything right now
      Returns:
    • clearLoadedUnit Link icon

      public void clearLoadedUnit()
      Clears the variable holding info about the unit currently being loaded
    • getJCompliance Link icon

      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 Link icon

      public void notifyTaskProgress(PamTaskUpdate progress)
      Notify the PamController that progress has been made in loading something.
      Parameters:
      progress - - holds progress info.
    • checkIfNetworkControlled Link icon

      public static boolean checkIfNetworkControlled()
      Check if PAMGuard is being controlled through the network
      Returns:
      true if network controlled, false otherwise
    • getInstallFolder Link icon

      public String 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 Link icon

      public static Frame 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 Link icon

      public GuiFrameManager getGuiFrameManager()
      Description copied from interface: PamControllerInterface
      Get the GUI Frame manager.
      Specified by:
      getGuiFrameManager in interface PamControllerInterface
      Returns:
      GUIFrameManager
    • sortFrameTitles Link icon

      public void sortFrameTitles()
    • getGuiManagerFX Link icon

      @Deprecated public PamGuiManagerFX getGuiManagerFX()
      Deprecated.
      FX Gui
    • getMainStage Link icon

      public static javafx.stage.Stage getMainStage()
    • setInstallFolder Link icon

      public void setInstallFolder(String installFolder)
      Set the install folder.
      Parameters:
      installFolder -
    • getGlobalTimeManager Link icon

      public GlobalTimeManager getGlobalTimeManager()
      Returns:
      the globalTimeManager
    • isManualStop Link icon

      public boolean isManualStop()
      Returns:
      the manualStop
    • setManualStop Link icon

      public void setManualStop(boolean manualStop)
      Parameters:
      manualStop - the manualStop to set
    • getWatchdogComms Link icon

      public WatchdogComms getWatchdogComms()
      Returns:
      the watchdogComms
    • getGlobalMediumManager Link icon

      public GlobalMediumManager 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 Link icon

      public PamConfiguration getPamConfiguration()
      Get the main PAMGuard configuration (list of connected modules).
      Returns:
      the pamConfiguration
    • updateMasterClock Link icon

      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 -