Class ClipControl
- All Implemented Interfaces:
ClipDisplayParent
,PamSettings
,SettingsNameProvider
The clip generator configuration contains a budget of how many clips it can make for each possible trigger and will, based on usage, decide in a semi random way whether or not to make a clip on the arrival of each detection.
Trigger specific settings also include a pre and post sample time.
It would be good to add clips as annotations to other data units, but of course clips only get made a second or two after the data unit, which will already have been stored, so can only work if storage of data units is delayed somehow. Not yet !
- Author:
- Doug Gillespie
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateDetectionMenu
(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcessescreateDisplayMenu
(Frame parentFrame) Create a JMenu object containing MenuItems associated with the viewvoid
displayOptions
(Frame parentFrame) void
findClipGenSetting
(String clipDataName) Find the clip generator settings for a specific data stream.findTriggerDataUnit
(ClipDataUnit clipDataUnit) getClipDecorations
(ClipDisplayUnit clipDisplayUnit) Add additional functionality and controls to a clip display unitA name (though I don't think this ever gets used by current displays)Get a list of datablocks which might trigger a clip generation.long
void
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.boolean
Called to remove a unit.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) Methods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createFileMenu, createHelpMenu, flushDataBlockBuffers, getBackupInformation, getFrameNumber, getGUI, getGuiFrame, getInstanceIndex, getModuleStatus, getModuleStatusManager, getModuleSummary, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setupControlledUnit, stopViewerSound, tellModule, terminalPrint, terminalPrintln, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface PamController.PamSettings
getUnitType
Methods inherited from interface PamController.SettingsNameProvider
getUnitName
-
Constructor Details
-
ClipControl
-
-
Method Details
-
createDetectionMenu
Description copied from class:PamControlledUnit
Create a JMenu object containing MenuItems associated with PamProcesses- Overrides:
createDetectionMenu
in classPamControlledUnit
- Parameters:
parentFrame
- The owner frame of the menu- Returns:
- reference to a JMenu which can be added to an existing menu or
menu bar
Note that if multiple views are to use the same menu, then they should each create a new menu (by setting Create to true) the first time they call this method.
-
createDisplayMenu
Description copied from class:PamControlledUnit
Create a JMenu object containing MenuItems associated with the view- Overrides:
createDisplayMenu
in classPamControlledUnit
- Returns:
- reference to a JMenu which can be added to an existing menu or
menu bar
Note that if multiple views are to use the same menu, then they should each create a new menu (by setting Create to true) the first time they call this method.
-
displayOptions
-
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
-
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
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamControlledUnit
General notification when the PAMGAURD model changes.- Overrides:
notifyModelChanged
in classPamControlledUnit
- Parameters:
changeType
- type of change
-
getPotentialTriggers
Get a list of datablocks which might trigger a clip generation.- Returns:
- list of triggering data blocks.
-
getClipProcess
- Returns:
- the clipProcess
-
generateNewPanel
-
removeUnit
public boolean removeUnit()Description copied from class:PamControlledUnit
Called to remove a unit.- Overrides:
removeUnit
in classPamControlledUnit
- Returns:
- try (not used)
-
getClipDataBlock
- Specified by:
getClipDataBlock
in interfaceClipDisplayParent
- Returns:
- the data block who's clips are to be displayed
-
getDisplayName
Description copied from interface:ClipDisplayParent
A name (though I don't think this ever gets used by current displays)- Specified by:
getDisplayName
in interfaceClipDisplayParent
- Returns:
- display name
-
getClipDecorations
Description copied from interface:ClipDisplayParent
Add additional functionality and controls to a clip display unit- Specified by:
getClipDecorations
in interfaceClipDisplayParent
- Parameters:
clipDisplayUnit
- display unit to decorate.
-
findClipGenSetting
Find the clip generator settings for a specific data stream.- Parameters:
dataName
- data name for the data block.- Returns:
- clip generator settings, or null if none active.
-
displaySettingChange
public void displaySettingChange()- Specified by:
displaySettingChange
in interfaceClipDisplayParent
-
getClipSettings
-
findTriggerDataUnit
-