1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ /// @file
16+
1517#ifndef RCL__ARGUMENTS_H_
1618#define RCL__ARGUMENTS_H_
1719
@@ -36,20 +38,49 @@ typedef struct rcl_arguments_t
3638 struct rcl_arguments_impl_t * impl ;
3739} rcl_arguments_t ;
3840
41+ /// The command-line flag that delineates the start of ROS arguments.
3942#define RCL_ROS_ARGS_FLAG "--ros-args"
43+
44+ /// The token that delineates the explicit end of ROS arguments.
4045#define RCL_ROS_ARGS_EXPLICIT_END_TOKEN "--"
46+
47+ /// The ROS flag that precedes the setting of a ROS parameter.
4148#define RCL_PARAM_FLAG "--param"
49+
50+ /// The short version of the ROS flag that precedes the setting of a ROS parameter.
4251#define RCL_SHORT_PARAM_FLAG "-p"
52+
53+ /// The ROS flag that precedes a path to a file containing ROS parameters.
4354#define RCL_PARAM_FILE_FLAG "--params-file"
55+
56+ /// The ROS flag that precedes a ROS remapping rule.
4457#define RCL_REMAP_FLAG "--remap"
58+
59+ /// The short version of the ROS flag that precedes a ROS remapping rule.
4560#define RCL_SHORT_REMAP_FLAG "-r"
61+
62+ /// The ROS flag that precedes the name of a ROS security enclave.
4663#define RCL_ENCLAVE_FLAG "--enclave"
64+
65+ /// The short version of the ROS flag that precedes the name of a ROS security enclave.
4766#define RCL_SHORT_ENCLAVE_FLAG "-e"
67+
68+ /// The ROS flag that precedes the ROS logging level to set.
4869#define RCL_LOG_LEVEL_FLAG "--log-level"
70+
71+ /// The ROS flag that precedes the name of a configuration file to configure logging.
4972#define RCL_EXTERNAL_LOG_CONFIG_FLAG "--log-config-file"
50- // To be prefixed with --enable- or --disable-
73+
74+ /// The suffix of the ROS flag to enable or disable stdout
75+ /// logging (must be preceded with --enable- or --disable-).
5176#define RCL_LOG_STDOUT_FLAG_SUFFIX "stdout-logs"
77+
78+ /// The suffix of the ROS flag to enable or disable rosout
79+ /// logging (must be preceded with --enable- or --disable-).
5280#define RCL_LOG_ROSOUT_FLAG_SUFFIX "rosout-logs"
81+
82+ /// The suffix of the ROS flag to enable or disable external library
83+ /// logging (must be preceded with --enable- or --disable-).
5384#define RCL_LOG_EXT_LIB_FLAG_SUFFIX "external-lib-logs"
5485
5586/// Return a rcl_arguments_t struct with members initialized to `NULL`.
@@ -109,11 +140,11 @@ rcl_get_zero_initialized_arguments(void);
109140 * \param[in] allocator A valid allocator.
110141 * \param[out] args_output A structure that will contain the result of parsing.
111142 * Must be zero initialized before use.
112- * \return ` RCL_RET_OK` if the arguments were parsed successfully, or
113- * \return ` RCL_RET_INVALID_ROS_ARGS` if an invalid ROS argument is found, or
114- * \return ` RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or
115- * \return ` RCL_RET_BAD_ALLOC` if allocating memory failed, or
116- * \return ` RCL_RET_ERROR` if an unspecified error occurs.
143+ * \return # RCL_RET_OK if the arguments were parsed successfully, or
144+ * \return # RCL_RET_INVALID_ROS_ARGS if an invalid ROS argument is found, or
145+ * \return # RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
146+ * \return # RCL_RET_BAD_ALLOC if allocating memory failed, or
147+ * \return # RCL_RET_ERROR if an unspecified error occurs.
117148 */
118149RCL_PUBLIC
119150RCL_WARN_UNUSED
@@ -164,10 +195,10 @@ rcl_arguments_get_count_unparsed(
164195 * \param[out] output_unparsed_indices An allocated array of indices into the original argv array.
165196 * This array must be deallocated by the caller using the given allocator.
166197 * If there are no unparsed args then the output will be set to NULL.
167- * \return ` RCL_RET_OK` if everything goes correctly, or
168- * \return ` RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or
169- * \return ` RCL_RET_BAD_ALLOC` if allocating memory failed, or
170- * \return ` RCL_RET_ERROR` if an unspecified error occurs.
198+ * \return # RCL_RET_OK if everything goes correctly, or
199+ * \return # RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
200+ * \return # RCL_RET_BAD_ALLOC if allocating memory failed, or
201+ * \return # RCL_RET_ERROR if an unspecified error occurs.
171202 */
172203RCL_PUBLIC
173204RCL_WARN_UNUSED
@@ -216,10 +247,10 @@ rcl_arguments_get_count_unparsed_ros(
216247 * \param[out] output_unparsed_ros_indices An allocated array of indices into the original argv array.
217248 * This array must be deallocated by the caller using the given allocator.
218249 * If there are no unparsed ROS specific arguments then the output will be set to NULL.
219- * \return ` RCL_RET_OK` if everything goes correctly, or
220- * \return ` RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or
221- * \return ` RCL_RET_BAD_ALLOC` if allocating memory failed, or
222- * \return ` RCL_RET_ERROR` if an unspecified error occurs.
250+ * \return # RCL_RET_OK if everything goes correctly, or
251+ * \return # RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
252+ * \return # RCL_RET_BAD_ALLOC if allocating memory failed, or
253+ * \return # RCL_RET_ERROR if an unspecified error occurs.
223254 */
224255RCL_PUBLIC
225256RCL_WARN_UNUSED
@@ -265,10 +296,10 @@ rcl_arguments_get_param_files_count(
265296 * \param[out] parameter_files An allocated array of paramter file names.
266297 * This array must be deallocated by the caller using the given allocator.
267298 * The output is NULL if there were no paramter files.
268- * \return ` RCL_RET_OK` if everything goes correctly, or
269- * \return ` RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or
270- * \return ` RCL_RET_BAD_ALLOC` if allocating memory failed, or
271- * \return ` RCL_RET_ERROR` if an unspecified error occurs.
299+ * \return # RCL_RET_OK if everything goes correctly, or
300+ * \return # RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
301+ * \return # RCL_RET_BAD_ALLOC if allocating memory failed, or
302+ * \return # RCL_RET_ERROR if an unspecified error occurs.
272303 */
273304RCL_PUBLIC
274305RCL_WARN_UNUSED
@@ -295,10 +326,10 @@ rcl_arguments_get_param_files(
295326 * \param[out] parameter_overrides Parameter overrides as parsed from command line arguments.
296327 * This structure must be finalized by the caller.
297328 * The output is NULL if no parameter overrides were parsed.
298- * \return ` RCL_RET_OK` if everything goes correctly, or
299- * \return ` RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or
300- * \return ` RCL_RET_BAD_ALLOC` if allocating memory failed, or
301- * \return ` RCL_RET_ERROR` if an unspecified error occurs.
329+ * \return # RCL_RET_OK if everything goes correctly, or
330+ * \return # RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
331+ * \return # RCL_RET_BAD_ALLOC if allocating memory failed, or
332+ * \return # RCL_RET_ERROR if an unspecified error occurs.
302333 */
303334RCL_PUBLIC
304335RCL_WARN_UNUSED
@@ -329,10 +360,10 @@ rcl_arguments_get_param_overrides(
329360 * \param[out] nonros_argv An allocated array of arguments that aren't ROS-specific
330361 * This array must be deallocated by the caller using the given allocator.
331362 * If there are no non-ROS args, then the output will be set to NULL.
332- * \return ` RCL_RET_OK` if everything goes correctly, or
333- * \return ` RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or
334- * \return ` RCL_RET_BAD_ALLOC` if allocating memory failed, or
335- * \return ` RCL_RET_ERROR` if an unspecified error occurs.
363+ * \return # RCL_RET_OK if everything goes correctly, or
364+ * \return # RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
365+ * \return # RCL_RET_BAD_ALLOC if allocating memory failed, or
366+ * \return # RCL_RET_ERROR if an unspecified error occurs.
336367 */
337368RCL_PUBLIC
338369RCL_WARN_UNUSED
@@ -359,9 +390,9 @@ rcl_remove_ros_arguments(
359390 * \param[in] arguments An arguments structure that has been parsed.
360391 * \param[out] log_levels Log levels as parsed from command line arguments.
361392 * The output must be finished by the caller if the function successes.
362- * \return ` RCL_RET_OK` if everything goes correctly, or
363- * \return ` RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or
364- * \return ` RCL_RET_BAD_ALLOC` if allocating memory failed.
393+ * \return # RCL_RET_OK if everything goes correctly, or
394+ * \return # RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
395+ * \return # RCL_RET_BAD_ALLOC if allocating memory failed.
365396 */
366397RCL_PUBLIC
367398RCL_WARN_UNUSED
@@ -383,10 +414,10 @@ rcl_arguments_get_log_levels(
383414 * \param[in] args The structure to be copied.
384415 * Its allocator is used to copy memory into the new structure.
385416 * \param[out] args_out A zero-initialized arguments structure to be copied into.
386- * \return ` RCL_RET_OK` if the structure was copied successfully, or
387- * \return ` RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or
388- * \return ` RCL_RET_BAD_ALLOC` if allocating memory failed, or
389- * \return ` RCL_RET_ERROR` if an unspecified error occurs.
417+ * \return # RCL_RET_OK if the structure was copied successfully, or
418+ * \return # RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
419+ * \return # RCL_RET_BAD_ALLOC if allocating memory failed, or
420+ * \return # RCL_RET_ERROR if an unspecified error occurs.
390421 */
391422RCL_PUBLIC
392423RCL_WARN_UNUSED
@@ -406,9 +437,9 @@ rcl_arguments_copy(
406437 * Lock-Free | Yes
407438 *
408439 * \param[in] args The structure to be deallocated.
409- * \return ` RCL_RET_OK` if the memory was successfully freed, or
410- * \return ` RCL_RET_INVALID_ARGUMENT` if any function arguments are invalid, or
411- * \return ` RCL_RET_ERROR` if an unspecified error occurs.
440+ * \return # RCL_RET_OK if the memory was successfully freed, or
441+ * \return # RCL_RET_INVALID_ARGUMENT if any function arguments are invalid, or
442+ * \return # RCL_RET_ERROR if an unspecified error occurs.
412443 */
413444RCL_PUBLIC
414445RCL_WARN_UNUSED
0 commit comments