1 #ifndef MARNAV__SEATALK__MESSAGE_54__HPP
2 #define MARNAV__SEATALK__MESSAGE_54__HPP
4 #include <marnav/seatalk/message.hpp>
18 /// 6 MSBits of RST = minutes = (RS & 0xFC) / 4
19 /// 6 LSBits of RST = seconds = ST & 0x3F
22 /// Corresponding NMEA sentences: RMC, GAA, BWR, BWC
24 class message_54
: public message
27 constexpr static const message_id ID
= message_id::gmt_time
;
28 constexpr static size_t SIZE
= 4;
31 message_54(const message_54
&) = default;
32 message_54
& operator=(const message_54
&) = default;
34 virtual raw
get_data() const override
;
36 static std::unique_ptr
<message
> parse(const raw
& data
);
44 uint8_t get_hour() const noexcept
{ return hour_
; }
45 uint8_t get_minute() const noexcept
{ return minute_
; }
46 uint8_t get_second() const noexcept
{ return second_
; }
48 void set_time(uint8_t h
, uint8_t m
, uint8_t s
) noexcept
;