net.sf.marineapi.nmea.sentence
Interface RTESentence

All Superinterfaces:
Sentence

public interface RTESentence
extends Sentence

GPS route data and list of waypoints.

Example:
$GPRTE,1,1,c,0,MELIN,RUSKI,KNUDAN*25

Version:
$Revision: 50 $
Author:
Kimmo Tuukkanen

Field Summary
 
Fields inherited from interface net.sf.marineapi.nmea.sentence.Sentence
ADDRESS_FIELD, BEGIN_CHAR, CHECKSUM_DELIMITER, FIELD_DELIMITER, MAX_LENGTH, TERMINATOR
 
Method Summary
 int addWaypointId(String id)
          Add a waypoint ID at the end of waypoint list.
 String getRouteId()
          Get the number or name of the route.
 int getSentenceCount()
          Get the number of sentences in RTE sequence.
 int getSentenceIndex()
          Get the index of sentence in RTE sequence.
 int getWaypointCount()
          Get the number of waypoints IDs in this sentence.
 String[] getWaypointIds()
          Get the list of route waypoints.
 boolean isActiveRoute()
          Tells if the sentence holds a current active route data.
 boolean isFirst()
          Tells if this is the first sentence in RTE sequence.
 boolean isLast()
          Tells if this is the last sentence in RTE sequence.
 boolean isWorkingRoute()
          Tells if the sentence holds a current working route data.
 void setRouteId(String id)
          Set the route name or number.
 void setRouteType(RouteType type)
          Set the type of route.
 void setSentenceCount(int count)
          Set the number of sentences in RTE sequence.
 void setSentenceIndex(int index)
          Set the index of sentence in RTE sequence.
 void setWaypointIds(String[] ids)
          Set the list of route waypoints.
 
Methods inherited from interface net.sf.marineapi.nmea.sentence.Sentence
getFieldCount, getSentenceId, getTalkerId, isProprietary, isValid, setTalkerId, toSentence, toString
 

Method Detail

addWaypointId

int addWaypointId(String id)
Add a waypoint ID at the end of waypoint list. The number of waypoint id fields is increased by one on each addition.

Parameters:
id - Waypoint ID to add.
Returns:
The total number of waypoint IDs after addition.

getRouteId

String getRouteId()
Get the number or name of the route.

Returns:
Route ID or name as String
Throws:
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.

Returns:
integer
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If the field contains unexpected or illegal value.
See Also:
getSentenceIndex()

getSentenceIndex

int getSentenceIndex()
Get the index of sentence in RTE sequence.

Returns:
integer
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If the field contains unexpected or illegal value.
See Also:
getSentenceCount()

getWaypointCount

int getWaypointCount()
Get the number of waypoints IDs in this sentence.

Returns:
Waypoint count
Throws:
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.

Returns:
Waypoint IDs as String array
Throws:
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.

Returns:
true if active route, otherwise false.
Throws:
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.

Returns:
true if there's no sentences left, otherwise false.
Throws:
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.

Returns:
true if there's no sentences left, otherwise false.
Throws:
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.

Returns:
true if working route, otherwise false.
Throws:
DataNotAvailableException - If the data is not available.
ParseException - If status field contains illegal value.

setRouteId

void setRouteId(String id)
Set the route name or number.

Parameters:
id - Route ID or name as String

setRouteType

void setRouteType(RouteType type)
Set the type of route.

Parameters:
type - RouteType to set

setSentenceCount

void setSentenceCount(int count)
Set the number of sentences in RTE sequence.

Parameters:
count - Sentence count in sequence
Throws:
IllegalArgumentException - If the specified count is negative.

setSentenceIndex

void setSentenceIndex(int index)
Set the index of sentence in RTE sequence.

Parameters:
index - Sentence index in sequence
Throws:
IllegalArgumentException - If specified index is negative.

setWaypointIds

void setWaypointIds(String[] ids)
Set the list of route waypoints.

Parameters:
ids - String array of waypoint IDs


Copyright (C) 2010-2011 Java Marine API author(s). All Rights Reserved.