|
waterlinkedsonar
C++ client library for the Water Linked Sonar 3D-15
|
Decodes Range Image Protocol packets (https://docs.waterlinked.com/sonar-3d/sonar-3d-15-api/). More...
#include <waterlinkedsonar/rip/decoder.hpp>
Public Member Functions | |
| Decoder () | |
| Creates a decoder; buffers are allocated on first use. | |
| ~Decoder () | |
| Frees the buffers, invalidating the views returned by decode(). | |
| Decoder (Decoder &&other) noexcept | |
Takes over the buffers of other, which may only be destroyed or assigned to afterwards. | |
| Decoder & | operator= (Decoder &&other) noexcept |
| Same as the move constructor. | |
| Decoder (const Decoder &)=delete | |
| Decoder & | operator= (const Decoder &)=delete |
| Decoded | decode (Span< const std::uint8_t > packet) |
Decodes one packet that spans all of packet. | |
Decodes Range Image Protocol packets (https://docs.waterlinked.com/sonar-3d/sonar-3d-15-api/).
A packet is the magic "RIP2" or "RIP1", the little-endian uint32 packet length, the payload, and the little-endian IEEE CRC-32 of everything before it. The payload is a serialized Packet protobuf, snappy-compressed in RIP2.
The decoder reuses its buffers, so it stops allocating once they fit the stream. Views it returns are valid until its next decode() call, destruction or move. Not thread-safe.