org.mbari.siam.tests.state
Class NewMetadataPacket

java.lang.Object
  extended by org.mbari.siam.distributed.DevicePacket
      extended by org.mbari.siam.tests.state.NewMetadataPacket
All Implemented Interfaces:
java.io.Serializable

public class NewMetadataPacket
extends DevicePacket

MetadataPacket contains information relating to "state" of the generating device.

Author:
Tom O'Reilly
See Also:
Serialized Form

Field Summary
protected  byte[] _deviceStatus
          Status string generated by device.
protected  ServiceAttributes _serviceAttributes
          Dynamic service state attributes.
protected  byte[] _staticDoc
          Static documentation (e.g.
static int AUTO_GENERATED
          Indicates that packet was generated autonomously (i.e.
 
Fields inherited from class org.mbari.siam.distributed.DevicePacket
ALL_TYPES, DEVICEMESSAGE_FLAG, HEADER_BYTES, METADATA_FLAG, SENSORDATA_FLAG, SUMMARY_FLAG
 
Constructor Summary
NewMetadataPacket(long sourceID, byte[] cause)
           
 
Method Summary
 byte[] getBytes()
          Get status bytes.
 byte[] getCause()
          Indication of what generated the MetadataPacket
 void setDeviceStatus(byte[] deviceStatus)
          Set device status.
 void setServiceAttributes(ServiceAttributes serviceAttributes)
          Set service state.
 void setStaticDoc(byte[] staticDoc)
          Set static doc.
 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
 

Field Detail

AUTO_GENERATED

public static final int AUTO_GENERATED
Indicates that packet was generated autonomously (i.e. not from any external command.

See Also:
Constant Field Values

_staticDoc

protected byte[] _staticDoc
Static documentation (e.g. XML description).


_deviceStatus

protected byte[] _deviceStatus
Status string generated by device.


_serviceAttributes

protected ServiceAttributes _serviceAttributes
Dynamic service state attributes.

Constructor Detail

NewMetadataPacket

public NewMetadataPacket(long sourceID,
                         byte[] cause)
Parameters:
sourceID - unique identifier of source device
cause - what triggered metadata packet creation
Method Detail

setStaticDoc

public void setStaticDoc(byte[] staticDoc)
Set static doc.

Parameters:
staticDoc - static documentation bytes

setServiceAttributes

public void setServiceAttributes(ServiceAttributes serviceAttributes)
Set service state.

Parameters:
serviceAttributes - service state object

setDeviceStatus

public void setDeviceStatus(byte[] deviceStatus)
Set device status.

Parameters:
deviceStatus - status string read from device

getCause

public byte[] getCause()
Indication of what generated the MetadataPacket


getBytes

public byte[] getBytes()
Get status 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.