dk.itu.haas.GPS.Garmin
Class ProductDataPacket

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

public class ProductDataPacket
extends GarminPacket


Field Summary
protected  java.lang.String productDesc
          Description of GPS as given by GPS.
protected  int productID
          Product-ID of GPS.
protected  int SWversion
          Software version in GPS.
 
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
ProductDataPacket(GarminPacket p)
          This method is a copy-constructor allowing to "upgrade" a GarminPacket to a ProductDataPacket.
ProductDataPacket(int[] p)
          Treats the packet p as a packet containing product-data.
 
Method Summary
 java.lang.String getDescription()
          Returns the supplied description of the GPS.
 int getProductID()
          Returns the product ID of the GPS.
 int getSWVersion()
          Returns the version of the software in the GPS.
 java.lang.String toString()
          Returns a human-readable version of this packet.
 
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

productID

protected int productID
Product-ID of GPS.


SWversion

protected int SWversion
Software version in GPS.


productDesc

protected java.lang.String productDesc
Description of GPS as given by GPS.

Constructor Detail

ProductDataPacket

public ProductDataPacket(int[] p)
Treats the packet p as a packet containing product-data. Throws PacketNotRecognizedException if p is not a product-data-packet.


ProductDataPacket

public ProductDataPacket(GarminPacket p)
This method is a copy-constructor allowing to "upgrade" a GarminPacket to a ProductDataPacket. Throws PacketNotRecognizedException if p is not a product-data-packet.

Method Detail

getProductID

public int getProductID()
Returns the product ID of the GPS.


getSWVersion

public int getSWVersion()
Returns the version of the software in the GPS.


getDescription

public java.lang.String getDescription()
Returns the supplied description of the GPS.


toString

public java.lang.String toString()
Returns a human-readable version of this packet.

Overrides:
toString in class GarminPacket