接口 RTESentence
- 所有超级接口:
Sentence
GPS route data and list of waypoints.
Example:
$GPRTE,1,1,c,0,MELIN,RUSKI,KNUDAN*25
- 作者:
- Kimmo Tuukkanen
-
字段概要
从接口继承的字段 net.sf.marineapi.nmea.sentence.Sentence
ALTERNATIVE_BEGIN_CHAR, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR -
方法概要
修饰符和类型方法说明intaddWaypointId(String id) Add a waypoint ID at the end of waypoint list.Get the number or name of the route.intGet the number of sentences in RTE sequence.intGet the index of sentence in RTE sequence.intGet the number of waypoints IDs in this sentence.String[]Get the list of route waypoints.booleanTells if the sentence holds a current active route data.booleanisFirst()Tells if this is the first sentence in RTE sequence.booleanisLast()Tells if this is the last sentence in RTE sequence.booleanTells if the sentence holds a current working route data.voidsetRouteId(String id) Set the route name or number.voidsetRouteType(RouteType type) Set the type of route.voidsetSentenceCount(int count) Set the number of sentences in RTE sequence.voidsetSentenceIndex(int index) Set the index of sentence in RTE sequence.voidsetWaypointIds(String[] ids) Set the list of route waypoints.从接口继承的方法 net.sf.marineapi.nmea.sentence.Sentence
getBeginChar, getFieldCount, getSentenceId, getTalkerId, isAISSentence, isProprietary, isValid, reset, setBeginChar, setTalkerId, toSentence, toSentence, toString
-
方法详细资料
-
addWaypointId
Add a waypoint ID at the end of waypoint list. The number of waypoint id fields is increased by one on each addition.- 参数:
id- Waypoint ID to add.- 返回:
- The total number of waypoint IDs after addition.
-
getRouteId
String getRouteId()Get the number or name of the route.- 返回:
- Route ID or name as String
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
getSentenceCount
int getSentenceCount()Get the number of sentences in RTE sequence.- 返回:
- integer
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.- 另请参阅:
-
getSentenceIndex
int getSentenceIndex()Get the index of sentence in RTE sequence.- 返回:
- integer
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.- 另请参阅:
-
getWaypointCount
int getWaypointCount()Get the number of waypoints IDs in this sentence.- 返回:
- Waypoint count
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
getWaypointIds
String[] getWaypointIds()Get the list of route waypoints.- 返回:
- Waypoint IDs as String array
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
isActiveRoute
boolean isActiveRoute()Tells if the sentence holds a current active route data.- 返回:
- true if active route, otherwise false.
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If the field contains unexpected or illegal value.
-
isFirst
boolean isFirst()Tells if this is the first sentence in RTE sequence.- 返回:
- true if there's no sentences left, otherwise false.
- 抛出:
DataNotAvailableException- If the sentence index or sentence count is not available.ParseException- If sentence index or count fields contain unexpected or illegal value.
-
isLast
boolean isLast()Tells if this is the last sentence in RTE sequence.- 返回:
- true if there's no sentences left, otherwise false.
- 抛出:
DataNotAvailableException- If the sentence index or sentence count is not available.ParseException- If sentence index or count fields contain unexpected or illegal value.
-
isWorkingRoute
boolean isWorkingRoute()Tells if the sentence holds a current working route data.- 返回:
- true if working route, otherwise false.
- 抛出:
DataNotAvailableException- If the data is not available.ParseException- If status field contains illegal value.
-
setRouteId
Set the route name or number.- 参数:
id- Route ID or name as String
-
setRouteType
Set the type of route.- 参数:
type- RouteType to set
-
setSentenceCount
void setSentenceCount(int count) Set the number of sentences in RTE sequence.- 参数:
count- Sentence count in sequence- 抛出:
IllegalArgumentException- If the specified count is negative.
-
setSentenceIndex
void setSentenceIndex(int index) Set the index of sentence in RTE sequence.- 参数:
index- Sentence index in sequence- 抛出:
IllegalArgumentException- If specified index is negative.
-
setWaypointIds
Set the list of route waypoints.- 参数:
ids- String array of waypoint IDs
-