22 explicit NotZDAException(
const std::string& context,
const std::string& details =
"") :
23 NmeaException(context,
"The sentence is not a ZDA sentence", details) {}
49 ZDA(std::string talkerId,
61 ZDA& operator=(
ZDA&&) noexcept = default;
63 ~
ZDA() override = default;
75 unsigned int getDay() const noexcept;
77 unsigned int getMonth() const noexcept;
79 unsigned int getYear() const noexcept;
101 bool operator==(const
ZDA& other) const noexcept;
106 unsigned int month_{};
107 unsigned int year_{};
108 int localZoneHours_{};
109 int localZoneMinutes_{};
113 ZDA(Message0183 baseMessage,
122 static std::unique_ptr<ZDA> create(std::unique_ptr<Message0183> baseMessage);
123 static std::string composeRaw(
const std::string& talkerId,
129 int localZoneMinutes);
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 ZDA sentence.
NotZDAException(const std::string &context, const std::string &details="")
Construct a NotZDAException with context and optional details.
Represents a parsed NMEA 0183 ZDA (Time and Date) sentence.
std::unique_ptr< nmealib::Message > clone() const override
Create a polymorphic copy of this ZDA message.
unsigned int getYear() const noexcept
Get four-digit year.
int getLocalZoneMinutes() const noexcept
Get local zone offset minutes.
ZDA(ZDA &&) noexcept=default
double getUtcTime() const noexcept
Get UTC time in hhmmss.ss numeric form.
ZDA(std::string talkerId, double utcTime, unsigned int day, unsigned int month, unsigned int year, int localZoneHours, int localZoneMinutes)
Construct a ZDA message from individual field values.
int getLocalZoneHours() const noexcept
Get local zone offset hours.
ZDA & operator=(const ZDA &)=default
unsigned int getMonth() const noexcept
Get month number.
unsigned int getDay() const noexcept
Get day of month.
std::string getStringContent(bool verbose) const noexcept override
Return a human-readable string representation of this message.