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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringprotected NetworkSendParamsstatic final StringFields inherited from class PamController.PamControlledUnit
isMixed, isViewer - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptioncreateDetectionMenu(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcessesintGet the size of the queue as a number of objects.intGet the current queue size in kilobyteslongGets a reference to a small panel to be displayed along the left hand edge of the main tab panel.listPossibleDataSources(int outputFormat) voidmitigateEmulate(Frame parentFrame) Call the emulator to pop up a dialog which willcontrol everything.voidnotifyModelChanged(int changeType) General notification when the PAMGAURD model changes.voidpamClose()Called when PAMGUARD is finally closing down so that a module may free any remaining resources (e.g.voidCalled for all controlled units after Pam acquisition has stoppedvoidcalled just before data acquisition starts.voidqueueDataObject(NetworkQueuedObject networkQueuedObject) Put data objects in a queue.booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidsenderSettings(Frame parentFrame) intCalled 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, getUnitTaskManager, getUnitTaskManager, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setUnitTaskManager, setupControlledUnit, stopViewerSound, tellModule, terminalPrint, terminalPrintln, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface PamController.PamSettings
getUnitTypeMethods inherited from interface PamController.SettingsNameProvider
getUnitName 
- 
Field Details
- 
ADDRESS
- See Also:
 
 - 
PORT
- See Also:
 
 - 
ID1
- See Also:
 
 - 
ID2
- See Also:
 
 - 
networkSendParams
 
 - 
 - 
Constructor Details
- 
NetworkSender
 
 - 
 - 
Method Details
- 
createDetectionMenu
Description copied from class:PamControlledUnitCreate a JMenu object containing MenuItems associated with PamProcesses- Overrides:
 createDetectionMenuin 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:PamControlledUnitGets 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:
 getSidePanelin 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:
 getSettingsReferencein interfacePamSettings- Returns:
 - The serialisable object that will be stored
 
 - 
getSettingsVersion
public long getSettingsVersion()- Specified by:
 getSettingsVersionin interfacePamSettings- Returns:
 - An integer version number for the settings
 
 - 
restoreSettings
- Specified by:
 restoreSettingsin interfacePamSettings- Parameters:
 pamControlledUnitSettings-- 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:PamControlledUnitGeneral notification when the PAMGAURD model changes.- Overrides:
 notifyModelChangedin 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:PamControlledUnitCalled when PAMGUARD is finally closing down so that a module may free any remaining resources (e.g. files or COMM ports).- Overrides:
 pamClosein classPamControlledUnit
 - 
pamHasStopped
public void pamHasStopped()Description copied from class:PamControlledUnitCalled for all controlled units after Pam acquisition has stopped- Overrides:
 pamHasStoppedin classPamControlledUnit
 - 
pamToStart
public void pamToStart()Description copied from class:PamControlledUnitcalled 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:
 pamToStartin classPamControlledUnit
 - 
sendQueuedData
public int sendQueuedData()Called from within the swing worker thread to send data from the queue.- Returns:
 - The number of objects sent.
 
 
 -