1 #ifndef __SEATALK__MESSAGE_24__HPP__
2 #define __SEATALK__MESSAGE_24__HPP__
4 #include <marnav/seatalk/message.hpp>
11 /// @brief Display units for Mileage and Speed
17 /// 0x00 : nautical miles (1852m), knots (nautical miles per hour)
18 /// 0x06 : statute miles (1609.3m), statute miles per hour
19 /// 0x86 : kilometers (1000m), kilometers per hour
22 class message_24
: public message
25 constexpr static const message_id ID
= message_id::display_units_mileage_speed
;
27 enum unit_type
: uint8_t {
28 nautical_miles
= 0x00,
31 statute_miles_per_hour
= 0x06,
33 kilometers_per_hour
= 0x86,
37 message_24(const message_24
&) = default;
38 message_24
& operator=(const message_24
&) = default;
40 virtual raw
get_data() const override
;
42 static std::unique_ptr
<message
> parse(const raw
& data
);
48 unit_type
get_unit() const noexcept
{ return unit
; }
50 void set_unit(unit_type t
) noexcept
{ unit
= t
; }