48 std::span<const std::byte> data)
noexcept;
56 std::span<const std::byte>
data;
Symbol visibility helpers.
The livox_mid360_core library: everything declared by the public headers.
Definition bytes.hpp:14
std::expected< DebugDataControlRequest, ParseError > parse_debug_data_control(std::span< const std::byte > data) noexcept
enable is any non-zero byte; bytes after the ninth are ignored.
std::array< std::byte, kDebugDataControlSize > encode_debug_data_control(const DebugDataControlRequest &req) noexcept
0x0303 payload: {enable u8, host_ip u8[4], host_port u16, reserved u16}, little-endian.
constexpr std::size_t kDebugDataControlSize
Size of the 0x0303 request payload in bytes.
Definition debug_data.hpp:25
constexpr std::uint16_t kDefaultHostDebugDataPort
as SDK2 (#93)
Definition protocol.hpp:45
Pure-function protocol layer for the Livox Mid-360: framing, parsing and serialisation of control-com...
0x0303 request: start (enable) or stop the stream towards host_ip:host_port.
Definition debug_data.hpp:29
std::uint16_t host_port
destination UDP port
Definition debug_data.hpp:32
std::uint16_t reserved
reserved in the protocol document; SDK2 calls it bandwidth (Mbps) and sends 0.
Definition debug_data.hpp:35
friend bool operator==(const DebugDataControlRequest &, const DebugDataControlRequest &)=default
Field-wise comparison.
bool enable
start (true) or stop the stream
Definition debug_data.hpp:30
std::array< std::uint8_t, 4 > host_ip
destination IPv4 address, in order
Definition debug_data.hpp:31
What Device hands to a DebugDataCallback: one datagram of the stream, not interpreted (receive thread...
Definition debug_data.hpp:53
std::uint64_t host_receive_time_ns
Datagram::recv_time_ns of the datagram.
Definition debug_data.hpp:54
Endpoint from
the LiDAR, port 60301 on a Mid-360
Definition debug_data.hpp:55
std::span< const std::byte > data
the datagram as received
Definition debug_data.hpp:56
IPv4 address + UDP port. Mid-360 is IPv4 only.
Definition transport.hpp:37
UDP transport layer: a thin, dependency-free wrapper over POSIX sockets.