diff --git a/articles/141_static_remapping.md b/articles/141_static_remapping.md index bb41e79b8..49758caa9 100644 --- a/articles/141_static_remapping.md +++ b/articles/141_static_remapping.md @@ -324,8 +324,7 @@ The replacement must be a single token which will become the node's new name. Remapping rules are applied in the following order: -1. Node name remapping -1. Namespace remapping +1. Namespace or Node name remapping 1. All other rules Within each category, the rules are applied in the order in which the user gave them. @@ -339,8 +338,8 @@ Within each category, the rules are applied in the order in which the user gave **Example of node/namespace remapping order:** - A node has name `talker` -- A user gives the rules `talker:__ns:=/my_namespace` then `talker:__node:=foo` -- The final namespace is the default `/` because the node name remap is applied before the namespace remap +- A user gives the rules `talker:__ns:=/my_namespace` then `talker:__node:=foo`, or vice versa +- The final fully qualified name is `/my_namespace/foo` because the namespace and node name remap rules both match against the original node name before remappings are applied **Example of a default and node specific namespace remap:** @@ -348,6 +347,12 @@ Within each category, the rules are applied in the order in which the user gave - A user gives the rules `talker:__ns:=/foo` then `__ns:=/bar` - talker's namespace is `/foo` because that rule was given first +**Example of node and topic/service remapping order:** + +- A node uses a name `/talker` and a topic/service name `/bar` +- A user gives the rules `talker:__node:=foo` then `foo:bar:=/asdf` +- The final fully qualified name is `/foo`, and the final topic/service name is `/asdf` because the node name remap rule is matched before other remappings are applied + ### Applications of the syntax The following sections explain how the syntax enables the use cases above.