Package PamModel
Class PamModel
java.lang.Object
PamModel.PamModel
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
- Author:
- Doug Gillespie Simple creation of a PAM model, but using the correct interface for the PamController.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Creates a list of available Pamguard modules and sets dependencies between themReturn a list of DAQ Systems found in the plugins folderstatic PamModel
Return a list of the plugins found in the plugin folderlong
boolean
void
Method to load jar files containing plugins, found in the plugins folderboolean
modelSettings
(JFrame frame) boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
setGpsDataBlock
(PamDataBlock gpsDataBlock) void
setMultithreading
(boolean multithreading) Set multithreading for all of PAMGUARD.void
setPluginBeingLoaded
(String pluginBeingLoaded) boolean
Add any remaining REQUIRED modules.
this get's called after the PamController has loaded it's main settings.void
-
Constructor Details
-
PamModel
- Parameters:
pamController
- Needs to be parsed a valid reference to a PamController
-
-
Method Details
-
getPamModel
-
setGpsDataBlock
-
createPamModel
public void createPamModel()Creates a list of available Pamguard modules and sets dependencies between themShould ony ever be called once immediately after the model has been created !!!!!!.
Also sets grouping which are used for menu construction and the minimum and maximum numbers of each type of module that may get created.
-
startModel
public boolean startModel()Add any remaining REQUIRED modules.
this get's called after the PamController has loaded it's main settings. So at this point, go through all the PamModuleInfo's and check that all have at least the minimum number required- Returns:
- true
-
stopModel
public void stopModel() -
modelSettings
-
setMultithreading
public void setMultithreading(boolean multithreading) Set multithreading for all of PAMGUARD.Be warned that this function should very rarely ever be called and has been included only so that the Likelihood detector can turn off multithreading. Once multithreading has been debugged in the Likelihood detector, this function will be removed or deprecated.
- Parameters:
multithreading
-
-
getDependencyManager
- Returns:
- Returns the dependencyManager.
-
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
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- 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
- Returns:
- A Name specific to the type, e.g. Click detector
-
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
-
isMultiThread
public boolean isMultiThread() -
getPamModelSettings
-
loadPlugins
Method to load jar files containing plugins, found in the plugins folder -
getPluginList
Return a list of the plugins found in the plugin folder- Returns:
-
getDaqList
Return a list of DAQ Systems found in the plugins folder- Returns:
-
getPluginBeingLoaded
-
setPluginBeingLoaded
-
clearPluginBeingLoaded
public void clearPluginBeingLoaded() -
getClassLoader
-