14 explicit NotGSVException(
const std::string& context,
const std::string& details =
"") :
15 NmeaException(context,
"The sentence is not a GSV sentence", details) {}
24 std::optional<unsigned int>
snr{};
27 GSV(std::string talkerId,
28 unsigned int totalSentences,
29 unsigned int sentenceNumber,
30 unsigned int satellitesInView,
31 std::vector<SatelliteInfo> satellites,
32 std::optional<unsigned int> signalId = std::nullopt
38 GSV& operator=(
GSV&&) noexcept = default;
40 ~
GSV() override = default;
51 std::optional<
unsigned int>
getSignalId() const noexcept;
54 bool operator==(const
GSV& other) const noexcept;
57 unsigned int totalSentences_{};
58 unsigned int sentenceNumber_{};
59 unsigned int satellitesInView_{};
60 std::vector<SatelliteInfo> satellites_{};
61 std::optional<unsigned int> signalId_{};
65 GSV(Message0183 baseMessage,
66 unsigned int totalSentences,
67 unsigned int sentenceNumber,
68 unsigned int satellitesInView,
69 std::vector<SatelliteInfo> satellites,
70 std::optional<unsigned int> signalId
73 static std::unique_ptr<GSV> create(std::unique_ptr<Message0183> baseMessage);
74 static std::string composeRaw(
const std::string& talkerId,
75 unsigned int totalSentences,
76 unsigned int sentenceNumber,
77 unsigned int satellitesInView,
78 const std::vector<SatelliteInfo>& satellites,
79 std::optional<unsigned int> signalId);
Defines a base class for NMEA messages, encapsulating common properties and behaviors.
Base exception class for all NMEA library errors.
unsigned int getTotalSentences() const noexcept
GSV(std::string talkerId, unsigned int totalSentences, unsigned int sentenceNumber, unsigned int satellitesInView, std::vector< SatelliteInfo > satellites, std::optional< unsigned int > signalId=std::nullopt)
std::optional< unsigned int > getSignalId() const noexcept
GSV(GSV &&) noexcept=default
GSV & operator=(const GSV &)=default
const std::vector< SatelliteInfo > & getSatellites() const noexcept
std::size_t getSatelliteCount() const noexcept
unsigned int getSentenceNumber() const noexcept
bool hasSignalId() const noexcept
std::unique_ptr< nmealib::Message > clone() const override
Creates a polymorphic deep copy of this message.
unsigned int getSatellitesInView() const noexcept
std::string getStringContent(bool verbose) const noexcept override
Returns a human-readable string representation of the message content.
const SatelliteInfo * getSatellite(std::size_t index) const noexcept
Represents an NMEA 0183 sentence.
Registry for message type creators.
Factory for creating typed NMEA 0183 message objects from raw sentence strings.
NotGSVException(const std::string &context, const std::string &details="")
std::optional< unsigned int > snr