SdlCommandParams makeLinescanCommand(SdlState reqState, float rampBandwidthGhz, float hfovCenterDeg=0.0f)
Build a static-line (linescan) SdlCommandParams.
SdlCommandParams toSdlCommand(const SensorState &state)
Convert a heartbeat-confirmed SensorState into a sendable SdlCommandParams.
static void resetTerminationFlag()
Resets the termination flag.
std::string diagnosticCaptureError() const
Why the last diagnostic capture ended badly, if it did.
CarbonClient(CarbonClient &&)=delete
bool applyDefaultBackgroundNoise()
Apply the compiled-in default background-noise calibration for the connected box, blocking until done...
bool ensureIdleForCalibration()
Drive the sensor to Idle using the fixed background-noise calibration config, blocking until confirme...
static volatile std::sig_atomic_t terminated_
Definition carbon_client.hpp:247
SdlStatus pollSdl()
Poll for SDL command confirmation after sendSdl().
bool waitForHeartbeat()
Block until the sensor's first heartbeat arrives, or a fixed timeout elapses.
void stopDiagnosticCapture()
Request the active diagnostic capture to stop. Returns immediately; the file ends on a whole frame....
static bool isTerminated()
Returns true if a termination signal has been received.
SdlStatus sendSdl(const SdlCommandParams &cmd)
Send an SDL command to the sensor FPGA without blocking.
std::optional< VoyantFrame > tryReceiveFrame()
Try to receive the next frame from the internal buffer.
CarbonClientHandleC * handle_
Definition carbon_client.hpp:245
CarbonClient(const CarbonConfig &config)
Construct a CarbonClient from a CarbonConfig. The config is cloned internally — it remains valid afte...
bool isRunning() const
Returns true if the client is running and no shutdown has been requested.
bool start()
Start receiving and processing data.
SdlStatus sendSdlBlocking(const SdlCommandParams &cmd)
Send an SDL command and block until it is confirmed or times out.
bool isDiagnosticCapturing() const
Returns true while a diagnostic capture is running.
bool startDiagnosticCapture(const std::string &path, bool overwrite=false)
Begin a diagnostic capture for Voyant support: the raw peak stream is written to a ....
TimeSyncState getTimeSyncState() const
Get the latest host↔FPGA time-sync state (quality, offset, jitter).
bool refineBackgroundNoise(uint32_t iterations=0)
Refine the background-noise calibration for the connected box from a covered-window capture,...
SensorState getSensorState() const
Get the latest sensor state from the most recent heartbeat.
CarbonClient & operator=(const CarbonClient &)=delete
CarbonClient(const CarbonClient &)=delete
void stop()
Stop receiving and processing data. Safe to call multiple times. Can restart with start().
CarbonClient & operator=(CarbonClient &&)=delete
static void signalHandler(int)
static void setupSignalHandling(int signal=SIGINT)
Set up OS signal handling for graceful termination.
Configuration for the Carbon LiDAR pipeline.
Definition carbon_config.hpp:29
SdlState
Enum for sdl::set_state register.
Definition sdl_types_generated.hpp:20
Definition carbon_client_ffi.hpp:49
Definition voyant_types_ffi.hpp:350
Definition voyant_types_ffi.hpp:519
SdlStatus
Definition voyant_types_ffi.hpp:52