org.mbari.siam.distributed
Class DeviceMessagePacket

java.lang.Object
  extended by org.mbari.siam.distributed.DevicePacket
      extended by org.mbari.siam.distributed.DeviceMessagePacket
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MeasurementPacket

public class DeviceMessagePacket
extends DevicePacket
implements java.io.Serializable

DeviceMessagePacket contains a text message from a device.

Author:
Tom O'Reilly
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mbari.siam.distributed.DevicePacket
ALL_TYPES, DEVICEMESSAGE_FLAG, HEADER_BYTES, METADATA_FLAG, SENSORDATA_FLAG, SUMMARY_FLAG
 
Constructor Summary
DeviceMessagePacket()
           
DeviceMessagePacket(long sourceID)
           
 
Method Summary
 byte[] getMessage()
          Get message bytes.
 void setMessage(long time, byte[] message)
          Set message content.
 java.lang.String toString()
          Return String representation.
 
Methods inherited from class org.mbari.siam.distributed.DevicePacket
convertToAscii, getParentId, getRecordType, isPrintable, metadataRef, sequenceNo, setMetadataRef, setParentId, setRecordType, setSequenceNo, setSystemTime, sourceID, systemTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeviceMessagePacket

public DeviceMessagePacket()

DeviceMessagePacket

public DeviceMessagePacket(long sourceID)
Parameters:
sourceID - unique identifier of source device.
Method Detail

setMessage

public void setMessage(long time,
                       byte[] message)
Set message content.

Parameters:
time - message time-tag (millisec since epoch)
message - text bytes

getMessage

public byte[] getMessage()
Get message bytes.


toString

public java.lang.String toString()
Return String representation.

Overrides:
toString in class DevicePacket


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.