Build: enhance docker use, reducing build options, cleanup
[marnav.git] / src / marnav / seatalk / message_22.hpp
blob5871bb508384426cb28eed4394e3ebabf5280d1c
1 #ifndef MARNAV__SEATALK__MESSAGE_22__HPP
2 #define MARNAV__SEATALK__MESSAGE_22__HPP
4 #include <marnav/seatalk/message.hpp>
6 namespace marnav
8 namespace seatalk
11 /// @brief Total Mileage
12 ///
13 /// @code
14 /// 22 02 XX XX 00
15 ///
16 /// Total Mileage: XXXX/10 nautical miles
17 /// @endcode
18 ///
19 class message_22 : public message
21 public:
22 constexpr static const message_id ID = message_id::total_mileage;
23 constexpr static size_t SIZE = 5;
25 message_22();
26 message_22(const message_22 &) = default;
27 message_22 & operator=(const message_22 &) = default;
29 virtual raw get_data() const override;
31 static std::unique_ptr<message> parse(const raw & data);
33 private:
34 uint32_t distance_; // in 1/10th nautical miles
36 public:
37 uint32_t get_distance() const noexcept { return distance_; }
39 void set_distance(uint32_t t) noexcept { distance_ = t; }
44 #endif