接口 ZDASentence
- 所有超级接口:
DateSentence,Sentence,TimeSentence
UTC time and date with local time zone offset.
Example:
$GPZDA,032915,07,08,2004,00,00*4D
- 作者:
- Kimmo Tuukkanen
-
字段概要
从接口继承的字段 net.sf.marineapi.nmea.sentence.Sentence
ALTERNATIVE_BEGIN_CHAR, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR -
方法概要
修饰符和类型方法说明intGet offset to local time zone in hours, from 0 to +/- 13 hours.intGet offset to local time zone in minutes, from 0 to +/- 59.voidsetLocalZoneHours(int hours) Set offset to local time zone in hours.voidsetLocalZoneMinutes(int minutes) Set offset to local time zone in minutes.voidSet time and local time zone hours and minutes.toDate()Get date and time asDate.从接口继承的方法 net.sf.marineapi.nmea.sentence.DateSentence
getDate, setDate从接口继承的方法 net.sf.marineapi.nmea.sentence.Sentence
getBeginChar, getFieldCount, getSentenceId, getTalkerId, isAISSentence, isProprietary, isValid, reset, setBeginChar, setTalkerId, toSentence, toSentence, toString从接口继承的方法 net.sf.marineapi.nmea.sentence.TimeSentence
getTime, setTime
-
方法详细资料
-
getLocalZoneHours
int getLocalZoneHours()Get offset to local time zone in hours, from 0 to +/- 13 hours.- 返回:
- Time zone offset
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
getLocalZoneMinutes
int getLocalZoneMinutes()Get offset to local time zone in minutes, from 0 to +/- 59.- 返回:
- Time zone offset
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
setLocalZoneHours
void setLocalZoneHours(int hours) Set offset to local time zone in hours.- 参数:
hours- Offset, from 0 to +/- 13 hours.
-
setLocalZoneMinutes
void setLocalZoneMinutes(int minutes) Set offset to local time zone in minutes.- 参数:
minutes- Offset, from 0 to +/- 59 minutes.
-
setTimeAndLocalZone
Set time and local time zone hours and minutes.- 参数:
t- Time to be inserted in sentence.
-
toDate
Date toDate()Get date and time asDate.- 返回:
Date- 抛出:
DataNotAvailableException- If any of the date/time values is not available.ParseException- If the any of the date/time fields contains invalid value.
-