|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.mbari.siam.distributed.DevicePacket
public class DevicePacket
DevicePacket is a container for data or metadata which originates at a particular device, and forms the base of a packet class hierarchy, which includes SensorDataPacket, DeviceMessagePacket, and MetadataPacket. DevicePackets are generated by DeviceServices, written to DeviceLogs, and telemetered to shore. DevicePacket attributes include the following:
SensorDataPacket,
MetadataPacket,
Serialized Form| Field Summary | |
|---|---|
static int |
ALL_TYPES
Convenience - all packet type flags. |
static int |
DEVICEMESSAGE_FLAG
DeviceMessagePacket flag |
static int |
HEADER_BYTES
Header size - used by PacketStats and aggregator. |
static int |
METADATA_FLAG
MetaDataPacket flag |
static int |
SENSORDATA_FLAG
SensorDataPacket flag |
static int |
SUMMARY_FLAG
SummaryPacket flag |
| Constructor Summary | |
|---|---|
DevicePacket()
|
|
DevicePacket(long sourceID)
|
|
| Method Summary | |
|---|---|
protected static void |
convertToAscii(byte[] buffer)
Utility method used in subclass' toString() methods. |
long |
getParentId()
Get parentID field |
long |
getRecordType()
Get recordType field |
protected static boolean |
isPrintable(byte c)
Utility method; return true if byte is printable. |
long |
metadataRef()
Return "metadataRef sequence number" of the packet. |
long |
sequenceNo()
Return "sequence number" of the packet. |
void |
setMetadataRef(long sequenceNo)
Each packet should refer to the sequence number of the last metadata packet. |
void |
setParentId(long id)
Set parentID field |
void |
setRecordType(long type)
Set recordType field |
void |
setSequenceNo(long sequenceNo)
Set the packet sequence number. |
void |
setSystemTime(long systemTime)
Set the packet "creation time" |
long |
sourceID()
Return ISI ID of packet source. |
long |
systemTime()
Get packet "creation time". |
java.lang.String |
toString()
Return String representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SENSORDATA_FLAG
public static final int METADATA_FLAG
public static final int DEVICEMESSAGE_FLAG
public static final int SUMMARY_FLAG
public static final int ALL_TYPES
public static final int HEADER_BYTES
| Constructor Detail |
|---|
public DevicePacket()
public DevicePacket(long sourceID)
sourceID - unique identifier of source device| Method Detail |
|---|
public void setSystemTime(long systemTime)
public long systemTime()
public long sourceID()
public long sequenceNo()
public long metadataRef()
public void setSequenceNo(long sequenceNo)
public void setMetadataRef(long sequenceNo)
public long getParentId()
public void setParentId(long id)
public long getRecordType()
public void setRecordType(long type)
public java.lang.String toString()
toString in class java.lang.Objectprotected static boolean isPrintable(byte c)
protected static void convertToAscii(byte[] buffer)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||