UNPKG

extended-nmea

Version:

A TypeScript library for parsing NMEA0183-like sentences with support for custom and proprietary sentences.

32 lines (31 loc) 1.25 kB
import { NmeaSentence } from "./NmeaSentence"; import { RawNmeaSentence } from "./RawNmeaSentence"; import { IQuerySentence } from "../interfaces"; export declare class QuerySentence extends NmeaSentence implements IQuerySentence { /** * Create a NMEA0183 sentence from a string. * * @param data The line to interpret as an NMEA0183 sentence. Can also be an existing Sentence. * @param prefix The prefix to use when validating the sentence. * @param suffix The suffix to use when validating the sentence. */ constructor(data: RawNmeaSentence, prefix?: string, suffix?: string); /** * The first field in the sentence (usually includes a talker id/sentence id). */ protected get idField(): string; /** * The mnemonic being requested by the listener. Usually three characters. */ get mnemonic(): string; /** * Returns the first two characters in the first field as per NMEA0183 standard. */ get talkerId(): string; /** * Returns the first third and fourth characters in the first field as per NMEA0183 standard. */ get listenerId(): string; get valid(): boolean; get invalidReason(): null | string; }