NMEA: detectio of the optional tag block in front of a sentence, ignoring it for...
[marnav.git] / src / marnav / nmea / pgrmm.hpp
blob0b5d9029beff6f101a0b46f2b87345a2b9277ff3
1 #ifndef __MARNAV__NMEA__PGRMM__HPP__
2 #define __MARNAV__NMEA__PGRMM__HPP__
4 #include <marnav/nmea/sentence.hpp>
5 #include <marnav/utils/optional.hpp>
7 namespace marnav
9 namespace nmea
11 MARNAV_NMEA_DECLARE_SENTENCE_PARSE_FUNC(pgrmm)
13 /// @brief PGRMM - Garmin Map Datum
14 ///
15 /// @code
16 /// 1
17 /// |
18 /// $PGRMM,c--c*hh<CR><LF>
19 /// @endcode
20 ///
21 /// Field Number:
22 ///
23 /// 1. Map datum, variable length
24 ///
25 /// Example: <tt>$PGRMM,WGS 84*06</tt>
26 ///
27 class pgrmm : public sentence
29 MARNAV_NMEA_SENTENCE_FRIENDS(pgrmm)
31 public:
32 constexpr static const sentence_id ID = sentence_id::PGRMM;
33 constexpr static const char * TAG = "PGRMM";
35 pgrmm();
36 pgrmm(const pgrmm &) = default;
37 pgrmm & operator=(const pgrmm &) = default;
38 pgrmm(pgrmm &&) = default;
39 pgrmm & operator=(pgrmm &&) = default;
41 protected:
42 pgrmm(talker talk, fields::const_iterator first, fields::const_iterator last);
43 virtual std::vector<std::string> get_data() const override;
45 private:
46 std::string map_datum;
48 public:
49 decltype(map_datum) get_map_datum() const { return map_datum; }
51 void set_map_datum(const std::string & t) noexcept;
56 #endif