1 #ifndef MARNAV__SEATALK__MESSAGE_22__HPP
2 #define MARNAV__SEATALK__MESSAGE_22__HPP
4 #include <marnav/seatalk/message.hpp>
11 /// @brief Total Mileage
16 /// Total Mileage: XXXX/10 nautical miles
19 class message_22
: public message
22 constexpr static const message_id ID
= message_id::total_mileage
;
23 constexpr static size_t SIZE
= 5;
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
);
34 uint32_t distance_
; // in 1/10th nautical miles
37 uint32_t get_distance() const noexcept
{ return distance_
; }
39 void set_distance(uint32_t t
) noexcept
{ distance_
= t
; }