Package networkTransfer.send
Class NetworkSender
java.lang.Object
PamController.PamControlledUnit
networkTransfer.send.NetworkSender
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
Send near real time data over the network to another PAMGUARD configuration.
Not currently configured in Java.
- Author:
- Doug Gillespie
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateDetectionMenu
(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcessesint
Get the size of the queue as a number of objects.int
Get the current queue size in kilobyteslong
Gets a reference to a small panel to be displayed along the left hand edge of the main tab panel.listPossibleDataSources
(int outputFormat) void
mitigateEmulate
(Frame parentFrame) Call the emulator to pop up a dialog which willcontrol everything.void
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.void
pamClose()
Called when PAMGUARD is finally closing down so that a module may free any remaining resources (e.g.void
Called for all controlled units after Pam acquisition has stoppedvoid
called just before data acquisition starts.void
queueDataObject
(NetworkQueuedObject networkQueuedObject) Put data objects in a queue.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
senderSettings
(Frame parentFrame) int
Called from within the swing worker thread to send data from the queue.Methods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createDisplayMenu, createFileMenu, createHelpMenu, flushDataBlockBuffers, getBackupInformation, getFrameNumber, getGUI, getGuiFrame, getInstanceIndex, getModuleStatus, getModuleStatusManager, getModuleSummary, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, playViewerSound, removePamProcess, removeUnit, 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
-
Field Details
-
ADDRESS
- See Also:
-
PORT
- See Also:
-
ID1
- See Also:
-
ID2
- See Also:
-
-
Constructor Details
-
NetworkSender
-
-
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.
-
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 classPamControlledUnit
- Returns:
- a pamSidePanel object.
- See Also:
-
senderSettings
-
mitigateEmulate
Call the emulator to pop up a dialog which willcontrol everything.- Parameters:
parentFrame
-
-
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
-
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 classPamControlledUnit
- Parameters:
changeType
- type of change
-
listWantedDataSources
-
listPossibleDataSources
-
queueDataObject
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
-
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 classPamControlledUnit
-
pamHasStopped
public void pamHasStopped()Description copied from class:PamControlledUnit
Called for all controlled units after Pam acquisition has stopped- Overrides:
pamHasStopped
in classPamControlledUnit
-
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 classPamControlledUnit
-
sendQueuedData
public int sendQueuedData()Called from within the swing worker thread to send data from the queue.- Returns:
- The number of objects sent.
-