|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Sentence
Base interface and constants for NMEA 0183 sentences.
Field Summary | |
---|---|
static int |
ADDRESS_FIELD
Address field index, the first field of all sentences. |
static char |
BEGIN_CHAR
Sentence begin character |
static char |
CHECKSUM_DELIMITER
Checksum field delimiter char |
static char |
FIELD_DELIMITER
Sentence data fields delimiter char |
static int |
MAX_LENGTH
Maximum length of NMEA 0183 sentences, including BEGIN_CHAR
and TERMINATOR . |
static String |
TERMINATOR
Sentence terminator (<CR><LF>) |
Method Summary | |
---|---|
int |
getFieldCount()
Returns the current number of data fields in sentence, excluding ID field and checksum. |
String |
getSentenceId()
Get the sentence ID that specifies the sentence type and data it holds. |
TalkerId |
getTalkerId()
Gets the talker ID of the sentence. |
boolean |
isProprietary()
Tells if the sentence is of proprietary format. |
boolean |
isValid()
Tells if the sentence formatting matches NMEA 0183 format. |
void |
setTalkerId(TalkerId id)
Set the talker ID of the sentence. |
String |
toSentence()
Formats and validates the String representation of sentence without the line terminator CR/LF. |
String |
toString()
Returns the String representation of sentence in NMEA 0183 format. |
Field Detail |
---|
static final int ADDRESS_FIELD
static final char BEGIN_CHAR
static final char CHECKSUM_DELIMITER
static final char FIELD_DELIMITER
static final int MAX_LENGTH
BEGIN_CHAR
and TERMINATOR
.
static final String TERMINATOR
Method Detail |
---|
int getFieldCount()
String getSentenceId()
$GPGGA
the method returns SentenceId.GGA
.
SentenceId
TalkerId getTalkerId()
$
in sentence address field. For example, in case of
$GPGGA
, the method returns TalkerId.GP
.
boolean isProprietary()
boolean isValid()
void setTalkerId(TalkerId id)
id
- TalkerId to setString toSentence()
IllegalStateException
- If formatting results in invalid sentence.toString()
String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |