Function rcl_remap_node_namespace
Defined in File remap.h
Function Documentation
-
rcl_ret_t rcl_remap_node_namespace(const rcl_arguments_t *local_arguments, const rcl_arguments_t *global_arguments, const char *node_name, rcl_allocator_t allocator, char **output_namespace)
Remap a namespace based on given rules.
This function returns the namespace that a node with the given name would be remapped to. When a node’s namespace is remapped it changes its logger name and the output of expanding relative topic and service names.
The behavior of
local_arguments
,global_arguments
,node_name
, the order remap rules are applied, and node specific rules is identical to rcl_remap_topic_name().Attribute
Adherence
Allocates Memory
Yes
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
See also
- Parameters:
local_arguments – [in] Arguments to be used before global arguments.
global_arguments – [in] Command line arguments to use if no local rules matched, or
NULL
or zero-initialized to ignore global arguments.node_name – [in] The name of the node whose namespace is being remapped.
allocator – [in] A valid allocator to be used.
output_namespace – [out] Either an allocated string with the remapped namespace, or
NULL
if no remap rules matched the name.
- Returns:
RCL_RET_OK if the node name was remapped or no rules matched, or
- Returns:
RCL_RET_INVALID_ARGUMENT if any arguments are invalid, or
- Returns:
RCL_RET_BAD_ALLOC if allocating memory failed, or
- Returns:
RCL_RET_NODE_INVALID_NAMESPACE if the remapped namespace is invalid, or
- Returns:
RCL_RET_ERROR if an unspecified error occurs.