livox_mid360_core
C++ driver library for the Livox Mid-360 LiDAR
Loading...
Searching...
No Matches
event.hpp File Reference

Public API (issue #9): notifications and errors of the device layer. More...

#include <array>
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include "livox/mid360/export.hpp"
#include "livox/mid360/hms.hpp"
#include "livox/mid360/keys.hpp"
#include "livox/mid360/protocol.hpp"
#include "livox/mid360/session.hpp"

Go to the source code of this file.

Classes

struct  livox::mid360::DeviceStats
 Counters of one Device, snapshot via Device::stats(). Monotonic since open(). More...
struct  livox::mid360::ContextStats
 Counters of the shared receive side, snapshot via Context::stats(). More...
struct  livox::mid360::Event
 One notification. kind selects which fields are meaningful; the rest are default. More...
struct  livox::mid360::DeviceError
 Errors of Context / Device. Session-level failures are wrapped, not re-encoded. More...

Namespaces

namespace  livox
 Livox LiDAR drivers.
namespace  livox::mid360
 The livox_mid360_core library: everything declared by the public headers.

Enumerations

enum class  livox::mid360::DisconnectReason : std::uint8_t {
  livox::mid360::kNone = 0 , livox::mid360::kPushTimeout , livox::mid360::kCommandTimeout , livox::mid360::kRebootRequested ,
  livox::mid360::kUser
}
 Why a Device left the connected state (Event::reason, issue #8). More...

Functions

std::string_view livox::mid360::to_string (Event::Kind kind) noexcept
 Name of an event kind, e.g. "state_changed".
std::string_view livox::mid360::to_string (DisconnectReason reason) noexcept
 Name of a disconnect reason, e.g. "push_timeout".
std::string livox::mid360::to_string (const Event &event)
 One-line description of an event with the fields its kind uses.
std::string_view livox::mid360::to_string (DeviceError::Kind kind) noexcept
 Name of an error kind, e.g. "invalid_state".
std::string livox::mid360::to_string (const DeviceError &err)
 One-line description of an error, including the wrapped SessionError or key.

Detailed Description

Public API (issue #9): notifications and errors of the device layer.

Plain structs (enum + fields, strings only through to_string) so the phase-3 C ABI can mirror them. State/HMS events come from 0x0102 pushes (#7), disconnect/reconnect from #8.