From a66d91fa3188c3e85050b3e7d0172a5eb1f80dad Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Wed, 1 Oct 2025 18:10:58 -0400 Subject: [PATCH] DevAttachment:Rename: api=>stimbuffapi, implexor=>qualeiface --- include/user/deviceAttachmentSpec.h | 14 +++++++----- include/user/senseApiDesc.h | 22 +++++++++---------- senseApis/livoxGen1/livoxGen1.cpp | 6 ++--- senseApis/xcbWindow/xcbWindow.cpp | 4 ++-- .../deviceAttachmentPipeSpecp.yy | 6 ++--- smocore/deviceManager/deviceManager.cpp | 12 +++++----- 6 files changed, 33 insertions(+), 31 deletions(-) diff --git a/include/user/deviceAttachmentSpec.h b/include/user/deviceAttachmentSpec.h index 451d76e..5117dce 100644 --- a/include/user/deviceAttachmentSpec.h +++ b/include/user/deviceAttachmentSpec.h @@ -25,6 +25,8 @@ public: { return deviceIdentifier == other.deviceIdentifier && sensorType == other.sensorType && + qualeIfaceApi == other.qualeIfaceApi && + stimBuffApi == other.stimBuffApi && provider == other.provider && deviceSelector == other.deviceSelector; } @@ -32,9 +34,9 @@ public: public: std::string deviceIdentifier; char sensorType; - std::string implexor; - std::string api; - std::vector> apiParams; + std::string qualeIfaceApi; + std::string stimBuffApi; + std::vector> stimBuffApiParams; std::string provider; std::vector> providerParams; std::string deviceSelector; @@ -44,9 +46,9 @@ public: std::ostringstream os; os << "Device Identifier: " << deviceIdentifier << ", Sensor Type: " << sensorType - << ", Implexor: " << implexor << ", API: " << api - << ", API Params: ("; - for (const auto& param : apiParams) + << ", QualeIface API: " << qualeIfaceApi << ", StimBuff API: " << stimBuffApi + << ", StimBuff API Params: ("; + for (const auto& param : stimBuffApiParams) { os << param.first; if (!param.second.empty()) { diff --git a/include/user/senseApiDesc.h b/include/user/senseApiDesc.h index 9d555e6..d5b7ca7 100644 --- a/include/user/senseApiDesc.h +++ b/include/user/senseApiDesc.h @@ -110,15 +110,15 @@ struct Sal_Mgmt_LibOps }; /* Exported by all sense API Libraries to tell Salmanoff what API the lib uses - * to connect to providers; and also to state which implexor APIs it exports. + * to connect to providers; and also to state which quale-iface APIs it exports. */ class SenseApiDesc { public: - class ExportedImplexorApiDesc + class ExportedQualeIfaceApiDesc { public: - static bool sanityCheck(const ExportedImplexorApiDesc &desc) + static bool sanityCheck(const ExportedQualeIfaceApiDesc &desc) { if (desc.name.empty()) { return false; } return true; @@ -132,8 +132,8 @@ public: std::string stringify() const { std::string result = "Name: " + name + "\n"; - result += "Exported Implexor APIs:\n"; - for (const auto& api : exportedImplexorApis) { + result += "Exported QualeIface APIs:\n"; + for (const auto& api : exportedQualeIfaceApis) { result += " - " + api.name + "\n"; } return result; @@ -141,20 +141,20 @@ public: static bool sanityCheck(const SenseApiDesc &desc) { - if (desc.name.empty() || desc.exportedImplexorApis.empty()) { + if (desc.name.empty() || desc.exportedQualeIfaceApis.empty()) { return false; } - for (const auto& api : desc.exportedImplexorApis) { - if (!ExportedImplexorApiDesc::sanityCheck(api)) { return false; } + for (const auto& api : desc.exportedQualeIfaceApis) { + if (!ExportedQualeIfaceApiDesc::sanityCheck(api)) { return false; } } return Sal_Mgmt_LibOps::sanityCheck(desc.sal_mgmt_libOps); } std::string name; - // These are the implexors whose APIs this lib exports. - std::vector exportedImplexorApis; + // These are the quale-iface APIs this lib exports. + std::vector exportedQualeIfaceApis; Sal_Mgmt_LibOps sal_mgmt_libOps; }; @@ -169,7 +169,7 @@ public: * function. Salmanoff will search for it and invoke it via dlsym(). * * The function must return a SenseApiDesc struct that Smo will tell - * Smo what implexors can be used with it & what APIs it exports. + * Smo what quale-iface APIs can be used with it & what APIs it exports. * The SenseApiDesc struct also gives Smo pointers to API functions * to invoke for communication between Smo and the library. * diff --git a/senseApis/livoxGen1/livoxGen1.cpp b/senseApis/livoxGen1/livoxGen1.cpp index 4da782f..c4aa30c 100644 --- a/senseApis/livoxGen1/livoxGen1.cpp +++ b/senseApis/livoxGen1/livoxGen1.cpp @@ -160,9 +160,9 @@ extern "C" sal_mlo_detachDeviceReqFn livoxGen1_detachDeviceReq; // Sense API descriptor static const SenseApiDesc livoxGen1ApiDesc = { .name = "livoxGen1", - .exportedImplexorApis = { - {.name = "pointCloudCoords"}, - {.name = "pointCloudIntensity"}, + .exportedQualeIfaceApis = { + {.name = "pcloud"}, + {.name = "pcloudIntensity"}, {.name = "gyro"}, {.name = "accel"} }, diff --git a/senseApis/xcbWindow/xcbWindow.cpp b/senseApis/xcbWindow/xcbWindow.cpp index 6167096..3e97120 100644 --- a/senseApis/xcbWindow/xcbWindow.cpp +++ b/senseApis/xcbWindow/xcbWindow.cpp @@ -118,7 +118,7 @@ void AttachedWindow::parseWindowSelector( windowSelector.matchType = xcb_xorg::window_search::MatchType::SUBSTRING; // Check if 'dev-id', 'dev-string', or 'dev-substring' is specified - for (const auto& param : spec.apiParams) + for (const auto& param : spec.stimBuffApiParams) { if (param.first == "dev-id" || param.first == "devid") { @@ -330,7 +330,7 @@ static void xcbWindow_detachDeviceReq( // SenseApi descriptor static smo::sense_api::SenseApiDesc xcbWindowApiDesc = { .name = "xcb", - .exportedImplexorApis = { { "video-implexor" } }, + .exportedQualeIfaceApis = { { "visual-qualeiface" } }, .sal_mgmt_libOps = { .initializeInd = xcbWindow_initializeInd, .finalizeInd = xcbWindow_finalizeInd, diff --git a/smocore/deviceManager/deviceAttachmentPipeSpecp.yy b/smocore/deviceManager/deviceAttachmentPipeSpecp.yy index 4162167..3ae953b 100644 --- a/smocore/deviceManager/deviceAttachmentPipeSpecp.yy +++ b/smocore/deviceManager/deviceAttachmentPipeSpecp.yy @@ -110,9 +110,9 @@ spec_body: $$ = new smo::device::DeviceAttachmentSpec(); $$->deviceIdentifier = std::string($1); $$->sensorType = '\0'; // This will be set by the parent rule - $$->implexor = std::string($3); - $$->api = std::string($5); - $$->apiParams = std::move(*$7); + $$->qualeIfaceApi = std::string($3); + $$->stimBuffApi = std::string($5); + $$->stimBuffApiParams = std::move(*$7); $$->provider = std::string($10); $$->providerParams = std::move(*$12); $$->deviceSelector = std::string($15); diff --git a/smocore/deviceManager/deviceManager.cpp b/smocore/deviceManager/deviceManager.cpp index fa442b2..d6c5f52 100644 --- a/smocore/deviceManager/deviceManager.cpp +++ b/smocore/deviceManager/deviceManager.cpp @@ -361,7 +361,7 @@ public: if (senseApiLib->isBeingDestroyed.load()) { std::cerr << std::string(__func__) + ": Library is being destroyed" - << " for API '" << spec->api << "'. Bailing out." << std::endl; + << " for API '" << spec->stimBuffApi << "'. Bailing out.\n"; callOriginalCb(false, spec); return; } @@ -430,7 +430,7 @@ public: if (senseApiLib->isBeingDestroyed.load()) { std::cerr << std::string(__func__) + ": Library is being destroyed" - << " for API '" << spec->api << "'. Bailing out." << std::endl; + << " for API '" << spec->stimBuffApi << "'. Bailing out.\n"; callOriginalCb(false, spec); return; } @@ -476,12 +476,12 @@ void DeviceManager::attachSenseDeviceReq( // Get the sense API lib's qutex auto libOpt = sense_api::SenseApiManager::getInstance() - .getSenseApiLibByApiName(spec->api); + .getSenseApiLibByApiName(spec->stimBuffApi); if (!libOpt) { std::cerr << "attachSenseDeviceReq: No library found for API '" - << spec->api << "'" << std::endl; + << spec->stimBuffApi << "'" << std::endl; cb.callbackFn(false, spec); return; } @@ -511,12 +511,12 @@ void DeviceManager::detachSenseDeviceReq( // Get the sense API lib's qutex auto libOpt = sense_api::SenseApiManager::getInstance() - .getSenseApiLibByApiName(spec->api); + .getSenseApiLibByApiName(spec->stimBuffApi); if (!libOpt) { std::cerr << "detachSenseDeviceReq: No library found for API '" - << spec->api << "'" << std::endl; + << spec->stimBuffApi << "'" << std::endl; cb.callbackFn(false, spec); return; }