bug fix: NMEA/AIS/SeaTalk: cast functions with std::unique_ptr resulted in undefined...
[marnav.git] / src / marnav / ais / ais.hpp
blobdeeb6a14bebebdab5d4034deb6949737852e9fcb
1 #ifndef __MARNAV__AIS__DECODE__HPP__
2 #define __MARNAV__AIS__DECODE__HPP__
4 #include <vector>
5 #include <stdexcept>
6 #include <marnav/ais/message.hpp>
8 namespace marnav
10 namespace ais
12 /// Exception to be thrown if an AIS message is not known/supported.
13 class unknown_message : public std::logic_error
15 public:
16 using logic_error::logic_error;
19 std::unique_ptr<message> make_message(const std::vector<std::pair<std::string, uint32_t>> & v);
20 std::vector<std::pair<std::string, uint32_t>> encode_message(const message & msg);
22 uint8_t decode_armoring(char c);
23 char encode_armoring(uint8_t value);
27 #endif