Voyant API 0.16.0
Loading...
Searching...
No Matches
carbon_client.hpp File Reference
#include <carbon_client_ffi.hpp>
#include <carbon_config.hpp>
#include <csignal>
#include <cstdint>
#include <memory>
#include <sdl_types_generated.hpp>
#include <voyant_frame_wrapper.hpp>
#include <voyant_types_ffi.hpp>

Go to the source code of this file.

Classes

class  CarbonClient
 Client for receiving frames from a Carbon LiDAR sensor. More...

Functions

SdlCommandParams toSdlCommand (const SensorState &state)
 Convert a heartbeat-confirmed SensorState into a sendable SdlCommandParams.
SdlCommandParams makeLinescanCommand (SdlState reqState, float rampBandwidthGhz, float hfovCenterDeg=0.0f)
 Build a static-line (linescan) SdlCommandParams.

Function Documentation

◆ makeLinescanCommand()

SdlCommandParams makeLinescanCommand ( SdlState reqState,
float rampBandwidthGhz,
float hfovCenterDeg = 0.0f )

Build a static-line (linescan) SdlCommandParams.

HFOV is pinned to 0° (the mirror parks). There is no frame-rate parameter: the firmware fixes the line rate at 900 fps. Pass the result to sendSdl()/sendSdlBlocking().

Note
Beam steering is temporarily unsupported (MCU firmware v2.5.0 / FPGA v1.3.3) — the sensor centers the mirror regardless — so hfovCenterDeg must be 0; a non-zero value is rejected by sendSdl()/sendSdlBlocking().
Parameters
reqStateRequested sensor state.
rampBandwidthGhzRamp bandwidth in GHz.
hfovCenterDegBeam steer center in degrees (must be 0 — steering temporarily unsupported).
Returns
SdlCommandParams describing a static line.

◆ toSdlCommand()

SdlCommandParams toSdlCommand ( const SensorState & state)

Convert a heartbeat-confirmed SensorState into a sendable SdlCommandParams.

Initializes all fields of the returned SdlCommandParams from SDL readback in the given state. Change only the fields you need, then pass to sendSdlBlocking().

Parameters
stateSnapshot from CarbonClient::getSensorState().
Returns
SdlCommandParams ready for sendSdlBlocking().
Exceptions
std::runtime_errorif the state contains Unknown device_state or ramp_length, or invalid/out-of-range field values (such as numeric SDL parameters).