Class NetworkSender

java.lang.Object
PamController.PamControlledUnit
networkTransfer.send.NetworkSender
All Implemented Interfaces:
PamSettings, SettingsNameProvider

public class NetworkSender extends PamControlledUnit implements PamSettings
Send near real time data over the network to another PAMGUARD configuration.

Not currently configured in Java.

Author:
Doug Gillespie
  • Field Details

  • Constructor Details

    • NetworkSender

      public NetworkSender(String unitName)
  • Method Details

    • createDetectionMenu

      public JMenuItem createDetectionMenu(Frame parentFrame)
      Description copied from class: PamControlledUnit
      Create a JMenu object containing MenuItems associated with PamProcesses
      Overrides:
      createDetectionMenu in class PamControlledUnit
      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.

    • getSidePanel

      public PamSidePanel getSidePanel()
      Description copied from class: PamControlledUnit
      Gets a reference to a small panel to be displayed along the left hand edge of the main tab panel. Side panels should be small since they are always visible and any space they take will be taken from the main tab panel.

      It is possible for a PamControlled unit to have a side panel without having a pamTabPanel.

      Overrides:
      getSidePanel in class PamControlledUnit
      Returns:
      a pamSidePanel object.
      See Also:
    • senderSettings

      public void senderSettings(Frame parentFrame)
    • mitigateEmulate

      public void mitigateEmulate(Frame parentFrame)
      Call the emulator to pop up a dialog which willcontrol everything.
      Parameters:
      parentFrame -
    • getSettingsReference

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • restoreSettings

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      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
    • getNetworkSendParams

      public NetworkSendParams getNetworkSendParams()
      Returns:
      the networkSendParams
    • 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
    • listWantedDataSources

      public ArrayList<PamDataBlock> listWantedDataSources()
    • listPossibleDataSources

      public ArrayList<PamDataBlock> listPossibleDataSources(int outputFormat)
    • queueDataObject

      public void queueDataObject(NetworkQueuedObject networkQueuedObject)
      Put data objects in a queue. A different thread will handle emptying the queue, opening the connection, sending the data, etc.
      Parameters:
      networkQueuedObject - Object to add to the queue
    • getQueueLength

      public int getQueueLength()
      Get the size of the queue as a number of objects.
      Returns:
      number of objects in queue.
    • getQueueSize

      public int getQueueSize()
      Get the current queue size in kilobytes
      Returns:
    • getStatus

      public String getStatus()
    • pamClose

      public void pamClose()
      Description copied from class: PamControlledUnit
      Called when PAMGUARD is finally closing down so that a module may free any remaining resources (e.g. files or COMM ports).
      Overrides:
      pamClose in class PamControlledUnit
    • pamHasStopped

      public void pamHasStopped()
      Description copied from class: PamControlledUnit
      Called for all controlled units after Pam acquisition has stopped
      Overrides:
      pamHasStopped in class PamControlledUnit
    • pamToStart

      public void pamToStart()
      Description copied from class: PamControlledUnit
      called just before data acquisition starts. Note that PamObservers get a call to setSampleRate anyway so this mainly needs to be used for display elements that may need their scales adjusted before startup.
      Overrides:
      pamToStart in class PamControlledUnit
    • sendQueuedData

      public int sendQueuedData()
      Called from within the swing worker thread to send data from the queue.
      Returns:
      The number of objects sent.