Skip to content

Set bound_fqn from ros_binding at manifest parse time #262

@bburda

Description

@bburda

Summary

In manifest_only discovery mode, manifest_parser does not set bound_fqn on App entities. Since runtime_linker only runs in hybrid mode, apps in manifest_only mode have no FQN set, which breaks downstream handler/sampler code that needs it for log, fault, and configuration lookups.

Currently worked around with App::effective_fqn() (PR #258) which falls back to deriving FQN from ros_binding when bound_fqn is not set.

Proposed solution

manifest_parser should set bound_fqn from ros_binding at parse time when namespace is not wildcard "*":

// In manifest_parser, after parsing ros_binding:
if (app.ros_binding && !app.ros_binding->node_name.empty() 
    && app.ros_binding->namespace_pattern != "*") {
  std::string ns = app.ros_binding->namespace_pattern;
  if (!ns.empty() && ns.back() != '/') ns += '/';
  app.bound_fqn = ns + app.ros_binding->node_name;
}

This would:

  • Make the data model consistent across discovery modes
  • Allow removing the effective_fqn() workaround
  • Prevent future code from accidentally using bound_fqn directly and missing manifest_only mode

Additional context

Relevant files:

  • src/ros2_medkit_gateway/src/discovery/manifest/manifest_parser.cpp
  • src/ros2_medkit_gateway/include/ros2_medkit_gateway/discovery/models/app.hpp - effective_fqn() workaround

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions