38 {
42 std::vector<std::string> paths;
43 for (auto& plugin_description : args_.GetPluginDescriptionList()) {
45 plugin_description);
46 }
50 }
51 for (auto& dag_conf : args_.GetDAGConfList()) {
52 std::string module_path = dag_conf;
54 &module_path)) {
55 AERROR <<
"no dag conf [" << dag_conf <<
"] found!";
56 return false;
57 }
58 AINFO <<
"mainboard: use dag conf " << module_path;
59 total_component_nums += GetComponentNum(module_path);
60 paths.emplace_back(std::move(module_path));
61 }
62 if (has_timer_component) {
64 }
65 common::GlobalData::Instance()->SetComponentNums(total_component_nums);
66 for (auto module_path : paths) {
67 AINFO <<
"Start initialize dag: " << module_path;
68 if (!LoadModule(module_path)) {
69 AERROR <<
"Failed to load module: " << module_path;
70 return false;
71 }
72 }
73 return true;
74}
const bool & GetDisablePluginsAutoLoad() const
static PluginManager * Instance()
get singleton instance of PluginManager
bool LoadInstalledPlugins()
load plugins from installed path
bool LoadPlugin(const std::string &plugin_description_file_path)
load plugin clases from file
std::string GetCurrentPath()
bool GetFilePathWithEnv(const std::string &path, const std::string &env_var, std::string *file_path)
get file path, judgement priority:
std::string GetAbsolutePath(const std::string &prefix, const std::string &relative_path)
Get absolute path by concatenating prefix and relative_path.
const std::string WorkRoot()