213 bool startPeakDump(
const std::string& path, uint64_t maxFrames = 0, uint64_t maxPeaks = 0,
bool addTimestamp =
false);
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.
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...
VoyantFrameWrapper latestFrame_
Definition carbon_client.hpp:246
static volatile std::sig_atomic_t terminated_
Definition carbon_client.hpp:248
SdlStatus pollSdl()
Poll for SDL command confirmation after sendSdl().
const VoyantFrameWrapper & latestFrame() const
bool waitForHeartbeat()
Block until the sensor's first heartbeat arrives, or a fixed timeout elapses.
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.
bool startPeakDump(const std::string &path, uint64_t maxFrames=0, uint64_t maxPeaks=0, bool addTimestamp=false)
Begin dumping the raw peak stream to a CSV file while the point cloud keeps running....
CarbonClientHandleC * handle_
Definition carbon_client.hpp:243
CarbonClient(const CarbonConfig &config)
Construct a CarbonClient from a CarbonConfig. The config is cloned internally — it remains valid afte...
VoyantFrameWrapper & latestFrame()
Access the frame most recently dequeued by tryReceiveFrame().
bool isPeakDumping() const
Returns true while a peak dump is running.
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.
TimeSyncState getTimeSyncState() const
Get the latest host↔FPGA time-sync state (quality, offset, jitter).
std::unique_ptr< uint8_t[]> buffer_
Definition carbon_client.hpp:244
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
static constexpr size_t kBufferSize_
Definition carbon_client.hpp:245
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.
void stopPeakDump()
Request the active peak dump to stop. Returns immediately; the file ends on a whole frame....
bool tryReceiveFrame()
Try to receive the next frame from the internal buffer.
Configuration for the Carbon LiDAR pipeline.
Definition carbon_config.hpp:29
Wrapper for VoyantFrame messages.
Definition voyant_frame_wrapper.hpp:19
SdlState
Enum for sdl::set_state register.
Definition sdl_types_generated.hpp:20
Definition carbon_client_ffi.hpp:51
Definition voyant_types_ffi.hpp:326
Definition voyant_types_ffi.hpp:344
SdlStatus
Definition voyant_types_ffi.hpp:50