Opts: Make singleton; senseApi: check senseApiLibPath, get senseApiDescFn pointer.

* OptionsParser now has a singleton.
* We now use the cmdline opt -p <senseApiLibPath>, and search for
  the specified library in:
  * senseApiLibPath, then CWD, then the place where our executable
    is running from, and then finally we let the hosting OS do
    its own search.
* We now call dlsym() on dlopen()'d libs to to get the senseApiDescFn
  pointer.
This commit is contained in:
2025-01-08 13:43:44 -04:00
parent b40790ee4a
commit bffa2b837c
4 changed files with 68 additions and 5 deletions
+6
View File
@@ -16,6 +16,12 @@ public:
void dumpOptions() const;
std::string getUsage() const;
static OptionParser &getOptions(void)
{
static OptionParser options;
return options;
}
public:
std::string senseApiLibPath;
std::vector<std::string> senseApiLibs;