Package networkTransfer.receive
Class BuoyStatusDataUnit
java.lang.Object
PamguardMVC.PamDataUnit
networkTransfer.receive.BuoyStatusDataUnit
- All Implemented Interfaces:
Comparable
Class for collecting data to do with individual buoys receiving data
over the network.
- Author:
- Doug Gillespie
-
Constructor Summary
ConstructorDescriptionBuoyStatusDataUnit
(NetworkReceiver networkReceiver, int buoyId1, int buoyId2, int channelMap) BuoyStatusDataUnit
(NetworkReceiver networkReceiver, BuoyStatusData buoyStatusData) -
Method Summary
Modifier and TypeMethodDescriptionfindLastDataUnit
(Class unitClass) Find the last data unit from this buoy that belongs to the given data block.int
getBlockPacketCount
(PamDataBlock dataBlock) int
getBlockPacketRXbytes
(PamDataBlock dataBlock) int
int
Get a standard string name for a buoy.int
double[]
long
int
long
int
The number of the first channel for data from this buoy - since all buoys will have the first channel as zero (I hope) this is basically used as a shift operator on the incoming channel numbers from the network.getPairVal
(String key) getPort()
int
int
void
void
newDataObject
(PamDataBlock dataBlock, PamDataUnit dataUnit, int blockSeq, int receivedBytes) void
setChannelBitmap
(int channelBitmap) Set the channel bitmap (software channels)void
setCommandStatus
(int commandStatus) void
setCompassData
(long timeInMillis, double[] compassData) void
setGpsData
(long timeMilliseconds, GpsData gpsData) void
setHydrophoneStreamer
(Streamer hydrophoneStreamer) Set the hydrophone streamer for the buoy.void
setNetworkReceiver
(NetworkReceiver networkReceiver) void
setPairData
(String substring, Serializable dataObj) void
toString()
void
Increment counter of unknown packets.Methods inherited from class PamguardMVC.PamDataUnit
addDataAnnotation, addSuperDetection, amplifyMeasuredAmplitudeByDB, amplifyMeasuredAmplitudeByLinear, calcSnapshotGeometry, clearOandAngles, clearUpdateCount, compareTo, findDataAnnotation, findDataAnnotation, freeData, getAbsBlockIndex, getAmplitudeDB, getAnnotationsSummaryString, getBasicData, getCalculatedAmlitudeDB, getChannelBitmap, getColourIndex, getDataAnnotation, getDatabaseIndex, getDatabaseUpdateOf, getDataUnitFileInformation, getDataUnitPopupMenu, getDurationInMilliseconds, getEndTimeInMilliseconds, getFrequency, getFrequencyOverlap, getHydrophoneBitmap, getHydrophoneHeading, getLastChangeTime, getLastSample, getLastUpdateTime, getLocalisation, getMeasuredAmplitude, getMeasuredAmplitudeType, getNoiseBackground, getNumDataAnnotations, getOriginLatLong, getParentDataBlock, getSampleDuration, getSampleDurationAsInt, getSeconds, getSequenceBitmap, getSequenceBitmapObject, getSignalExcess, getSignalSPL, getSnapshotGeometry, getStartSample, getSummaryString, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetection, getSuperDetectionsCount, getSuperDetectionSyncronisation, getSuperId, getTimeDelaysSeconds, getTimeMilliseconds, getTimeNanoseconds, getTimeOverlap, getUID, getUpdateCount, isEmbryonic, isForceAmpRecalc, linAmplitudeToDB, removeDataAnnotation, removeDataAnnotation, removeSuperDetection, setAbsBlockIndex, setCalculatedAmlitudeDB, setDatabaseIndex, setDatabaseUpdateOf, setDataUnitFileInformation, setDurationInMilliseconds, setEmbryonic, setForceAmpRecalc, setFrequency, setInfo, setLastUpdateTime, setLocalisation, setMeasuredAmpAndType, setMeasuredAmplitude, setMeasuredAmplitudeType, setNoiseBackground, setParentDataBlock, setSampleDuration, setSequenceBitmap, setSignalExcess, setSignalSPL, setSnapshotGeometry, setStartSample, setTimeDelaysSeconds, setTimeMilliseconds, setUID, setUniqueSuperDetection, sortOutputMaps, updateDataUnit
-
Constructor Details
-
BuoyStatusDataUnit
public BuoyStatusDataUnit(NetworkReceiver networkReceiver, int buoyId1, int buoyId2, int channelMap) -
BuoyStatusDataUnit
-
-
Method Details
-
newDataObject
public void newDataObject(PamDataBlock dataBlock, PamDataUnit dataUnit, int blockSeq, int receivedBytes) -
findLastDataUnit
Find the last data unit from this buoy that belongs to the given data block.- Parameters:
unitClass
- last data block.- Returns:
- last data unit from that block.
-
unknownPacket
public void unknownPacket()Increment counter of unknown packets. -
getBuoyName
Get a standard string name for a buoy.- Returns:
- a standard name in the form 'buoy xxx';
-
getBuoyId1
public int getBuoyId1()- Returns:
- the buoyId1
-
getBuoyId2
public int getBuoyId2()- Returns:
- the buoyId2
-
getLowestChannel
public int getLowestChannel()The number of the first channel for data from this buoy - since all buoys will have the first channel as zero (I hope) this is basically used as a shift operator on the incoming channel numbers from the network.- Returns:
- the channel
-
getCreationTime
public long getCreationTime()- Returns:
- the creationTime
-
getLastDataTime
public long getLastDataTime()- Returns:
- the lastDataTime
-
getTotalPackets
public int getTotalPackets()- Returns:
- the totalPackets
-
getBlockPacketCount
-
getBlockPacketRXbytes
-
initialise
public void initialise() -
setSocket
-
getSocket
- Returns:
- the socket
-
getIPAddr
-
getPort
-
getGpsData
- Returns:
- the gpsData
-
setGpsData
- Parameters:
gpsData
- the gpsData to set
-
setCompassData
public void setCompassData(long timeInMillis, double[] compassData) -
getCompassData
public double[] getCompassData() -
getGpsCount
public int getGpsCount() -
getPositionString
-
setCommandStatus
public void setCommandStatus(int commandStatus) - Parameters:
commandStatus
- the commandStatus to set
-
getCommandStatus
public int getCommandStatus()- Returns:
- the commandStatus
-
getNetworkReceiver
- Returns:
- the networkReceiver
-
setNetworkReceiver
- Parameters:
networkReceiver
- the networkReceiver to set
-
setHydrophoneStreamer
Set the hydrophone streamer for the buoy. Also sets a reference to the buoy stats in the streamer.- Parameters:
hydrophoneStreamer
- the hydrophoneStreamer to set
-
getHydrophoneStreamer
- Returns:
- the hydrophoneStreamer
-
getUnknownPackets
public int getUnknownPackets()- Returns:
- the unknownPackets
-
setPairData
- Parameters:
substring
-substring2
-
-
getPairDataAll
-
getPairKeys
-
getPairVal
-
setChannelBitmap
public void setChannelBitmap(int channelBitmap) Description copied from class:PamDataUnit
Set the channel bitmap (software channels)- Overrides:
setChannelBitmap
in classPamDataUnit
-
getBuoyStatusData
- Returns:
- the buoyStatusData
-
toString
-