Class RuntimeLinker
Defined in File runtime_linker.hpp
Class Documentation
-
class RuntimeLinker
Links manifest Apps to runtime ROS 2 nodes.
RuntimeLinker performs the binding between manifest-declared Apps and actual ROS 2 nodes discovered at runtime. This enables:
Stable App IDs from manifest
Live data (topics, services, actions) from runtime nodes
Detection of offline apps and orphan nodes
Match priority:
Exact match: node_name + namespace both match
Wildcard namespace: node_name matches, namespace is “*”
Topic namespace: topic_namespace prefix matches node’s topics
Public Functions
-
explicit RuntimeLinker(rclcpp::Node *node = nullptr)
Constructor.
- Parameters:
node – ROS node for logging (can be nullptr for testing)
-
LinkingResult link(const std::vector<App> &manifest_apps, const std::vector<App> &runtime_apps, const ManifestConfig &config)
Link manifest apps to runtime apps (nodes)
- Parameters:
- Returns:
LinkingResult with linked apps and orphan info
-
bool is_app_online(const std::string &app_id) const
Check if a specific app is linked to a runtime node.
- Parameters:
app_id – App identifier
- Returns:
true if app is online (linked to a node)
-
std::optional<std::string> get_bound_node(const std::string &app_id) const
Get the node FQN bound to an app.
- Parameters:
app_id – App identifier
- Returns:
Node FQN if linked, nullopt otherwise
-
std::optional<std::string> get_app_for_node(const std::string &node_fqn) const
Get the app ID for a node FQN.
- Parameters:
node_fqn – Fully qualified node name
- Returns:
App ID if bound, nullopt otherwise
-
inline const LinkingResult &get_last_result() const
Get the last linking result.