|
nmealib 0.0.4
NMEA 0183/NMEA 2000 parsing library
|
Factory for creating typed NMEA 0183 message objects from raw sentence strings. More...
#include <nmea0183Factory.h>
Static Public Member Functions | |
| static std::unique_ptr< Message0183 > | create (const std::string &raw, Message::TimePoint ts=std::chrono::system_clock::now()) |
| Creates a typed NMEA 0183 message from a raw sentence string. | |
Factory for creating typed NMEA 0183 message objects from raw sentence strings.
The factory parses the sentence type field of the raw input and returns the most specific concrete type available (e.g., GGA, RMC, GLL ...). If no specific type matches, a base Message0183 is returned.
Definition at line 18 of file nmea0183Factory.h.
|
static |
Creates a typed NMEA 0183 message from a raw sentence string.
| raw | The raw NMEA 0183 sentence string to parse. |
| ts | Optional timestamp to associate with the message; defaults to the current system time. |
NMEALIB_NO_EXCEPTIONS, returns nullptr on failure. | TooLongSentenceException | If the input string exceeds the maximum allowed length of 82 characters. |
| InvalidStartCharacterException | If the input string does not start with either '$' or '!'. |
Definition at line 7 of file nmea0183Factory.cpp.