10 default:
return "InvalidType";
17 : rawData_(std::move(raw)), type_(type), timestamp_(ts) {}
34 return type_ == other.type_ &&
35 rawData_ == other.rawData_;
43 rawData_ = std::move(r);
Defines a base class for NMEA messages, encapsulating common properties and behaviors.
void setType(Type t) noexcept
Sets the message type.
void setRaw(std::string r) noexcept
Sets the raw data string.
std::chrono::system_clock::time_point TimePoint
const std::string & getRawData() const noexcept
Returns the raw, unmodified data string as received.
Type getType() const noexcept
Returns the message type.
Type
Defines the type of NMEA message, allowing for differentiation between various standards.
void setTimestamp(TimePoint ts) noexcept
Sets the message timestamp.
TimePoint getTimestamp() const noexcept
Returns the timestamp associated with this message.
static std::string typeToString(Type t)
Converts a Message::Type enum value to its string representation.
bool operator==(const Message &other) const noexcept
Compares two Message objects for equality based on their content.