25 explicit NotXDRException(
const std::string& context,
const std::string& details =
"") :
26 NmeaException(context,
"The sentence is not an XDR sentence", details) {}
65 XDR(std::string talkerId, std::vector<TransducerMeasurement> transducers);
70 XDR& operator=(
XDR&&) noexcept = default;
72 ~
XDR() override = default;
119 bool operator==(const
XDR& other) const noexcept;
128 static std::unique_ptr<
XDR> create(std::unique_ptr<
Message0183> baseMessage);
129 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 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 XDR sentence.
NotXDRException(const std::string &context, const std::string &details="")
Construct a NotXDRException with context and optional details.
Represents a parsed NMEA 0183 XDR (Transducer Measurement) sentence.
std::size_t getTransducerCount() const noexcept
Get the number of transducer measurements in this sentence.
XDR & operator=(const XDR &)=default
const std::vector< TransducerMeasurement > & getTransducers() const noexcept
Get all transducer measurements in this sentence.
std::string getStringContent(bool verbose) const noexcept override
Return a human-readable string representation of this message.
std::unique_ptr< nmealib::Message > clone() const override
Create a polymorphic copy of this XDR message.
XDR(XDR &&) noexcept=default
const TransducerMeasurement * getTransducer(std::size_t index) const noexcept
Get a transducer measurement by index.
One transducer measurement quadruplet in an XDR sentence.
std::string name
Free-form transducer name/label.
char units
Single-character units code.
char transducerType
Single-character transducer type identifier.
double measurement
Numeric measurement value.