1 #include "message_06.hpp"
7 message_06::message_06()
12 message_06::message_06(const raw
& bits
)
15 if ((bits
.size() < SIZE_BITS_HEAD
) || (bits
.size() > SIZE_BITS_MAX
))
16 throw std::invalid_argument
{"invalid number of bits in ais/message_06"};
20 void message_06::read_data(const raw
& bits
)
22 get(bits
, repeat_indicator
);
24 get(bits
, sequence_no
);
26 get(bits
, retransmit_flag
);
30 payload
= raw
{bits
.begin() + SIZE_BITS_HEAD
, bits
.end()};
33 raw
message_06::get_data() const
35 raw
bits(SIZE_BITS_HEAD
);
37 bits
.set(type(), 0, 6);
38 set(bits
, repeat_indicator
);
40 set(bits
, sequence_no
);
42 set(bits
, retransmit_flag
);