Package PamController.command
Class NetworkController
java.lang.Object
PamController.PamControlledUnit
PamController.command.CommandManager
PamController.command.NetworkController
- All Implemented Interfaces:
SettingsNameProvider
Class to handle remote control of PAMGuard.
Can receive and execute commands via udp, some commands will return a string of additional information.
Individual commands, actions and return strings are handled by subclasses of the ExtCommand class.
- Author:
- Doug Gillespie
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Close the UDP port.void
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.boolean
Open the UDP port.boolean
sendData
(ExtCommand extCommand, String dataString) Reply to data called from InterpredDatavoid
Infinite loop.Methods inherited from class PamController.command.CommandManager
findCommand, getCommandFromIndex, interpretCommand, splitCommandLine
Methods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createDetectionMenu, createDisplayMenu, 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, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setupControlledUnit, stopViewerSound, tellModule, terminalPrint, terminalPrintln, toString
-
Constructor Details
-
NetworkController
-
-
Method Details
-
openUDPPort
public boolean openUDPPort()Open the UDP port.- Returns:
- true if opened OK
-
closeUDPPort
public void closeUDPPort()Close the UDP port. -
sitInLoop
public void sitInLoop()Infinite loop. The program sits here waiting for commands and interpreting them as needs.
It will exit when InterpretCommand returns false, which it should only do when the exit program command has been sent. -
sendData
Description copied from class:CommandManager
Reply to data called from InterpredData- Specified by:
sendData
in classCommandManager
- Returns:
- true if replay successful
-
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
-