22 explicit NotMWVException(
const std::string& context,
const std::string& details =
"") :
23 NmeaException(context,
"The sentence is not an MWV sentence", details) {}
49 MWV(std::string talkerId,
60 MWV& operator=(
MWV&&) noexcept = default;
62 ~
MWV() override = default;
98 bool operator==(const
MWV& other) const noexcept;
104 char windSpeedUnits_{};
109 MWV(Message0183 baseMessage,
117 static std::unique_ptr<MWV> create(std::unique_ptr<Message0183> baseMessage);
118 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 MWV (Wind Speed and Angle) sentence.
MWV(MWV &&) noexcept=default
char getReference() const noexcept
Get reference indicator.
std::unique_ptr< nmealib::Message > clone() const override
Create a polymorphic copy of this MWV message.
double getWindSpeed() const noexcept
Get wind speed value.
double getWindAngle() const noexcept
Get wind angle in degrees.
char getStatus() const noexcept
Get data status indicator.
std::string getStringContent(bool verbose) const noexcept override
Return a human-readable string representation of this message.
MWV & operator=(const MWV &)=default
char getWindSpeedUnits() const noexcept
Get wind speed unit indicator.
MWV(std::string talkerId, double windAngle, char reference, double windSpeed, char windSpeedUnits, char status)
Construct an MWV message from individual field values.
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 MWV sentence.
NotMWVException(const std::string &context, const std::string &details="")
Construct a NotMWVException with context and optional details.