FairMQ: Move static and interactive control modes to plugin (2)

This commit is contained in:
Alexey Rybalchenko
2017-09-14 12:42:07 +02:00
committed by Mohammad Al-Turany
parent 10f67e4c72
commit 334b91785b
15 changed files with 246 additions and 138 deletions

View File

@@ -54,10 +54,10 @@ int main(int argc, const char** argv)
// Create plugin manager and load command line supplied plugins
// Plugin manager needs to be destroyed after config! TODO Investigate why
auto pluginManager = fair::mq::PluginManager::MakeFromCommandLineOptions(fair::mq::tools::ToStrVector(argc, argv));
// Load builtin plugins last
pluginManager->LoadPlugin("s:control");
// Construct command line options parser
FairMQProgOptions config;
config.AddToCmdLineOptions(customOptions);
@@ -76,7 +76,7 @@ int main(int argc, const char** argv)
LOG(ERROR) << "getDevice(): no valid device provided. Exiting.";
return 1;
}
// Handle --print-channels
device->RegisterChannelEndpoints();
if (config.Count("print-channels"))
@@ -117,9 +117,7 @@ int main(int argc, const char** argv)
pluginManager->InstantiatePlugins();
// Wait for control plugin to release device control
LOG(ERROR) << "1";
pluginManager->WaitForPluginsToReleaseDeviceControl();
LOG(ERROR) << "2";
}
catch (std::exception& e)
{