Class NetworkController

All Implemented Interfaces:
SettingsNameProvider

public class NetworkController extends CommandManager
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 Details

    • NetworkController

      public NetworkController(PamController pamController)
  • 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

      public boolean sendData(ExtCommand extCommand, String dataString)
      Description copied from class: CommandManager
      Reply to data called from InterpredData
      Specified by:
      sendData in class CommandManager
      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 class PamControlledUnit
      Parameters:
      changeType - type of change