Client for receiving frames from a Carbon LiDAR sensor.
Definition carbon_client.hpp:38
static void resetTerminationFlag()
Resets the termination flag.
CarbonClient(CarbonClient &&)=delete
VoyantFrameWrapper latestFrame_
Definition carbon_client.hpp:105
static volatile std::sig_atomic_t terminated_
Definition carbon_client.hpp:107
const VoyantFrameWrapper & latestFrame() const
static bool isTerminated()
Returns true if a termination signal has been received.
CarbonClientHandleC * handle_
Definition carbon_client.hpp:102
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:103
CarbonClient & operator=(const CarbonClient &)=delete
static constexpr size_t kBufferSize_
Definition carbon_client.hpp:104
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