Add SpMcRingBuffer to base class StimulusBuffer

This will hopefully genericise the interface for Stimbuffs.
This commit is contained in:
2025-11-01 00:06:42 -04:00
parent 5af7e531b6
commit cdade17905
4 changed files with 29 additions and 5 deletions
+5
View File
@@ -13,6 +13,7 @@
#include <boost/asio/deadline_timer.hpp>
#include <spinLock.h>
#include <asynchronousBridge.h>
#include <user/spMcRingBuffer.h>
#include "stimFrame.h"
#include "deviceAttachmentSpec.h"
@@ -48,8 +49,11 @@ public:
public:
explicit StimulusBuffer(
const device::DeviceAttachmentSpec& deviceAttachmentSpec,
size_t nSlots,
const SpMcRingBuffer::InputEngineConstraints& ringBufferConstraints,
boost::asio::io_service& ioService)
: deviceAttachmentSpec(deviceAttachmentSpec),
ringBuffer(nSlots, ringBufferConstraints),
ioService(ioService),
shouldContinue(false), timer(ioService)
{}
@@ -89,6 +93,7 @@ public:
protected:
SpinLock frameAssemblyRateLimiter;
SpMcRingBuffer ringBuffer;
private:
boost::asio::io_service& ioService;