org.mbari.siam.distributed
Class PacketParser

java.lang.Object
  extended by org.mbari.siam.distributed.PacketParser
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AnalogPacketParser, Aquadopp.Parser, Aquadopp.Parser, AxisCamera.ImageParser, ControlServicePacketParser, CPUTempPacketParser, CTDPacketParser, DelimitedStringParser, DigitalPacketParser, ElmoLouverPacketParser, ElmoPacketParser, MSP430PacketParser, PhDigitalPacketParser, SAMIPacketParser, SerialAdcPacketParser, VectorPacketParser, VectorPacketParser, WaveSensorPacketParser, WorkhorsePacketParser

public abstract class PacketParser
extends java.lang.Object
implements java.io.Serializable

Parses DevicePacket packets. A PacketParser can be retrieved over the network; hence it implements java.io.Serializable.

See Also:
Serialized Form

Nested Class Summary
 class PacketParser.Field
          Each Record contains one or more Fields.
 class PacketParser.Record
          Each DevicePacket can be parsed into one or more Records.
 
Field Summary
protected  java.lang.String _registryName
          A registry name (belonging to the implementing or calling service class) may be associated with this parser.
 
Constructor Summary
PacketParser()
           
PacketParser(java.lang.String registryName)
           
 
Method Summary
static PacketParser.Field getField(PacketParser.Field[] fields, java.lang.String name)
          Get field with specified name.
abstract  PacketParser.Field[] parseFields(DevicePacket packet)
          Return array of fields parsed from DevicePacket contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_registryName

protected java.lang.String _registryName
A registry name (belonging to the implementing or calling service class) may be associated with this parser.

Constructor Detail

PacketParser

public PacketParser()

PacketParser

public PacketParser(java.lang.String registryName)
Method Detail

parseFields

public abstract PacketParser.Field[] parseFields(DevicePacket packet)
                                          throws NotSupportedException,
                                                 java.text.ParseException
Return array of fields parsed from DevicePacket contents.

Throws:
NotSupportedException
java.text.ParseException

getField

public static PacketParser.Field getField(PacketParser.Field[] fields,
                                          java.lang.String name)
                                   throws NoDataException
Get field with specified name.

Throws:
NoDataException


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.