To make a PAMGUARD plug-in available to PAMGUARD users it is necessary to edit
the java file pammodel/PamModel.java.
First you register the module with PAMGUARD using
PamModuleInfo myModule = PamModuleInfo.registerControlledUnit(String className, String description);where className is the class name of the class PamControlledUnit and description is the descriptive name of the module.
For example
PamModuleInfo myModule = PamModuleInfo.registerControlledUnit("GPS.GPSControl", "GPS Processing");adds the GPS module.
The module will now be listed in the PAMGUARD File/Add Modules menu from where the user can create instances of the module.
The PAMGUARD settings manager will be aware of the new module and will automatically create the module the next time PAMGUARD is run.
myModule.setModulesMenuGroup(mapsGroup);
You can set module dependencies using
PamModuleInfo.addDependency(PamDependency dependancy)for example
myModule.addDependency(new PamDependency(NMEADataUnit.class, "NMEA.NMEAControl"));tells PAMGUARD that myModule is dependent on some source of NMEADataUnit and that a possible source of this type of data is the NMEA.NMEAControl module.
Note that some types of data may be produced by many different modules, so here you should specify the most common source of the data your module will use.
PamModuleInfo.setMinNumber(int minNumber) and PamModuleInfo.setMaxNumber(int maxNumber)to set the minimum and maximum numbers of a given module type.
If these are not set (which is generally the case), then the minimum number defaults to zero and there is no maximum number.
If you set a minimum number, then PAMGUARD will automatically create that number of modules at start up.
If you set a maximum number then PAMGUARD will prevent you from creating more than that number of modules.