1 #ifndef MARNAV__NMEA__R00__HPP
2 #define MARNAV__NMEA__R00__HPP
5 #include <marnav/nmea/sentence.hpp>
6 #include <marnav/nmea/waypoint.hpp>
7 #include <marnav/utils/optional.hpp>
13 /// @brief R00 - Waypoints in active route
18 /// $--R00,c---c,c---c,....*hh<CR><LF>
24 class r00
: public sentence
26 friend class detail::factory
;
29 constexpr static sentence_id ID
= sentence_id::R00
;
30 constexpr static const char * TAG
= "R00";
31 constexpr static int max_waypoint_ids
= 14;
34 r00(const r00
&) = default;
35 r00
& operator=(const r00
&) = default;
36 r00(r00
&&) = default;
37 r00
& operator=(r00
&&) = default;
40 r00(talker talk
, fields::const_iterator first
, fields::const_iterator last
);
41 virtual void append_data_to(std::string
&) const override
;
44 std::array
<utils::optional
<waypoint
>, max_waypoint_ids
> waypoint_id_
;
46 void check_index(int index
) const;
49 utils::optional
<waypoint
> get_waypoint_id(int index
) const;
51 void set_waypoint_id(int index
, const waypoint
& id
);