PcloudStimBuff: add skeleton produceFrameReq :)

Big waves.
This function wraps the operation of getting a stimframe from
the SpMcRingBuffer, and then eventually assigning it a
SimultaneityStamp. For now we just always pass in the first
stim frame and we don't get any simulstamps.

Its callOriginalCallback() automatically calls
allowNextStimulusFrame() to ensure that it doesn't deadlock future
timeslices.
This commit is contained in:
2025-11-10 01:02:06 -04:00
parent eedeb4b803
commit 401c844fcc
2 changed files with 85 additions and 36 deletions
@@ -47,13 +47,11 @@ public:
protected:
void stimFrameProductionTimesliceInd() override;
// Callback function type for assembleAndProduceStimulusFrameReq
typedef std::function<void(SimultaneityStamp)>
assembleAndProduceStimulusFrameReqCbFn;
// Callback function type for produceFrameReq
typedef std::function<void()> produceFrameReqCbFn;
public:
void assembleAndProduceStimulusFrameReq(
smo::Callback<assembleAndProduceStimulusFrameReqCbFn> callback);
void produceFrameReq(smo::Callback<produceFrameReqCbFn> callback);
std::shared_ptr<livoxProto1::Device> device;
PcloudFormatDesc formatDesc;
@@ -63,7 +61,7 @@ public:
StagingBuffer collationBuffer;
private:
class AssembleAndProduceStimulusFrameReq;
class ProduceFrameReq;
};
} // namespace stim_buff