waterlinkedsonar
C++ client library for the Water Linked Sonar 3D-15
Loading...
Searching...
No Matches
rip.hpp
Go to the documentation of this file.
1
3
4#ifndef WATERLINKEDSONAR_RIP_HPP
5#define WATERLINKEDSONAR_RIP_HPP
6
7#include <cstddef>
8#include <cstdint>
9#include <memory>
10#include <string>
11#include <variant>
13
15
17enum class DecodeStatus : std::uint8_t {
18 OK,
27};
28
30const char* to_string(DecodeStatus status);
31
36struct Decoded {
38 std::variant<std::monostate, RangeImageView, BitmapImageView, ImuBatchView>
41 std::string unknown_type_url;
42};
43
56class Decoder {
57 public:
60 Decoder(Decoder&&) noexcept;
61 Decoder& operator=(Decoder&&) noexcept;
62 Decoder(const Decoder&) = delete;
63 Decoder& operator=(const Decoder&) = delete;
64
72 Decoded decode(const std::uint8_t* data, std::size_t size);
73
74 private:
75 struct Impl;
76 std::unique_ptr<Impl> impl_;
77};
78
79} // namespace waterlinked::sonar::rip
80
81#endif // WATERLINKEDSONAR_RIP_HPP
Range Image Protocol codec (https://docs.waterlinked.com/sonar-3d/sonar-3d-15-api/).
Definition rip.hpp:56
Decoder(Decoder &&) noexcept
Decoded decode(const std::uint8_t *data, std::size_t size)
Decodes one datagram.
Views of the decoded RIP messages: range images, bitmap images and IMU batches.
Definition rip.hpp:14
const char * to_string(DecodeStatus status)
Human-readable name for a decode status; a static string, never null.
DecodeStatus
Outcome of decoding one datagram.
Definition rip.hpp:17
@ UNKNOWN_TYPE
Valid packet carrying a message type other than the three published ones.
Result of Decoder::decode().
Definition rip.hpp:36
std::string unknown_type_url
Type URL of the skipped message when status is UNKNOWN_TYPE.
Definition rip.hpp:41
DecodeStatus status
Definition rip.hpp:37
std::variant< std::monostate, RangeImageView, BitmapImageView, ImuBatchView > payload
Definition rip.hpp:39