NmeaSentence Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Base class for Nmea Sentences. All sentences can be constructed using three different approaches:
- A constructor taking a talker sentence and a time is used for automatic message construction by the parser or for manual decoding
- A constructor taking the talker id and a field list is used as helper function for the parser.
- A constructor taking individual values for the data is used to construct new messages to be sent out. If sending out messages, you might want to use the third constructor, it is usually the one with most arguments and not taking a talker sentence, as this is added automatically from the static field OwnTalkerId.
public abstract class NmeaSentence
type NmeaSentence = class
Public MustInherit Class NmeaSentence
- Inheritance
-
NmeaSentence
- Derived
Constructors
NmeaSentence(TalkerId, SentenceId, DateTimeOffset) |
Constructs an instance of this abstract class |
Fields
DefaultTalkerId |
The default talker id of ourselves (applied when we send out messages) |
gregorianCalendar |
The julian calendar (the one that most of the world uses) |
Properties
Age |
Age of this message |
DateTime |
The time tag on this message |
OwnTalkerId |
Our own talker ID (default when we send messages ourselves) |
ReplacesOlderInstance |
True if an instance of this message type can be discarded if a newer instance of the same message type is available. Used to prevent buffer overflow on outgoing streams. |
SentenceId |
The sentence Id of this packet |
TalkerId |
The talker (sender) of this message |
Valid |
True if the contents of this message are valid / understood This is false if the message type could be decoded, but the contents seem invalid or there's no useful data |
Methods
AgeTo(DateTimeOffset) |
The relative age of this sentence against a time stamp. Useful when analyzing recorded data, where "now" should also be a time in the past. |
ParseDateTime(DateTimeOffset, String) |
Parses a date and a time field or any possible combinations of those |
ParseDateTime(String, String) |
Parses a date and a time field or any possible combinations of those |
ReadChar(IEnumerator<String>) |
Decodes the next field into a char |
ReadInt(IEnumerator<String>) |
Decodes the next field into an int |
ReadString(IEnumerator<String>) |
Decodes the next field into a string |
ReadValue(IEnumerator<String>) |
Decodes the next field into a double |
ToNmeaMessage() |
Translates the properties of this instance into an NMEA message |
ToNmeaParameterList() |
Translates the properties of this instance into an NMEA message body, without TalkerId, SentenceId and checksum. |
ToReadableContent() |
Gets an user-readable string about this message |
ToString() |
Generates a readable instance of this string. Not overridable, use ToReadableContent() to override. (this is to prevent confusion with ToNmeaMessage().) Do not use this method to create an NMEA sentence. |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for