OClCollMeshEngn,PcloudStimProd: port to sscl::co coros

We've now ported the OpenClCollMeshEngn and PcloudStimProd::produceFrameReq
portions of the Livox pipeline to coros.
This commit is contained in:
2026-05-30 19:32:19 -04:00
parent 1cf1be4194
commit 35eb466a60
7 changed files with 398 additions and 373 deletions
@@ -3,11 +3,12 @@
#include <functional>
#include <atomic>
#include <optional>
#include <exception>
#include <user/stimulusProducer.h>
#include <user/stimulusFrame.h>
#include <livoxProto1/device.h>
#include <spinscale/cps/asynchronousContinuation.h>
#include <spinscale/cps/callback.h>
#include <spinscale/co/invokers.h>
#include <user/stagingBuffer.h>
#include "ioUringAssemblyEngine.h"
#include "livoxPcloudFrameDumper.h"
@@ -83,12 +84,13 @@ public:
protected:
void stimFrameProductionTimesliceInd() override;
// Callback function type for produceFrameReq
typedef std::function<void()> produceFrameReqCbFn;
void holdProduceFrameCReq();
sscl::co::NonViralNonPostingInvoker produceFrameCReq(
std::exception_ptr& exceptionPtr,
std::function<void()> completion);
public:
void produceFrameReq(sscl::cps::Callback<produceFrameReqCbFn> callback);
size_t nDgramsPerStagingBufferFrame;
std::shared_ptr<livoxProto1::Device> device;
PcloudFormatDesc formatDesc;
@@ -111,8 +113,8 @@ public:
std::atomic<std::shared_ptr<PcloudDarkAmbienceStimulusBuffer>>
darkAmbienceStimulusBuffer;
private:
class ProduceFrameReq;
std::optional<sscl::co::NonViralNonPostingInvoker> activeProduceFrameInvoker;
std::exception_ptr produceFrameExceptionPtr;
};
} // namespace stim_buff