1 #ifndef __SEATALK__MESSAGE_20__HPP__
2 #define __SEATALK__MESSAGE_20__HPP__
4 #include <marnav/seatalk/message.hpp>
11 /// @brief Speed through water
16 /// Speed through water: XXXX/10 Knots
19 /// Corresponding NMEA sentence: VHW
21 class message_20
: public message
24 constexpr static const message_id ID
= message_id::speed_through_water
;
25 constexpr static size_t SIZE
= 4;
28 message_20(const message_20
&) = default;
29 message_20
& operator=(const message_20
&) = default;
31 virtual raw
get_data() const override
;
33 static std::unique_ptr
<message
> parse(const raw
& data
);
36 uint16_t speed
; // speed in 1/10th of knots
39 uint16_t get_speed() const noexcept
{ return speed
; }
41 void set_speed(uint16_t t
) noexcept
{ speed
= t
; }