All PAMGUARD plug-ins are subclasses of PamControlledUnit
To make a plug in, first create a subclass of PamControlledUnit,
adding to the subclass the various components described below. Then add your new plug-in the the PAMGUARD
data model. See How to add plug-ins to learn how to do this.
Available components of a PAMGUARD plug-in are
Although the default constructor for PamControlledUnit is
public PamControlledUnit(String unitType, String unitName)you must provide a constructor in your sub class that takes just the unitName, e.g.
public class MyDetectorController extends PamControlledUnit { public MyDetectorController(String unitName) { super("My detector", unitName); etc...Pamguard will search for and use this single parameter constructor when creating modules and adding them to the Pamguard data model.
Pamguard Processes are subclasses of PamProcess. A PamProcess will subscribe to one or more PamDataBlock(s). A PamProcess will generally also create one or more new PamDataBlock(s). When new data arrive from the PamDataBlock, the process will manipulate those data in some way and create information that is added to the output data blocks.
Each Pamguard plug-in may have any number of processes, for example, most displays do not have a process at all. The whistle detector, on the other hand, has separate processes for peak detection and whistle linking.
To add a process to a plug in, use the addPamProcess function in PamControlledUnitUnit.
PAMGUARD Tab panels are added as separate tabs on the main PAMGUARD GUI display. A tab panel may contain graphics or tables to display information of any type.
Each PAMGUARD plug-in may currently only have a single tab panel per plug in. however, since the developer can put anything they like into that one tab panel, it is of course possible to place a tab panel in that one tab panel and for the inner tab panel to contain multiple tabs !
To add a tab panel to a plug in, use the setTabPanel function in PamControlledUnit.
Note that a new detection menu may be created multiple times as modules are added and removed from the PAMGUARD system. Therefore the implementation of createDetectionMenu should contain only a minimum amount of code required to make the actual menu and should avoid calling constructors for additional objects.
Detection menus will automatically be incorporated as sub-menus in PAMGUARD's main detection menu. They will also be shown as separate menu items in the main menu bar when the tab panel (if one exists) for the plug-in is selected.
Note that a new display menu may be created multiple times as modules are added and removed from the PAMGUARD system. Therefore the implementation of createDisplayMenu should contain only a minimum amount of code required to make the actual menu and should avoid calling constructors for additional objects.
Display menus will automatically be incorporated as sub-menus in PAMGUARD's main display menu. They will also be shown as separate menu items in the main menu bar when the tab panel (if one exists) for the plug-in is selected.
Note that a new display menu may be created multiple times as modules are added and removed from the PAMGUARD system. Therefore the implementation of createFileMenu should contain only a minimum amount of code required to make the actual menu and should avoid calling constructors for additional objects.
File menus will automatically be incorporated as sub-menus in PAMGUARD's main file menu.
Side panels are generally used to display summary information for the PamControlledUnit or to provide quick access controls.
To add a side panel to a plug in, use the setSidePanel function in PamControlledUnit.
In general, the PamDataBlock(s) are created at the same time as the PamProcess. PamDataUnits are then added to the PamDataBlock(s) as and when they become available.
For some processes, such as the FFT Engine, PamDataUnits will be added to the output PamDataBlock at regular intervals. For other processes, such as the Click Detector new PamDataUnits will be only be added if and when detections are made.
Displays that currently support graphic overlays are (as of December 2006)
For details of how to make graphic overlays in PAMGUARD see How to make graphic overlays
Scroll speed of plug-in panels is controlled by the spectrogram display so that the plug-in panel data remain in line with the spectrogram data.
For details on how to make plug in display panels see How to make plug in display panels