|
livox_mid360_core
C++ driver library for the Livox Mid-360 LiDAR
|
UDP transport layer: a thin, dependency-free wrapper over POSIX sockets. More...
#include <array>#include <chrono>#include <cstddef>#include <cstdint>#include <expected>#include <optional>#include <span>#include <string>#include <string_view>#include <vector>#include "livox/mid360/export.hpp"Go to the source code of this file.
Classes | |
| struct | livox::mid360::Endpoint |
| IPv4 address + UDP port. Mid-360 is IPv4 only. More... | |
| struct | livox::mid360::TransportError |
| Error of a transport call: a category plus the errno it came from. More... | |
| struct | livox::mid360::Datagram |
| One received UDP datagram. More... | |
| struct | livox::mid360::SocketOptions |
| Options of UdpSocket::open(). More... | |
| class | livox::mid360::UdpSocket |
| Non-blocking IPv4 UDP socket. Move-only; closes the descriptor on destruction. More... | |
| struct | livox::mid360::ReadyEvent |
| One socket reported by Poller::wait(). More... | |
| class | livox::mid360::Poller |
| Waits for readability on a set of sockets. More... | |
Namespaces | |
| namespace | livox |
| Livox LiDAR drivers. | |
| namespace | livox::mid360 |
| The livox_mid360_core library: everything declared by the public headers. | |
Functions | |
| std::optional< Endpoint > | livox::mid360::parse_endpoint (std::string_view text) |
| Parse "a.b.c.d" (port = 0) or "a.b.c.d:port". Returns nullopt on malformed input. | |
| std::string | livox::mid360::to_string (const Endpoint &ep) |
| Format as "a.b.c.d:port". | |
| std::string | livox::mid360::ip_to_string (const std::array< std::uint8_t, 4 > &ip) |
| Format only the address part, "a.b.c.d". | |
| std::string_view | livox::mid360::to_string (TransportErrorCode code) |
| Short snake_case name, e.g. "would_block". | |
| std::string | livox::mid360::to_string (const TransportError &err) |
| Human readable "code (strerror)" text. | |
Variables | |
| constexpr std::size_t | livox::mid360::kMaxDatagramSize = 1500 |
| Maximum datagram size worth allocating for: Ethernet MTU. | |
UDP transport layer: a thin, dependency-free wrapper over POSIX sockets.
Design (see issue #2):