IoUringAssmEngine: Remove dead wood

This commit is contained in:
2025-11-01 20:18:05 -04:00
parent ba955ef633
commit 972979cc10
2 changed files with 13 additions and 119 deletions
@@ -19,48 +19,18 @@ namespace stim_buff {
class IoUringAssemblyEngine
{
public:
using FrameCompleteCallback = std::function<void(size_t /*frameIndex*/)>;
IoUringAssemblyEngine();
~IoUringAssemblyEngine() = default;
// Configure UDP socket by querying the device's pcloud data socket descriptor
bool setSocketFromDevice(const std::shared_ptr<livoxProto1::Device>& device);
// Start posting N RECVMSG SQEs based on the descriptor; timeoutMs defaults to 15ms
bool start(
FrameAssemblyDesc& desc,
uint8_t* frameBase,
size_t frameStrideBytes,
uint32_t timeoutMs = 15);
void pause();
void resume();
void stop();
void onFrameComplete(FrameCompleteCallback cb);
// Telemetry helpers
static size_t computePointsPerDgram(int returnMode);
static size_t computePointsPerFrame(int returnMode, size_t nDgramsPerFrame)
{ return computePointsPerDgram(returnMode) * nDgramsPerFrame; }
private:
int udpFd;
std::atomic<bool> running;
std::atomic<bool> paused;
FrameCompleteCallback frameCb;
// Cached descriptor for reuse across iterations
FrameAssemblyDesc* desc;
uint8_t* frameBase;
size_t frameStrideBytes;
uint32_t timeoutMs;
size_t frameIndex;
// Internal helpers
void postReceives();
void handleCqesAndTimeout();
void cancelIncompleteAndFillDummies();
};