Expand description
ROS 2 name expansion + launch remap resolution (issue 0255 / phase-306 W3).
The ONE resolution seam both entry-codegen twins funnel through: the Rust
ExecutorSink (nros node_runtime) and the C-ABI registration paths
(nros-c / nros-cpp via the executor-side remap table) call these functions
so the two languages can never drift on name semantics.
Scope: basic name remapping only — a rule matches when its expanded
from equals the expanded source name (exact FQN comparison, no
wildcards, no node-name prefixes). First matching rule wins.
§Two stores, one seam
The rules themselves are held in two different places, and this module is
the only thing both reach: the C and C++ roads store
executor::spin::RemapRule in the executor’s fixed table (filled by
Executor::declare_remap, which the generated entry calls before the
component configure), while the Rust road stores a bare
&[(&str, &str)] on nros_platform::RuntimeCtx that nros::main! bakes
per component and ExecutorSink threads to create_entity. Neither road
reads the other’s store. So anything about PRECEDENCE has to live here to
be true of both — see resolve_name_layered.
Constants§
- MAX_
RESOLVED_ NAME_ LEN - Maximum bytes in a fully-qualified resolved entity name. Matches
nros::node_metadata::METADATA_STRING_CAPACITY(the source-name bound entering the resolution seam).
Functions§
- expand_
name - Expand a source-level ROS name to its fully-qualified form (ROS 2 name expansion rules):
- fully_
qualified_ name - A node’s fully-qualified name, joined from its two halves.
- remap_
layered resolve_name_layered’s SUBSTITUTION, without its expansion: the name the first matching rule (authoritative tier first) sendssourceto, orNonewhen no rule matches orsourcedoes not expand.- resolve_
name - Resolve a source-level entity name through launch remap rules: expand the
source name AND each rule’s
fromto fully-qualified form, compare exact, substitute the (also expanded)toof the first matching rule; no match → the expanded source name. A rule whosefrom/tofails to expand is skipped (never masks the name expansion itself). - resolve_
name_ layered resolve_namewith the rules split into two PROVENANCE TIERS: everyauthoritativerule is consulted before anyfallbackrule, whatever order either was declared in.
Type Aliases§
- Resolved
Name - Owned storage for a resolved (fully-qualified) entity name.