Skip to main content

Module names

Module names 

Source
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) sends source to, or None when no rule matches or source does not expand.
resolve_name
Resolve a source-level entity name through launch remap rules: expand the source name AND each rule’s from to fully-qualified form, compare exact, substitute the (also expanded) to of the first matching rule; no match → the expanded source name. A rule whose from/to fails to expand is skipped (never masks the name expansion itself).
resolve_name_layered
resolve_name with the rules split into two PROVENANCE TIERS: every authoritative rule is consulted before any fallback rule, whatever order either was declared in.

Type Aliases§

ResolvedName
Owned storage for a resolved (fully-qualified) entity name.