public abstract class RecorderTrigger
extends java.lang.Object
A part of the PamGuard system that is to trigger recordings should first create a class that implements the RecorderTriggers interface. This class must then be registered with the PamGuard recorders using the static function void RecorderControl.addRecorderTrigger(RecorderTrigger recorderTrigger). The trigger will then be listed on the tab panel of each instance of the PamGuard recorder from where it can be enabled or disabled for each recorder independently.
When an event occurs which should start a recording, call the static function void RecorderControl.actionRecorderTrigger(RecorderTrigger recorderTrigger). Each instance of the recorder will then be notified and will start recording depending on the state of check box on each recorder tab on the GUI.
Note that the RecorderTrigger passed to RecorderControl.actionRecorderTrigger must be exactly the same instance as was passed to RecorderControl.addRecorderTrigger
RecorderControl
,
RecorderTriggerData
Constructor and Description |
---|
RecorderTrigger() |
Modifier and Type | Method and Description |
---|---|
abstract RecorderTriggerData |
getDefaultTriggerData()
Get default data for this trigger.
|
java.lang.String |
getName() |
boolean |
hasOptions()
This trigger has additional options available.
|
boolean |
showOptionsDialog(java.awt.Window frame,
RecorderTriggerData triggerData)
Show a dialog of additional options for the recorder trigger.
|
boolean |
triggerDataUnit(PamDataUnit dataUnit,
RecorderTriggerData rtData)
Called as each data unit is considered for triggering.
|
public abstract RecorderTriggerData getDefaultTriggerData()
public boolean triggerDataUnit(PamDataUnit dataUnit, RecorderTriggerData rtData)
dataUnit
- data unit to consider for recording triggeringpublic boolean hasOptions()
public boolean showOptionsDialog(java.awt.Window frame, RecorderTriggerData triggerData)
Developers should probably put parameters controlling any options into a class extending the defaultTriggerData, so that these get stored on a recorder by recorder basis.
frame
- triggerData
- public final java.lang.String getName()