org.mbari.siam.devices.nortek.vector
Class VectorPacketParser

java.lang.Object
  extended by org.mbari.siam.distributed.PacketParser
      extended by org.mbari.siam.devices.nortek.vector.VectorPacketParser
All Implemented Interfaces:
java.io.Serializable

public class VectorPacketParser
extends PacketParser

Parses SIAM data packets for Nortek Vector ADV. The Vector is a streaming instrument that sends System data packets at 1 Hz and Velocity data packets at another (higher) rate (2-64 Hz). The System data packets contain a velocity multiplier that is used to scale the velocity readings, so they provide context for the velocity data packets. To accommodate this, the VectorPacketParser (this class) takes both kinds of packets, and uses the system data packets to set its internal copy of the velocity multilplier. It may also be initialized with a multiplier value, or it may be set using setMult(). When a VectorPacketParser is obtained via Vector.getParser(), the latest value of velocity multiplier is passed to the VectorPacketParser by the Vector instrument service. The typical use pattern is to get a single VectorPacketParser and feed it a stream of packets as they come in, thus ensuring that the correct multiplier is set when a velocity data packet arrives.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mbari.siam.distributed.PacketParser
PacketParser.Field, PacketParser.Record
 
Field Summary
protected  VectorSystemData _systemData
           
protected  VectorVelocityData _velocityData
           
protected  double _velocityMultiplier
           
protected  java.lang.String _vUnits
           
static java.lang.String AVG_POINTS
           
static java.lang.String AVG_VX_KEY
           
static java.lang.String AVG_VY_KEY
           
static java.lang.String AVG_VZ_KEY
           
static java.lang.String ENSEMBLE_KEY
           
static java.lang.String ERROR_KEY
           
static java.lang.String HEADING_KEY
           
static java.lang.String PITCH_KEY
           
static java.lang.String PRESSURE_KEY
           
static java.lang.String REGISTRY_NAME_KEY
           
static java.lang.String ROLL_KEY
           
static java.lang.String SOUND_SPEED_KEY
           
static java.lang.String STATUS_KEY
           
static java.lang.String TEMPERATURE_KEY
           
static java.lang.String TYPE_AVG_VEL_KEY
           
static java.lang.String TYPE_KEY
           
static java.lang.String TYPE_SYSTEM_KEY
           
static java.lang.String TYPE_VELOCITY_KEY
           
static java.lang.String VMULT_KEY
           
static java.lang.String VOLTAGE_KEY
           
static java.lang.String VX_KEY
           
static java.lang.String VY_KEY
           
static java.lang.String VZ_KEY
           
 
Fields inherited from class org.mbari.siam.distributed.PacketParser
_registryName
 
Constructor Summary
VectorPacketParser(java.lang.String registryName, double mult)
           
 
Method Summary
 PacketParser.Field[] parseFields(DevicePacket packet)
          Return fields parsed from DevicePacket.
 void setMult(double mult)
           
 
Methods inherited from class org.mbari.siam.distributed.PacketParser
getField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REGISTRY_NAME_KEY

public static java.lang.String REGISTRY_NAME_KEY

TYPE_KEY

public static java.lang.String TYPE_KEY

VX_KEY

public static java.lang.String VX_KEY

VY_KEY

public static java.lang.String VY_KEY

VZ_KEY

public static java.lang.String VZ_KEY

ENSEMBLE_KEY

public static java.lang.String ENSEMBLE_KEY

PRESSURE_KEY

public static java.lang.String PRESSURE_KEY

VMULT_KEY

public static java.lang.String VMULT_KEY

VOLTAGE_KEY

public static java.lang.String VOLTAGE_KEY

SOUND_SPEED_KEY

public static java.lang.String SOUND_SPEED_KEY

HEADING_KEY

public static java.lang.String HEADING_KEY

PITCH_KEY

public static java.lang.String PITCH_KEY

ROLL_KEY

public static java.lang.String ROLL_KEY

TEMPERATURE_KEY

public static java.lang.String TEMPERATURE_KEY

STATUS_KEY

public static java.lang.String STATUS_KEY

ERROR_KEY

public static java.lang.String ERROR_KEY

TYPE_VELOCITY_KEY

public static java.lang.String TYPE_VELOCITY_KEY

TYPE_SYSTEM_KEY

public static java.lang.String TYPE_SYSTEM_KEY

TYPE_AVG_VEL_KEY

public static java.lang.String TYPE_AVG_VEL_KEY

AVG_VX_KEY

public static java.lang.String AVG_VX_KEY

AVG_VY_KEY

public static java.lang.String AVG_VY_KEY

AVG_VZ_KEY

public static java.lang.String AVG_VZ_KEY

AVG_POINTS

public static java.lang.String AVG_POINTS

_systemData

protected VectorSystemData _systemData

_velocityData

protected VectorVelocityData _velocityData

_velocityMultiplier

protected double _velocityMultiplier

_vUnits

protected java.lang.String _vUnits
Constructor Detail

VectorPacketParser

public VectorPacketParser(java.lang.String registryName,
                          double mult)
Method Detail

setMult

public void setMult(double mult)

parseFields

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

Specified by:
parseFields in class PacketParser
Throws:
NotSupportedException
java.text.ParseException


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.