org.mbari.siam.devices.nortek
Class DataStructure

java.lang.Object
  extended by org.mbari.siam.devices.nortek.DataStructure
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
HardwareConfiguration, HRProfilerData, InstrumentConfiguration, ProfilerVelocityData, VectorSystemData, VectorVelocityData

public class DataStructure
extends java.lang.Object
implements java.io.Serializable

Data structure represents data generated by the Aquadopp, and includes method to read the data.

See Also:
Serialized Form

Field Summary
static byte ID_ADOP_DIAG_DATA
           
static byte ID_ADOP_DIAG_HEAD
           
static byte ID_ADOP_PROF_PROFILE
           
static byte ID_ADOP_PROF_VELOCITY
           
static byte ID_ADOP_VELOCITY
           
static byte ID_HEAD_CONFIG
           
static byte ID_HW_CONFIG
           
static byte ID_USER_CONFIG
           
static byte ID_VECTOR_SYSTEM_DATA
           
static byte ID_VECTOR_VELOCITY_DATA
           
static byte ID_VECTOR_VELOCITY_DATA_HEADER
           
protected static long INTERCHAR_TIMEOUT
           
protected static long PACKET_TIMEOUT
           
 
Constructor Summary
DataStructure()
           
 
Method Summary
 byte id()
          Return id of this structure.
static byte id(byte[] dataBytes)
          Return id of this structure.
static boolean isHRProfilerData(byte[] dataBytes)
           
static boolean isInstrumentConfiguration(byte[] dataBytes)
           
static boolean isProfilerVelocityData(byte[] dataBytes)
           
static boolean isVectorVelocityData(byte[] dataBytes)
           
static int read(java.io.InputStream input, byte[] dataBytes, long timeoutMsec)
          Read raw bytes of a single data structure from the input stream.
 void setBytes(byte[] dataBytes)
          Set contents of raw data byte array.
 java.lang.String toString()
          String representation
 short totalWords()
          Return total words in this structure.
static short totalWords(byte[] dataBytes)
          Return total words in this structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID_HW_CONFIG

public static final byte ID_HW_CONFIG
See Also:
Constant Field Values

ID_HEAD_CONFIG

public static final byte ID_HEAD_CONFIG
See Also:
Constant Field Values

ID_USER_CONFIG

public static final byte ID_USER_CONFIG
See Also:
Constant Field Values

ID_ADOP_VELOCITY

public static final byte ID_ADOP_VELOCITY
See Also:
Constant Field Values

ID_ADOP_DIAG_HEAD

public static final byte ID_ADOP_DIAG_HEAD
See Also:
Constant Field Values

ID_ADOP_DIAG_DATA

public static final byte ID_ADOP_DIAG_DATA
See Also:
Constant Field Values

ID_ADOP_PROF_VELOCITY

public static final byte ID_ADOP_PROF_VELOCITY
See Also:
Constant Field Values

ID_ADOP_PROF_PROFILE

public static final byte ID_ADOP_PROF_PROFILE
See Also:
Constant Field Values

ID_VECTOR_VELOCITY_DATA

public static final byte ID_VECTOR_VELOCITY_DATA
See Also:
Constant Field Values

ID_VECTOR_SYSTEM_DATA

public static final byte ID_VECTOR_SYSTEM_DATA
See Also:
Constant Field Values

ID_VECTOR_VELOCITY_DATA_HEADER

public static final byte ID_VECTOR_VELOCITY_DATA_HEADER
See Also:
Constant Field Values

INTERCHAR_TIMEOUT

protected static final long INTERCHAR_TIMEOUT
See Also:
Constant Field Values

PACKET_TIMEOUT

protected static final long PACKET_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

DataStructure

public DataStructure()
Method Detail

isInstrumentConfiguration

public static boolean isInstrumentConfiguration(byte[] dataBytes)

isHRProfilerData

public static boolean isHRProfilerData(byte[] dataBytes)

isProfilerVelocityData

public static boolean isProfilerVelocityData(byte[] dataBytes)

isVectorVelocityData

public static boolean isVectorVelocityData(byte[] dataBytes)

id

public byte id()
Return id of this structure.


id

public static byte id(byte[] dataBytes)
Return id of this structure.


totalWords

public short totalWords()
Return total words in this structure.


totalWords

public static short totalWords(byte[] dataBytes)
Return total words in this structure.


setBytes

public void setBytes(byte[] dataBytes)
Set contents of raw data byte array.


toString

public java.lang.String toString()
String representation

Overrides:
toString in class java.lang.Object

read

public static int read(java.io.InputStream input,
                       byte[] dataBytes,
                       long timeoutMsec)
                throws TimeoutException,
                       java.io.IOException,
                       java.lang.Exception
Read raw bytes of a single data structure from the input stream.

Throws:
TimeoutException
java.io.IOException
java.lang.Exception


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.