7 auto py_plugin_manager = m.def_submodule(
"plugin_manager");
10 Get the names of all loaded plugins.
12 :returns: The set of plugin names.
17 Load all plugins in the specified directories.
18 If directory is empty, the default directories will be searched.
20 :param directory_names: A list of directory paths.
21 :type directory_names: pathlib.Path
22 :returns: True on success, false otherwise.
26 py_plugin_manager.def("load", &
plugin_manager::load, py::arg(
"plugin_name"), py::arg(
"file_path"), R
"(
27 Load a single plugin by specifying its name and file path.
29 :param str plugin_name: The desired name that is unique in the framework.
30 :param file_path: The path to the plugin file.
31 :type file_path: pathlib.Path
32 :returns: True on success, false otherwise.
37 Releases all plugins and their associated resources.
39 :returns: True on success, false otherwise.
44 Releases a single plugin and its associated ressources.
46 :param str plugin_name: The name of the plugin to unload.
47 :returns: True on success, false otherwise.
51 py_plugin_manager.def(
52 "get_plugin_instance",
53 [](
const std::string& plugin_name) ->
BasePluginInterface* {
return plugin_manager::get_plugin_instance<BasePluginInterface>(plugin_name,
true); },
54 py::arg(
"plugin_name"),
56 Gets the basic interface for a plugin specified by name.
57 By default calls the initialize() function of the plugin.
59 :param str plugin_name: The name of the plugin.
60 :returns: The basic plugin interface.
61 :rtype: hal_py.BasePluginInterface
void plugin_manager_init(py::module &m)
const Module * module(const Gate *g, const NodeBoxes &boxes)
bool unload(const std::string &plugin_name)
std::set< std::string > get_plugin_names()
bool unload_all_plugins()
bool load_all_plugins(const std::vector< std::filesystem::path > &directory_names)
bool load(const std::string &plugin_name, const std::filesystem::path &file_path_or_empty)