|
livox_mid360_core
C++ driver library for the Livox Mid-360 LiDAR
|
Owns the receive sockets and the receive thread. More...
#include <livox/mid360/context.hpp>
Public Member Functions | |
| Context (const Context &)=delete | |
| Context & | operator= (const Context &)=delete |
| Context (Context &&)=delete | |
| Context & | operator= (Context &&)=delete |
| const ContextOptions & | options () const noexcept |
| Effective options: ports requested as 0 are replaced by the bound ones. | |
| ContextStats | stats () const |
| Snapshot of the receive-side counters. | |
Multi-device | |
| Device * | find (std::string_view serial_number) const |
| The open Device with this serial number, or nullptr. | |
| std::vector< Device * > | devices () const |
| Every open Device, in registration order. | |
Static Public Member Functions | |
| static std::expected< std::unique_ptr< Context >, DeviceError > | create (const ContextOptions &opts={}) |
| Opens the receive sockets and starts the receive thread. | |
Owns the receive sockets and the receive thread.
The thread starts in create() and is joined by the destructor. Every Device opened on a Context must be destroyed before it (asserted in debug builds). Non-copyable, non-movable: Devices hold a reference.
|
staticnodiscard |
Opens the receive sockets and starts the receive thread.
Fails with kInvalidArgument when batch_size is 0, and with kSession (a transport SessionError) when a socket cannot be opened or bound.