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:
@@ -14,8 +14,6 @@
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/asio/deadline_timer.hpp>
|
||||
#include <spinLock.h>
|
||||
#include <user/spMcRingBuffer.h>
|
||||
#include "stimulusFrame.h"
|
||||
#include "deviceAttachmentSpec.h"
|
||||
|
||||
namespace smo {
|
||||
@@ -33,29 +31,12 @@ namespace stim_buff {
|
||||
*/
|
||||
class StimulusProducer
|
||||
{
|
||||
public:
|
||||
class PcloudFormatDesc
|
||||
{
|
||||
public:
|
||||
enum class Format
|
||||
{
|
||||
XYZ,
|
||||
XYZI,
|
||||
};
|
||||
|
||||
public:
|
||||
Format format;
|
||||
};
|
||||
|
||||
public:
|
||||
explicit StimulusProducer(
|
||||
const std::shared_ptr<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),
|
||||
nDeferrals(0)
|
||||
@@ -86,6 +67,8 @@ public:
|
||||
{ frameAssemblyRateLimiter.release(); }
|
||||
|
||||
protected:
|
||||
SpinLock frameAssemblyRateLimiter;
|
||||
|
||||
// Virtual functions for derived classes to override
|
||||
virtual int getStopDelayMs() const
|
||||
{
|
||||
@@ -99,11 +82,6 @@ private:
|
||||
|
||||
public:
|
||||
std::shared_ptr<device::DeviceAttachmentSpec> deviceAttachmentSpec;
|
||||
std::vector<StimulusFrame> frames_;
|
||||
|
||||
protected:
|
||||
SpinLock frameAssemblyRateLimiter;
|
||||
SpMcRingBuffer ringBuffer;
|
||||
|
||||
private:
|
||||
boost::asio::io_service& ioService;
|
||||
|
||||
Reference in New Issue
Block a user