22 explicit NotDPTException(
const std::string& context,
const std::string& details =
"") :
23 NmeaException(context,
"The sentence is not a DPT sentence", details) {}
47 DPT(std::string talkerId,
48 double waterDepthMeters,
49 double transducerOffset,
56 DPT& operator=(
DPT&&) noexcept = default;
58 ~
DPT() override = default;
90 bool operator==(const
DPT& other) const noexcept;
93 double waterDepthMeters_{};
94 double transducerOffset_{};
95 double maxRangeScale_{};
99 DPT(Message0183 baseMessage,
100 double waterDepthMeters,
101 double transducerOffset,
105 static std::unique_ptr<DPT> create(std::unique_ptr<Message0183> baseMessage);
106 static std::string composeRaw(
const std::string& talkerId,
107 double waterDepthMeters,
108 double transducerOffset,
109 double maxRangeScale);
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 DPT (Depth of Water) sentence.
DPT & operator=(const DPT &)=default
double getMaxRangeScale() const noexcept
Get maximum range scale in meters.
std::string getStringContent(bool verbose) const noexcept override
Return a human-readable string representation of this message.
double getTransducerOffset() const noexcept
Get transducer offset in meters.
std::unique_ptr< nmealib::Message > clone() const override
Create a polymorphic copy of this DPT message.
DPT(DPT &&) noexcept=default
double getWaterDepthMeters() const noexcept
Get water depth in meters.
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 DPT sentence.
NotDPTException(const std::string &context, const std::string &details="")
Construct a NotDPTException with context and optional details.