LivoxProto1: Rename pcloudDataSocketDesc=>pcloudDataFdDesc
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
namespace smo {
|
||||
namespace stim_buff {
|
||||
|
||||
inline LivoxProto1DllState& getLivoxProto1State() { return livoxProto1; }
|
||||
|
||||
struct DummyLivoxEthHeader
|
||||
{
|
||||
enum : uint32_t {
|
||||
@@ -47,8 +49,15 @@ bool IoUringAssemblyEngine::setup()
|
||||
{ return false; }
|
||||
|
||||
// Get point cloud data socket descriptor from UdpCommandDemuxer
|
||||
int udpFd = (*livoxProto1.livoxProto1_getPcloudDataFdDesc)()
|
||||
->native_handle();
|
||||
auto& livoxState = getLivoxProto1State();
|
||||
if (!livoxState.livoxProto1_getPcloudDataFdDesc)
|
||||
{ return false; }
|
||||
pcloudDataFdDesc = (*livoxState.livoxProto1_getPcloudDataFdDesc)();
|
||||
if (!pcloudDataFdDesc)
|
||||
{ return false; }
|
||||
|
||||
// Get UDP socket file descriptor
|
||||
int udpFd = pcloudDataFdDesc->native_handle();
|
||||
if (udpFd < 0)
|
||||
{ return false; }
|
||||
|
||||
@@ -87,7 +96,7 @@ void IoUringAssemblyEngine::resetAndAssembleFrame()
|
||||
// 1. Submit frameAssemblyDesc->numSlots RECVMSG SQEs using io_uring_prep_recvmsg()
|
||||
// - Each SQE receives into frameAssemblyDesc->slots[i].vaddr
|
||||
// - With size frameAssemblyDesc->slots[i].nBytes
|
||||
// - Socket FD from pcloudDataSocketDesc->native_handle()
|
||||
// - Socket FD from pcloudDataFdDesc->native_handle()
|
||||
// 2. Submit batch via io_uring_submit(&ring)
|
||||
// 3. Set up stall timer using stallTimer with appropriate timeout
|
||||
// - SQEs are independent and can arrive out of order
|
||||
|
||||
@@ -47,7 +47,7 @@ private:
|
||||
bool isSetup;
|
||||
|
||||
// Point cloud data socket descriptor
|
||||
std::shared_ptr<boost::asio::posix::stream_descriptor> pcloudDataSocketDesc;
|
||||
std::shared_ptr<boost::asio::posix::stream_descriptor> pcloudDataFdDesc;
|
||||
|
||||
// Stall detection timer
|
||||
boost::asio::deadline_timer stallTimer;
|
||||
|
||||
Reference in New Issue
Block a user