livox_mid360_core
C++ driver library for the Livox Mid-360 LiDAR
Loading...
Searching...
No Matches
livox::mid360::HostSetup Struct Reference

What the LiDAR needs to know about this host. More...

#include <livox/mid360/config.hpp>

Public Attributes

std::optional< Ipv4 > ip
 Host address the LiDAR sends to.
std::uint16_t push_port = kDefaultHostPushPort
 0x0102 push, key 0x0005
std::uint16_t point_port = kDefaultHostPointCloudPort
 point cloud, key 0x0006
std::uint16_t imu_port = kDefaultHostImuPort
 IMU, key 0x0007.
DataType pcl_data_type = DataType::kCartesian32
 key 0x0000
bool imu_enable = true
 key 0x001C
std::optional< WorkState > work_tgt_mode
 Target work mode (key 0x001A).
std::optional< ScanPattern > scan_pattern
 Scan pattern (key 0x0001, issue #40). Empty: leave the stored value alone.
std::optional< FovSettings > fov
 FOV windows / enable mask (issue #39) applied in the same request as the host keys, so a reconnect restores them.
std::optional< DetectMode > detect_mode
 Detection mode (key 0x0018, issue #46), time filter (key 0x0026, issue #54) and IMU sensor config (key 0x002B, issue #47).
std::optional< bool > time_filter
 key 0x0026, see detect_mode
std::optional< ImuSensorConfig > imu_sensor_config
 key 0x002B, see detect_mode
std::chrono::milliseconds wait_timeout {20000}
 After setting work_tgt_mode, poll 0x8006 until it is observed.

Detailed Description

What the LiDAR needs to know about this host.

Sent as one 0x0100 request (keys 0x0005, 0x0006, 0x0007, 0x0000, 0x001C in that order, then scan_pattern 0x0001 and the present fov keys 0x0015 / 0x0016 / 0x0017 when set) followed, when work_tgt_mode is set, by a second one with 0x001A. Keys not listed here (0x0004 lidar ipcfg, attitude, ...) are left to Session::configure.

Member Data Documentation

◆ ip

std::optional<Ipv4> livox::mid360::HostSetup::ip

Host address the LiDAR sends to.

Empty: the session socket's local address, which must then not be 0.0.0.0 (bind to a specific interface) → kInvalidArgument otherwise.

◆ work_tgt_mode

std::optional<WorkState> livox::mid360::HostSetup::work_tgt_mode

Target work mode (key 0x001A).

Only kSampling, kIdle and kReady are accepted; anything else → kInvalidArgument with error_key 0x001A. Empty: leave the mode unchanged.

◆ fov

std::optional<FovSettings> livox::mid360::HostSetup::fov

FOV windows / enable mask (issue #39) applied in the same request as the host keys, so a reconnect restores them.

Out-of-range window → kInvalidArgument with its key. Empty: leave the stored FOV alone.

◆ detect_mode

std::optional<DetectMode> livox::mid360::HostSetup::detect_mode

Detection mode (key 0x0018, issue #46), time filter (key 0x0026, issue #54) and IMU sensor config (key 0x002B, issue #47).

Empty: leave the stored value alone. The IMU config key is missing on older firmware, so an absent optional is the safe default.

◆ wait_timeout

std::chrono::milliseconds livox::mid360::HostSetup::wait_timeout {20000}

After setting work_tgt_mode, poll 0x8006 until it is observed.

0: return right after the ACK. A Mid-360 spends up to 10.1 s in MOTORSTARTUP when started shortly after a stop (#221), hence twice that.


The documentation for this struct was generated from the following file: