|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dk.itu.haas.GPS.Garmin.GarminPacket | +--dk.itu.haas.GPS.Garmin.TimeDataPacket
This class encapsulates the information of a Garmin-Date-Time-packet.
Field Summary | |
protected short |
day
Day (1-31) |
protected int |
hour
Hour of the day. |
protected short |
minute
Minute of the hour. |
protected short |
month
Month (1-12) |
protected short |
second
Second of the minute. |
protected int |
year
Year. |
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 | |
TimeDataPacket(GarminPacket p)
Treats the packet p as a packet containing Time-data. |
|
TimeDataPacket(int[] p)
Treats the packet p as a packet containing Time-data. |
Method Summary | |
short |
getDay()
Returns the day of the month. |
int |
getHours()
Returns the hour of the day. |
short |
getMinutes()
Returns the minute of the hour. |
short |
getMonth()
Returns the month. |
short |
getSeconds()
Returns the second of the minute. |
int |
getYear()
returns the year. |
java.lang.String |
toString()
Returns the value of this packet in a human-readable format. |
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 |
protected short month
protected short day
protected int year
protected int hour
protected short minute
protected short second
Constructor Detail |
public TimeDataPacket(int[] p)
public TimeDataPacket(GarminPacket p)
Method Detail |
public short getDay()
getDay
in interface IDate
public short getMonth()
getMonth
in interface IDate
public int getYear()
getYear
in interface IDate
public int getHours()
getHours
in interface ITime
public short getMinutes()
getMinutes
in interface ITime
public short getSeconds()
getSeconds
in interface ITime
public java.lang.String toString()
toString
in class GarminPacket
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |