Wire comparator CLI, marionette threading model, and final load order.
Initialize SmoThreadingModelDesc from marionette before body startup, load comparator libs before stimbuff via -c/--comparator-lib, and drop the hardcoded libcomparatorCore.so load path. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,23 +27,21 @@ BodyViralPostingInvoker<void> Body::initializeCReq()
|
||||
}
|
||||
|
||||
/** EXPLANATION:
|
||||
* The ComponentThread instance we pass in here is the one that will be
|
||||
* used by Senseapi libs to perform device-independent background
|
||||
* operations.
|
||||
* For example, liblivoxProto1's BroadcastListener will use this thread
|
||||
* to listen for UDP broadcast dgrams from Livox devices.
|
||||
* Comparator libs are loaded before stim buff API libs so comparator
|
||||
* types are registered before stimbuff libs can resolve them via
|
||||
* SmoCallbacks during getStimBuffApiDesc.
|
||||
*
|
||||
* We used to use Marionette, but there's a strong argument for using
|
||||
* Body instead since it's meant to handle device-management operations.
|
||||
* SmoThreadingModelDesc is initialized in Mind::initializeCReq before
|
||||
* body::initializeCReq is entered.
|
||||
*/
|
||||
// Upcast to Mind to access Mind-specific members
|
||||
Mind &mind = static_cast<Mind&>(parent);
|
||||
|
||||
comparator_lib::ComparatorApiManager::getInstance()
|
||||
.loadComparatorLib("libcomparatorCore.so");
|
||||
.loadAllComparatorApiLibsFromOptions();
|
||||
|
||||
stim_buff::StimBuffApiManager::getInstance()
|
||||
.loadAllStimBuffApiLibsFromOptions(mind.body.thread);
|
||||
.loadAllStimBuffApiLibsFromOptions();
|
||||
|
||||
/** EXPLANATION:
|
||||
* Consider body::initializeCReq to have been called if even one of its
|
||||
|
||||
Reference in New Issue
Block a user