Split StimulusProducer=>StimulusBuffer+StimulusProducer

We're getting ready for the last mile of the StimulusBuffer API
and the proto-completion of the LivoxGen1 StimBuffApi.
This commit is contained in:
2025-11-14 20:44:37 -04:00
parent 70c0175a8b
commit 8a7dc10892
5 changed files with 96 additions and 46 deletions
+16 -1
View File
@@ -4,6 +4,7 @@
#include <functional>
#include <atomic>
#include <user/stimulusProducer.h>
#include <user/stimulusFrame.h>
#include <livoxProto1/device.h>
#include <asynchronousContinuation.h>
#include <callback.h>
@@ -25,12 +26,25 @@ namespace stim_buff {
class PcloudDataProducer
: public StimulusProducer
{
public:
class PcloudFormatDesc
{
public:
enum class Format
{
XYZ,
XYZI,
};
public:
Format format;
};
public:
explicit PcloudDataProducer(
const std::shared_ptr<device::DeviceAttachmentSpec> &deviceAttachmentSpec,
std::shared_ptr<livoxProto1::Device> &device,
const PcloudFormatDesc& formatDesc,
int histbuffMs,
size_t nDgramsPerStagingBufferFrame);
~PcloudDataProducer() = default;
@@ -61,6 +75,7 @@ public:
IoUringAssemblyEngine ioUringAssemblyEngine;
StagingBuffer collationBuffer;
std::atomic<size_t> nAttachedStimBuffs{0};
StimulusFrame tempStimulusFrame;
private:
class ProduceFrameReq;