Add SpMcRingBuffer to base class StimulusBuffer
This will hopefully genericise the interface for Stimbuffs.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user