Function rcl_remove_ros_arguments
Defined in File arguments.h
Function Documentation
-
rcl_ret_t rcl_remove_ros_arguments(const char *const *argv, const rcl_arguments_t *args, rcl_allocator_t allocator, int *nonros_argc, const char ***nonros_argv)
Return a list of arguments with ROS-specific arguments removed.
Some arguments may not have been intended as ROS arguments. This function populates an array of the aruments in a new argv array. Since the first argument is always assumed to be a process name, the list will always contain the first value from the argument vector.
Attribute
Adherence
Allocates Memory
Yes
Thread-Safe
Yes
Uses Atomics
No
Lock-Free
Yes
- Parameters:
argv – [in] The argument vector
args – [in] An arguments structure that has been parsed.
allocator – [in] A valid allocator.
nonros_argc – [out] The count of arguments that aren’t ROS-specific
nonros_argv – [out] An allocated array of arguments that aren’t ROS-specific This array must be deallocated by the caller using the given allocator. If there are no non-ROS args, then the output will be set to NULL.
- Returns:
RCL_RET_OK if everything goes correctly, or
- Returns:
RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
- Returns:
RCL_RET_BAD_ALLOC if allocating memory failed, or
- Returns:
RCL_RET_ERROR if an unspecified error occurs.