SApiMgr:attDevReq: use body||world thread for i/e-devs
We now pass in the correct ComponentThread based on the type of device that's being attached.
This commit is contained in:
@@ -51,14 +51,10 @@ static LivoxProto1DllState livoxProto1;
|
||||
static std::vector<std::shared_ptr<livoxProto1::Device>> g_attachedDevices;
|
||||
|
||||
// Callback function declarations
|
||||
extern "C" int livoxGen1_initializeInd(void);
|
||||
extern "C" int livoxGen1_finalizeInd(void);
|
||||
extern "C" void livoxGen1_attachDeviceReq(
|
||||
const std::shared_ptr<smo::device::DeviceAttachmentSpec>& desc,
|
||||
smo::sense_api::sal_mlo_attachDeviceReqCbFn cb);
|
||||
extern "C" void livoxGen1_detachDeviceReq(
|
||||
const std::shared_ptr<smo::device::DeviceAttachmentSpec>& desc,
|
||||
smo::sense_api::sal_mlo_detachDeviceReqCbFn cb);
|
||||
extern "C" sal_mlo_initializeIndFn livoxGen1_initializeInd;
|
||||
extern "C" sal_mlo_finalizeIndFn livoxGen1_finalizeInd;
|
||||
extern "C" sal_mlo_attachDeviceReqFn livoxGen1_attachDeviceReq;
|
||||
extern "C" sal_mlo_detachDeviceReqFn livoxGen1_detachDeviceReq;
|
||||
|
||||
// Sense API descriptor
|
||||
static const SenseApiDesc livoxGen1ApiDesc = {
|
||||
@@ -155,6 +151,7 @@ extern "C" int livoxGen1_finalizeInd(void)
|
||||
|
||||
extern "C" void livoxGen1_attachDeviceReq(
|
||||
const std::shared_ptr<smo::device::DeviceAttachmentSpec>& desc,
|
||||
const std::shared_ptr<smo::ComponentThread>& componentThread,
|
||||
smo::sense_api::sal_mlo_attachDeviceReqCbFn cb
|
||||
)
|
||||
{
|
||||
@@ -249,7 +246,7 @@ extern "C" void livoxGen1_attachDeviceReq(
|
||||
|
||||
(*livoxProto1.livoxProto1_getOrCreateDeviceReq)(
|
||||
desc->deviceSelector, // deviceIdentifier (broadcast code)
|
||||
smoThreadingModelDesc.componentThread,
|
||||
componentThread,
|
||||
handshakeTimeoutMs, retryDelayMs,
|
||||
smoIp, smoSubnetNbits,
|
||||
dataPort, cmdPort, imuPort,
|
||||
|
||||
@@ -275,9 +275,13 @@ static int xcbWindow_finalizeInd(void)
|
||||
|
||||
static void xcbWindow_attachDeviceReq(
|
||||
const std::shared_ptr<smo::device::DeviceAttachmentSpec>& desc,
|
||||
const std::shared_ptr<smo::ComponentThread>& componentThread,
|
||||
smo::sense_api::sal_mlo_attachDeviceReqCbFn cb
|
||||
)
|
||||
{
|
||||
// Not used yet, but may be used later.
|
||||
(void)componentThread;
|
||||
|
||||
g_attachedWindows.emplace_back(
|
||||
std::make_unique<xcb_window::AttachedWindow>(desc));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user