extended-nmea
Version:
A TypeScript library for parsing NMEA0183-like sentences with support for custom and proprietary sentences.
29 lines (28 loc) • 1.07 kB
TypeScript
import { SentenceType } from "../SentenceType";
export interface INmeaSentence {
/**
* The raw line given to the constructor. Can be changed.
*/
raw: string;
/**
* Whether or not this sentence is a valid NMEA0183 sentence.
*
* All data is transmitted in the form of sentences. Only printable ASCII characters are allowed, plus CR (carriage
* return) and LF (line feed). Each sentence starts with a "$" sign and ends with <CR><LF>.
*
* It is not guaranteed that this will also validate the checksum as this depends on the sentence type being implemented.
*/
readonly valid: boolean;
/**
* A possible reason why this sentence is invalid. Requires valid to be invoked at least once and to return false.
*/
readonly invalidReason: null | string;
/**
* Returns all fields (including the first field in the sentence) separated by comma.
*/
readonly fields: string[];
/**
* The type of this sentence.
*/
readonly type: SentenceType;
}