31 std::optional<Ipv4>
ip;
45 std::optional<FovSettings>
fov;
70struct HostSetupKeyValues
75 HostSetupKeyValues() =
default;
79 HostSetupKeyValues & operator=(HostSetupKeyValues &&) noexcept = default;
80 HostSetupKeyValues(const HostSetupKeyValues &) = delete;
81 HostSetupKeyValues & operator=(const HostSetupKeyValues &) = delete;
82 ~HostSetupKeyValues() = default;
Synchronous command channel to one LiDAR. Move-only.
Definition session.hpp:211
Symbol visibility helpers.
Key definitions and typed encoders/decoders for the Mid-360 key-value list (section "0x0102 LiDAR Inf...
The livox_mid360_core library: everything declared by the public headers.
Definition bytes.hpp:14
constexpr std::uint16_t kDefaultHostImuPort
host port for IMU
Definition protocol.hpp:43
HostSetupKeyValues host_setup_key_values(const HostSetup &setup, const Ipv4 &host_ip)
Build the first 0x0100 request of apply_host_setup() for setup.
DataType
Sample format of a data packet (data_type of the header).
Definition protocol.hpp:125
@ kCartesian32
int32 mm, 14 bytes/point, default
Definition protocol.hpp:127
std::expected< HostSetupResult, SessionError > apply_host_setup(Session &session, const HostSetup &setup, std::optional< RequestOptions > opts=std::nullopt)
Apply setup through session.
std::array< std::uint8_t, 4 > Ipv4
IPv4 address in network order, e.g. {192, 168, 1, 12}.
Definition keys.hpp:93
constexpr std::uint16_t kDefaultHostPointCloudPort
host port for point cloud
Definition protocol.hpp:42
constexpr std::uint16_t kDefaultHostPushPort
host port for 0x0102 push
Definition protocol.hpp:41
Pure-function protocol layer for the Livox Mid-360: framing, parsing and serialisation of control-com...
Session layer: discovery and synchronous command round-trips with one Mid-360.
The 0x0100 payload of the first request, without the session: values are views into storage,...
Definition config.hpp:71
HostSetupKeyValues(HostSetupKeyValues &&) noexcept=default
Moves keep values valid: the views follow the moved storage buffer.
std::vector< std::byte > storage
encoded values
Definition config.hpp:72
std::vector< KeyValue > values
views into storage
Definition config.hpp:73
Outcome of apply_host_setup().
Definition config.hpp:60
bool reboot_required
One of the ACKs returned 0x21: the LiDAR applies the change after a reboot.
Definition config.hpp:62
std::optional< WorkState > final_state
Set when work_tgt_mode was requested and wait_timeout was non-zero.
Definition config.hpp:64
What the LiDAR needs to know about this host.
Definition config.hpp:28
std::optional< DetectMode > detect_mode
Detection mode (key 0x0018, issue #46), time filter (key 0x0026, issue #54) and IMU sensor config (ke...
Definition config.hpp:49
std::uint16_t point_port
point cloud, key 0x0006
Definition config.hpp:33
std::optional< WorkState > work_tgt_mode
Target work mode (key 0x001A).
Definition config.hpp:39
DataType pcl_data_type
key 0x0000
Definition config.hpp:35
std::optional< bool > time_filter
key 0x0026, see detect_mode
Definition config.hpp:50
std::uint16_t push_port
0x0102 push, key 0x0005
Definition config.hpp:32
std::chrono::milliseconds wait_timeout
After setting work_tgt_mode, poll 0x8006 until it is observed.
Definition config.hpp:55
std::optional< ImuSensorConfig > imu_sensor_config
key 0x002B, see detect_mode
Definition config.hpp:51
std::optional< FovSettings > fov
FOV windows / enable mask (issue #39) applied in the same request as the host keys,...
Definition config.hpp:45
std::optional< Ipv4 > ip
Host address the LiDAR sends to.
Definition config.hpp:31
std::uint16_t imu_port
IMU, key 0x0007.
Definition config.hpp:34
std::optional< ScanPattern > scan_pattern
Scan pattern (key 0x0001, issue #40). Empty: leave the stored value alone.
Definition config.hpp:41
bool imu_enable
key 0x001C
Definition config.hpp:36
Timeout and retry policy of one request.
Definition session.hpp:143
Error of a Session call or of discover(). Only the fields named by kind are meaningful.
Definition session.hpp:59