public class NetworkReceiver extends PamControlledUnit implements PamSettings
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BATTERYID |
static java.lang.String |
COMPASSID |
short |
dataVersion |
static int |
NET_PAM_COMMAND |
static int |
NET_PAM_COMMAND_PREPARE |
static int |
NET_PAM_COMMAND_START |
static int |
NET_PAM_COMMAND_STOP
Some very basic commands to send straight through to receiving stations
|
static int |
NET_PAM_DATA
Flags for dataType1 - these must match equivalent commands in
other network C++ code, so don't mess with them !
|
static int |
NET_REMOTE_COMMAND |
static int |
NET_SPEED_DATA |
static int |
NET_SYSTEM_DATA |
static int |
SYSTEM_BATTERYDATA |
static int |
SYSTEM_COMPASSDATA |
static int |
SYSTEM_GPSDATA |
static java.lang.String |
unitTypeString |
Constructor and Description |
---|
NetworkReceiver(java.lang.String unitName) |
Modifier and Type | Method and Description |
---|---|
boolean |
canClose()
Called before Pamguard shuts down.
|
void |
checkAcousticBuoyStats(BuoyStatusDataUnit buoyStatusDataUnit)
If data units coming out of this buoy are acoustic, then it will need
hydrophones.
|
javax.swing.JMenuItem |
createDetectionMenu(java.awt.Frame parentFrame)
Create a JMenu object containing MenuItems associated with PamProcesses
|
void |
detectionDialog(java.awt.Frame parentFrame)
Display the network dialog and act if things change.
|
BuoyStatusDataUnit |
findBuoyStatusDataUnit(int buoyId1,
int buoyId2,
boolean create)
Find buoy status data and optionally create it if it doesn't exist.
|
BuoyStatusDataBlock |
getBuoyStatusDataBlock() |
NetworkReceiveParams |
getNetworkReceiveParams() |
networkTransfer.receive.NetworkReceiver.NetworkReceiveProcess |
getNetworkReceiveProcess() |
static java.lang.String |
getPamCommandString(int command) |
int |
getRecentDataBytes() |
int |
getRecentPackets() |
java.util.ArrayList<PamDataBlock> |
getRxDataBlocks() |
java.io.Serializable |
getSettingsReference() |
long |
getSettingsVersion() |
PamSidePanel |
getSidePanel()
Gets a reference to a small panel to be displayed along the
left hand edge of the main tab panel.
|
PamTabPanel |
getTabPanel()
Gets a reference to a panel to be added to a view
|
void |
interpretData(java.net.Socket socket,
short dataVersion2,
short buoyId1,
short buoyId2,
short dataId1,
int dataId2,
int dataLen,
byte[] duBuffer) |
void |
interpretPamData(java.net.Socket socket,
short dataVersion2,
BuoyStatusDataUnit buoyStatusDataUnit,
short dataId1,
int dataId2,
int dataLen,
byte[] duBuffer) |
void |
interpretSystemData(java.net.Socket socket,
short dataVersion2,
BuoyStatusDataUnit buoyStatusDataUnit,
short dataId1,
int dataId2,
int dataLen,
byte[] duBuffer) |
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.
|
boolean |
restoreSettings(PamControlledUnitSettings pamControlledUnitSettings) |
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addRelatedMenuItems, addXMLParameter, addXMLParameter, addXMLParameter, addXMLParameter, canPlayViewerSound, createDisplayMenu, createFileMenu, createHelpMenu, fillXMLElement, flushDataBlockBuffers, getFrameNumber, getGuiFrame, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineTaskGroup, getPamController, getPamModuleInfo, getPamProcess, getPamView, getShortUnitType, getTabClipCopier, getTabSpecificMenuBar, getToolbarComponent, getUnitName, getUnitType, getVerboseLevel, gotoTab, isViewer, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setupControlledUnit, stopViewerSound, terminalPrint, terminalPrintln, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getUnitName, getUnitType
public short dataVersion
public static java.lang.String unitTypeString
public static final int NET_PAM_DATA
public static final int NET_REMOTE_COMMAND
public static final int NET_SPEED_DATA
public static final int NET_SYSTEM_DATA
public static final int NET_PAM_COMMAND
public static final int SYSTEM_GPSDATA
public static final int SYSTEM_BATTERYDATA
public static final int SYSTEM_COMPASSDATA
public static final int NET_PAM_COMMAND_STOP
public static final int NET_PAM_COMMAND_PREPARE
public static final int NET_PAM_COMMAND_START
public static final java.lang.String COMPASSID
public static final java.lang.String BATTERYID
public networkTransfer.receive.NetworkReceiver.NetworkReceiveProcess getNetworkReceiveProcess()
public BuoyStatusDataBlock getBuoyStatusDataBlock()
public PamTabPanel getTabPanel()
PamControlledUnit
getTabPanel
in class PamControlledUnit
PamTabPanel
,
PamSidePanel
public PamSidePanel getSidePanel()
PamControlledUnit
It is possible for a PamControlled unit to have a side panel without having a pamTabPanel.
getSidePanel
in class PamControlledUnit
PamSidePanel
,
PamTabPanel
public void notifyModelChanged(int changeType)
PamControlledUnit
notifyModelChanged
in class PamControlledUnit
changeType
- type of changepublic javax.swing.JMenuItem createDetectionMenu(java.awt.Frame parentFrame)
PamControlledUnit
createDetectionMenu
in class PamControlledUnit
parentFrame
- The owner frame of the menuNote 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.
public void detectionDialog(java.awt.Frame parentFrame)
parentFrame
- parent frame to own dialogpublic int getRecentPackets()
public int getRecentDataBytes()
public void interpretData(java.net.Socket socket, short dataVersion2, short buoyId1, short buoyId2, short dataId1, int dataId2, int dataLen, byte[] duBuffer)
public void interpretSystemData(java.net.Socket socket, short dataVersion2, BuoyStatusDataUnit buoyStatusDataUnit, short dataId1, int dataId2, int dataLen, byte[] duBuffer)
public void interpretPamData(java.net.Socket socket, short dataVersion2, BuoyStatusDataUnit buoyStatusDataUnit, short dataId1, int dataId2, int dataLen, byte[] duBuffer)
public static java.lang.String getPamCommandString(int command)
public BuoyStatusDataUnit findBuoyStatusDataUnit(int buoyId1, int buoyId2, boolean create)
buoyId1
- buoy Id 1buoyId2
- buoy Id 2create
- automatically createpublic void checkAcousticBuoyStats(BuoyStatusDataUnit buoyStatusDataUnit)
buoyStatusDataUnit
- status data.public java.util.ArrayList<PamDataBlock> getRxDataBlocks()
public NetworkReceiveParams getNetworkReceiveParams()
public java.io.Serializable getSettingsReference()
getSettingsReference
in interface PamSettings
public long getSettingsVersion()
getSettingsVersion
in interface PamSettings
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
restoreSettings
in interface PamSettings
public void pamClose()
PamControlledUnit
pamClose
in class PamControlledUnit
public boolean canClose()
PamControlledUnit
canClose
in class PamControlledUnit