dk.itu.haas.GPS.Garmin
Class ProtocolDataPacket

java.lang.Object
  |
  +--dk.itu.haas.GPS.Garmin.GarminPacket
        |
        +--dk.itu.haas.GPS.Garmin.ProtocolDataPacket

public class ProtocolDataPacket
extends GarminPacket


Field Summary
protected  int[] data
           
protected  char[] tags
           
 
Fields inherited from class dk.itu.haas.GPS.Garmin.GarminPacket
Cmnd_Abort_Transfer, Cmnd_Start_Pvt_Data, Cmnd_Stop_Pvt_Data, Cmnd_Transfer_Alm, 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_Nak_Byte, Pid_Position_Data, Pid_Product_Data, Pid_Product_Rqst, Pid_Protocol_Array, Pid_Pvt_Data, Pid_Records, Pid_Wpt_Data, Pid_Xfer_Cmplt
 
Constructor Summary
ProtocolDataPacket(GarminPacket p)
           
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()
          Returns a human-readable string with information to the packet's contents.
 
Methods inherited from class dk.itu.haas.GPS.Garmin.GarminPacket
calcChecksum, createBasicPacket, createCommandPacket, getByte, getDataLength, getID, getLength, getPacket, getRawPacket, idToString, isLegal, readByte, readDouble, readFloat, readLong, readNullTerminatedString, readWord
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tags

protected char[] tags

data

protected int[] data
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.


ProtocolDataPacket

public ProtocolDataPacket(GarminPacket p)
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.


toString

public java.lang.String toString()
Description copied from class: GarminPacket
Returns a human-readable string with information to the packet's contents.

Overrides:
toString in class GarminPacket