23 explicit NotHDMException(
const std::string& context,
const std::string& details =
"") :
24 NmeaException(context,
"The sentence is not an HDM sentence", details) {}
60 HDM(std::string talkerId,
67 HDM& operator=(
HDM&&) noexcept = default;
69 ~
HDM() override = default;
113 bool operator==(const
HDM& other) const noexcept;
121 HDM(Message0183 baseMessage,
123 char indicator)
noexcept;
125 static std::unique_ptr<HDM> create(std::unique_ptr<Message0183> baseMessage);
126 static std::string composeRaw(
const std::string& talkerId,
Defines a base class for NMEA messages, encapsulating common properties and behaviors.
Base exception class for all NMEA library errors.
Represents a parsed NMEA 0183 HDM (Heading – Magnetic) sentence.
double getHeading() const noexcept
Get the vessel heading in degrees magnetic.
HDM & operator=(const HDM &)=default
std::string getStringContent(bool verbose) const noexcept override
Return a human-readable string representation of this message.
char getIndicator() const noexcept
Get the magnetic heading indicator character.
std::unique_ptr< nmealib::Message > clone() const override
Create a polymorphic copy of this HDM message.
HDM(HDM &&) noexcept=default
Represents an NMEA 0183 sentence.
Registry for message type creators.
Factory for creating typed NMEA 0183 message objects from raw sentence strings.
Exception thrown when a sentence is not a valid HDM sentence.
NotHDMException(const std::string &context, const std::string &details="")
Construct a NotHDMException with context and optional details.