| 
 | |||||||||
| 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 char | ALTERNATIVE_BEGIN_CHARAlternative sentence begin character used in VDO and VDM sentences. | 
| static char | BEGIN_CHARSentence begin character | 
| static char | CHECKSUM_DELIMITERChecksum field delimiter char | 
| static char | FIELD_DELIMITERSentence data fields delimiter char | 
| static int | MAX_LENGTHMaximum length of NMEA 0183 sentences, including BEGIN_CHARandTERMINATOR. | 
| static String | TERMINATORSentence terminator <CR><LF>. | 
| Method Summary | |
|---|---|
|  char | getBeginChar()Get the sentence begin character. | 
|  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 | reset()Resets the sentence contents, i.e. removes all existing values from data fields. | 
|  void | setBeginChar(char ch)Set the sentence begin character. | 
|  void | setTalkerId(TalkerId id)Set the talker ID of the sentence. | 
|  String | toSentence()Formats and validates the String representation of sentence. | 
|  String | toSentence(int maxLength)Formats and validates the sentence like toSentence(), but checks
 also that resulting String does not exceed specified length. | 
|  String | toString()Returns the String representation of the sentence, without line terminator CR/LR. | 
| Field Detail | 
|---|
static final char ALTERNATIVE_BEGIN_CHAR
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
<CR><LF>.
| Method Detail | 
|---|
char getBeginChar()
int getFieldCount()
String getSentenceId()
$GPGGA the method returns SentenceId.GGA.
SentenceIdTalkerId getTalkerId()
$ in sentence address field. For example, in case of
 $GPGGA, the method returns TalkerId.GP.
boolean isProprietary()
boolean isValid()
void reset()
void setBeginChar(char ch)
ch - Sentence begin char to set ('$' or '!')BEGIN_CHAR, 
ALTERNATIVE_BEGIN_CHARvoid setTalkerId(TalkerId id)
id - TalkerId to setString toSentence()
SentenceValidator, notice
 that resulting sentence length is not checked. To also validate the
 length, use toSentence(int).
toString().
IllegalStateException - If formatting results in invalid sentence.toString()String toSentence(int maxLength)
toSentence(), but checks
 also that resulting String does not exceed specified length.
toString().
IllegalStateException - If formatting results in invalid sentence
           or specified maximum length is exceeded.toSentence(), 
MAX_LENGTHString toString()
CR/LR. Checksum is calculated and appended at the
 end of the sentence, but no validation is done. Use toSentence()
 to also validate the result.
toString in class Object| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||