org.jscience.devices.gps.garmin
Class ProtocolDataPacket

java.lang.Object
  extended by org.jscience.devices.gps.garmin.GarminPacket
      extended by org.jscience.devices.gps.garmin.ProtocolDataPacket

public class ProtocolDataPacket
extends GarminPacket

DOCUMENT ME!


Field Summary
protected  int[] data
          DOCUMENT ME!
protected  char[] tags
          DOCUMENT ME!
 
Fields inherited from class org.jscience.devices.gps.garmin.GarminPacket
Cmnd_Abort_Transfer, Cmnd_Start_Pvt_Data, Cmnd_Stop_Pvt_Data, Cmnd_Transfer_Alm, Cmnd_Transfer_Laps, Cmnd_Transfer_Posn, Cmnd_Transfer_Prx, Cmnd_Transfer_Rte, Cmnd_Transfer_Time, Cmnd_Transfer_Trk, Cmnd_Transfer_Wpt, Cmnd_Turn_Off_Pwr, DLE, ETX, packet, Pid_Ack_Byte, Pid_Command_Data, Pid_Date_Time_Data, Pid_Lap, Pid_Nak_Byte, Pid_Position_Data, Pid_Product_Data, Pid_Product_Rqst, Pid_Protocol_Array, Pid_Prx_Wpt_Data, Pid_Pvt_Data, Pid_Records, Pid_Trk_data, Pid_Trk_Hdr, Pid_Wpt_Data, Pid_Xfer_Cmplt, pointer
 
Constructor Summary
ProtocolDataPacket(GarminPacket p)
          Creates a new ProtocolDataPacket object.
ProtocolDataPacket(int[] p)
          Treats the packet p as a packet containing data about which protocols the GPS support.
 
Method Summary
 int getVersion(char tag, int protocol)
          This method will return the exact version of a protocol.
 java.lang.String toString()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.devices.gps.garmin.GarminPacket
calcChecksum, createBasicPacket, createCommandPacket, getByte, getDataLength, getID, getLength, getPacket, getPointer, getRawPacket, idToString, isLegal, readBoolean, readBoolean, readByte, readByte, readDouble, readDouble, readFloat, readFloat, readLong, readLong, readNullTerminatedString, readNullTerminatedString, readPosition, readPosition, readWord, readWord, setPointer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tags

protected char[] tags
DOCUMENT ME!


data

protected int[] data
DOCUMENT ME!

Constructor Detail

ProtocolDataPacket

public ProtocolDataPacket(int[] p)
Treats the packet p as a packet containing data about which protocols the GPS support. Throws PacketNotRecognizedException if p is not a product-data-packet.

Parameters:
p - DOCUMENT ME!

ProtocolDataPacket

public ProtocolDataPacket(GarminPacket p)
Creates a new ProtocolDataPacket object.

Parameters:
p - DOCUMENT ME!
Method Detail

getVersion

public int getVersion(char tag,
                      int protocol)
This method will return the exact version of a protocol. If the protocol is not supported by the GPS, the method returns -1.

Parameters:
tag - DOCUMENT ME!
protocol - DOCUMENT ME!
Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
DOCUMENT ME!

Overrides:
toString in class GarminPacket
Returns:
DOCUMENT ME!