AutoAPMS
Resilient Robot Mission Management
|
#include <auto_apms_behavior_tree/node/node_manifest.hpp>
Public Types | |
using | Params = NodeRegistrationParams |
using | ParamMap = std::map<std::string, NodeRegistrationParams> |
Public Member Functions | |
NodeManifest (const ParamMap ¶m_map={}) | |
bool | contains (const std::string &node_name) const |
NodeRegistrationParams & | operator[] (const std::string &node_name) |
const NodeRegistrationParams & | operator[] (const std::string &node_name) const |
NodeManifest & | add (const std::string &node_name, const NodeRegistrationParams &p) |
NodeManifest & | remove (const std::string &node_name) |
NodeManifest & | merge (const NodeManifest &m) |
NodeManifest & | autoComplete (NodePluginClassLoader &class_loader) |
void | toFile (const std::string &file_path) const |
std::string | toString () const |
const ParamMap & | getInternalMap () const |
Static Public Member Functions | |
static NodeManifest | fromFiles (const std::vector< std::string > &file_paths) |
static NodeManifest | fromFile (const std::string &file_path) |
static NodeManifest | fromString (const std::string &manifest_str) |
Static Public Attributes | |
static const std::string | PARAM_NAME_CLASS = _AUTO_APMS_BEHAVIOR_TREE__NODE_MANIFEST_PARAM_CLASS |
static const std::string | PARAM_NAME_PACKAGE = _AUTO_APMS_BEHAVIOR_TREE__NODE_MANIFEST_PARAM_PACKAGE |
static const std::string | PARAM_NAME_LIBRARY = _AUTO_APMS_BEHAVIOR_TREE__NODE_MANIFEST_PARAM_LIBRARY |
static const std::string | PARAM_NAME_PORT = _AUTO_APMS_BEHAVIOR_TREE__NODE_MANIFEST_PARAM_PORT |
static const std::string | PARAM_NAME_WAIT_TIMEOUT = _AUTO_APMS_BEHAVIOR_TREE__NODE_MANIFEST_PARAM_WAIT_TIMEOUT |
static const std::string | PARAM_NAME_REQUEST_TIMEOUT = _AUTO_APMS_BEHAVIOR_TREE__NODE_MANIFEST_PARAM_REQUEST_TIMEOUT |
Data structure for resource lookup data and configuration parameters required for loading and registering multiple behavior tree node plugins.
Definition at line 28 of file node_manifest.hpp.
using Params = NodeRegistrationParams |
Definition at line 31 of file node_manifest.hpp.
using ParamMap = std::map<std::string, NodeRegistrationParams> |
Mapping of a node's name and its registration parameters.
Definition at line 34 of file node_manifest.hpp.
NodeManifest | ( | const ParamMap & | param_map = {} | ) |
Definition at line 123 of file node_manifest.cpp.
|
static |
Create a node plugin manifest from multiple files. They are loaded in the given order.
file_paths | Paths to the manifest files. |
Definition at line 127 of file node_manifest.cpp.
|
static |
Create a node plugin manifest from a file.
file_path | Path to the manifest file. |
Definition at line 140 of file node_manifest.cpp.
|
static |
Definition at line 145 of file node_manifest.cpp.
bool contains | ( | const std::string & | node_name | ) | const |
Definition at line 152 of file node_manifest.cpp.
NodeManifest::Params & operator[] | ( | const std::string & | node_name | ) |
Definition at line 157 of file node_manifest.cpp.
const NodeManifest::Params & operator[] | ( | const std::string & | node_name | ) | const |
Definition at line 165 of file node_manifest.cpp.
NodeManifest & add | ( | const std::string & | node_name, |
const NodeRegistrationParams & | p ) |
Definition at line 173 of file node_manifest.cpp.
NodeManifest & remove | ( | const std::string & | node_name | ) |
Definition at line 184 of file node_manifest.cpp.
NodeManifest & merge | ( | const NodeManifest & | m | ) |
Definition at line 195 of file node_manifest.cpp.
NodeManifest & autoComplete | ( | NodePluginClassLoader & | class_loader | ) |
Automatically fill node plugin resource information in manifest
.
This function autocompletes the package and library fields of the manifest if possible. Depending on the value of the package field, the manifest will be updated:
class_loader
.class_loader
considering only resources registered by the given package.The library parameter will be overwritten in any case. Other parameters remain the same and are simply copied.
This method is used internally. Mostly for introspection purposes.
class_loader | pluginlib::ClassLoader object managing behavior tree node plugin resources. |
auto_apms_core::exceptions::ResourceNotFoundError | if no unique resource for a node can be found, thus the library path cannot be filled automatically. |
Definition at line 202 of file node_manifest.cpp.
void toFile | ( | const std::string & | file_path | ) | const |
Definition at line 233 of file node_manifest.cpp.
std::string toString | ( | ) | const |
Definition at line 249 of file node_manifest.cpp.
const NodeManifest::ParamMap & getInternalMap | ( | ) | const |
Definition at line 258 of file node_manifest.cpp.
|
static |
Definition at line 36 of file node_manifest.hpp.
|
static |
Definition at line 37 of file node_manifest.hpp.
|
static |
Definition at line 38 of file node_manifest.hpp.
|
static |
Definition at line 39 of file node_manifest.hpp.
|
static |
Definition at line 40 of file node_manifest.hpp.
|
static |
Definition at line 41 of file node_manifest.hpp.