IoUringAssmEngine: Add skeleton setup/finalize
Also add dependency on liburing. This patch adds basic io_uring_queue_init and io_uring_exit support and calls.
This commit is contained in:
@@ -8,28 +8,45 @@
|
||||
#include <vector>
|
||||
#include <chrono>
|
||||
#include <atomic>
|
||||
|
||||
#include <liburing.h>
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/asio/deadline_timer.hpp>
|
||||
#include <livoxProto1/device.h>
|
||||
|
||||
#include "frameAssemblyDesc.h"
|
||||
|
||||
namespace smo {
|
||||
namespace stim_buff {
|
||||
|
||||
class PcloudStimulusBuffer;
|
||||
|
||||
class IoUringAssemblyEngine
|
||||
{
|
||||
public:
|
||||
IoUringAssemblyEngine();
|
||||
explicit IoUringAssemblyEngine(PcloudStimulusBuffer& parent);
|
||||
~IoUringAssemblyEngine() = default;
|
||||
|
||||
bool setup();
|
||||
void finalize();
|
||||
void resetAndAssembleFrame();
|
||||
void stop();
|
||||
|
||||
// Telemetry helpers
|
||||
static size_t computePointsPerDgram(int returnMode);
|
||||
static size_t computePointsPerFrame(int returnMode, size_t nDgramsPerFrame)
|
||||
{ return computePointsPerDgram(returnMode) * nDgramsPerFrame; }
|
||||
|
||||
private:
|
||||
PcloudStimulusBuffer& parent;
|
||||
|
||||
// Cached descriptor for reuse across iterations
|
||||
FrameAssemblyDesc* desc;
|
||||
std::shared_ptr<FrameAssemblyDesc> frameAssemblyDesc;
|
||||
|
||||
// io_uring infrastructure
|
||||
struct io_uring ring;
|
||||
bool isSetup;
|
||||
|
||||
// Stall detection timer
|
||||
boost::asio::deadline_timer stallTimer;
|
||||
|
||||
void cancelIncompleteAndFillDummies();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user