55 lines
1.7 KiB
C++
55 lines
1.7 KiB
C++
#ifndef _LIVOX_GEN1_PCLOUD_STIMULUS_BUFFER_H
|
|
#define _LIVOX_GEN1_PCLOUD_STIMULUS_BUFFER_H
|
|
|
|
#include <user/stimulusBuffer.h>
|
|
#include <user/stimFrame.h>
|
|
#include <livoxProto1/device.h>
|
|
#include "stagingBuffer.h"
|
|
|
|
namespace smo {
|
|
namespace stim_buff {
|
|
|
|
/**
|
|
* PcloudStimulusBuffer is a specialized StimulusBuffer for point cloud data.
|
|
*
|
|
* This class extends StimulusBuffer to handle point cloud-specific stimulus
|
|
* frames, particularly those generated from LiDAR point cloud data. It
|
|
* provides additional functionality for managing point cloud frame metadata
|
|
* and processing.
|
|
*/
|
|
class PcloudStimulusBuffer
|
|
: public StimulusBuffer
|
|
{
|
|
public:
|
|
explicit PcloudStimulusBuffer(
|
|
const device::DeviceAttachmentSpec& deviceAttachmentSpec,
|
|
std::shared_ptr<livoxProto1::Device> &device,
|
|
const PcloudFormatDesc& formatDesc,
|
|
size_t nDgramsPerStagingBufferFrame)
|
|
: StimulusBuffer(deviceAttachmentSpec),
|
|
deviceAttachmentSpec(deviceAttachmentSpec), device(device),
|
|
formatDesc(formatDesc), stagingBuffer(
|
|
StagingBuffer::InputEngineConstraints::ioUringConstraints,
|
|
OpenClConstraints(), nDgramsPerStagingBufferFrame)
|
|
{}
|
|
|
|
~PcloudStimulusBuffer() = default;
|
|
|
|
// Non-copyable, movable
|
|
PcloudStimulusBuffer(const PcloudStimulusBuffer&) = delete;
|
|
PcloudStimulusBuffer& operator=(const PcloudStimulusBuffer&) = delete;
|
|
PcloudStimulusBuffer(PcloudStimulusBuffer&&) = default;
|
|
PcloudStimulusBuffer& operator=(PcloudStimulusBuffer&&) = default;
|
|
|
|
public:
|
|
device::DeviceAttachmentSpec deviceAttachmentSpec;
|
|
std::shared_ptr<livoxProto1::Device> device;
|
|
PcloudFormatDesc formatDesc;
|
|
StagingBuffer stagingBuffer;
|
|
};
|
|
|
|
} // namespace stim_buff
|
|
} // namespace smo
|
|
|
|
#endif // _LIVOX_GEN1_PCLOUD_STIMULUS_BUFFER_H
|