Client for receiving frames from a Carbon LiDAR sensor.
Definition carbon_client.hpp:40
static void resetTerminationFlag()
Resets the termination flag.
CarbonClient(CarbonClient &&)=delete
VoyantFrameWrapper latestFrame_
Definition carbon_client.hpp:127
static volatile std::sig_atomic_t terminated_
Definition carbon_client.hpp:129
SdlStatus pollSdl()
Poll for SDL command confirmation via heartbeat. Call repeatedly after sendSdl() returns Pending.
const VoyantFrameWrapper & latestFrame() const
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.
CarbonClientHandleC * handle_
Definition carbon_client.hpp:124
CarbonClient(const CarbonConfig &config)
Construct a CarbonClient from a CarbonConfig. The config is cloned internally — it remains valid afte...
VoyantFrameWrapper & latestFrame()
Access the latest received frame.
bool isRunning() const
Returns true if the client is running and no shutdown has been requested.
bool start()
Start receiving and processing data.
std::unique_ptr< uint8_t[]> buffer_
Definition carbon_client.hpp:125
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:126
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.
bool tryReceiveFrame()
Try to receive the latest frame if one is available.
Configuration for the Carbon LiDAR pipeline.
Definition carbon_config.hpp:29
Wrapper for VoyantFrame messages.
Definition voyant_frame_wrapper.hpp:19
Definition carbon_client_ffi.hpp:28
Definition voyant_types_ffi.hpp:292
SdlStatus
Definition voyant_types_ffi.hpp:50