22 explicit NotDBTException(
const std::string& context,
const std::string& details =
"") :
23 NmeaException(context,
"The sentence is not a DBT sentence", details) {}
50 DBT(std::string talkerId,
62 DBT& operator=(
DBT&&) noexcept = default;
64 ~
DBT() override = default;
131 bool operator==(const
DBT& other) const noexcept;
136 double depthMeters_{};
138 double depthFathoms_{};
143 DBT(Message0183 baseMessage,
152 static std::unique_ptr<DBT> create(std::unique_ptr<Message0183> baseMessage);
153 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 DBT (Depth Below Transducer) sentence.
char getMetersUnit() const noexcept
Get the meters unit indicator.
DBT(std::string talkerId, double depthFeet, char feetUnit, double depthMeters, char metersUnit, double depthFathoms, char fathomsUnit)
Construct a DBT message from individual field values.
std::unique_ptr< nmealib::Message > clone() const override
Create a polymorphic copy of this DBT message.
std::string getStringContent(bool verbose) const noexcept override
Return a human-readable string representation of this message.
char getFeetUnit() const noexcept
Get the feet unit indicator.
DBT(DBT &&) noexcept=default
char getFathomsUnit() const noexcept
Get the fathoms unit indicator.
double getDepthFeet() const noexcept
Get the depth in feet.
double getDepthMeters() const noexcept
Get the depth in meters.
double getDepthFathoms() const noexcept
Get the depth in fathoms.
DBT & operator=(const DBT &)=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 DBT sentence.
NotDBTException(const std::string &context, const std::string &details="")
Construct a NotDBTException with context and optional details.