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

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

public class DevicePacketParser
extends DevicePacketParser
implements java.io.Serializable

Parse raw data into JDDAC Records. Usage:

  // We have an InstrumentConfiguration object already instantiated. We need this
  // confguration object in order to correctly parse data packets. The configuratio
  // object tells us the number of beams and cells that each data packet represents.
  DevicePacketParser parser = new DevicePacketParser()
  parser.setInstrumentConfiguration(instrumentConfiguration);
  ArgArray siamRecord = parser.parse(sensorDataPacket);  // Actually an SiamRecord which is a subclass of ArgArray
 

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mbari.siam.distributed.DevicePacketParser
_record
 
Constructor Summary
DevicePacketParser()
           
DevicePacketParser(InstrumentConfiguration instrumentConfiguration)
           
 
Method Summary
 InstrumentConfiguration getInstrumentConfiguration()
          Gets the InstrumentConfiguration object used for parsing Velocity data
protected  void parseFields(DevicePacket packet)
          Parse raw data from DevicePacket, fill in _record appropriately.
 void setInstrumentConfiguration(InstrumentConfiguration instrumentConfiguration)
          Set the InstrumentConfiguration object used for parsing Velocity data.
 
Methods inherited from class org.mbari.siam.distributed.DevicePacketParser
addArrayMeasurement, addArrayMeasurement, addArrayMeasurement, addMeasurement, addMeasurement, parse, setArrayMeasurement, setAttributes, setMeasurement, setRecordTimestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DevicePacketParser

public DevicePacketParser()

DevicePacketParser

public DevicePacketParser(InstrumentConfiguration instrumentConfiguration)
Method Detail

parseFields

protected void parseFields(DevicePacket packet)
                    throws java.lang.Exception
Parse raw data from DevicePacket, fill in _record appropriately.

Specified by:
parseFields in class DevicePacketParser
Throws:
java.lang.Exception

getInstrumentConfiguration

public InstrumentConfiguration getInstrumentConfiguration()
Gets the InstrumentConfiguration object used for parsing Velocity data

Returns:
The surrently set InstrumentConfiguration

setInstrumentConfiguration

public void setInstrumentConfiguration(InstrumentConfiguration instrumentConfiguration)
Set the InstrumentConfiguration object used for parsing Velocity data. This object is required in order to correctly resolve the number of beams and cells in the data.

Parameters:
instrumentConfiguration - The congiguration used for parsing the beam data.


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.