diff --git a/README.md b/README.md index 956fe103..41d23f34 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ The API is a combination of parts: - RCUTILS_LOG_ERROR_SKIPFIRST_NAMED() - rcutils/logging_macros.h - rcutils/logging.h +- Some basic utilities to load, unload and get symbols from shared libraries at run-time. + - rcutils/shared_library.h - A string replacement function which takes an allocator, based on http://creativeandcritical.net/str-replace-c: - rcutils_repl_str() - rcutils/repl_str.h diff --git a/include/rcutils/allocator.h b/include/rcutils/allocator.h index 374f4018..e84706cb 100644 --- a/include/rcutils/allocator.h +++ b/include/rcutils/allocator.h @@ -109,6 +109,8 @@ rcutils_get_default_allocator(void); /// Return true if the given allocator has non-null function pointers. /** * Will also return false if the allocator pointer is null. + * + * \param[in] allocator to be checked by the function */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -130,6 +132,9 @@ rcutils_allocator_is_valid(const rcutils_allocator_t * allocator); /** * This function will return `NULL` if the allocator is `NULL` or has `NULL` for * function pointer fields. + * \param[inout] pointer to the memory which will be reallocated + * \param[in] size in bytes + * \param[in] allocator to be used to allocate and deallocate memory */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED diff --git a/include/rcutils/cmdline_parser.h b/include/rcutils/cmdline_parser.h index 05caed55..1571244b 100644 --- a/include/rcutils/cmdline_parser.h +++ b/include/rcutils/cmdline_parser.h @@ -24,10 +24,25 @@ extern "C" #include "rcutils/visibility_control.h" +/// Return `true` if the option is defined in the command line arguments or `false` otherwise. +/** +* \param[in] begin first element to check in the array +* \param[in] end last element to check in the array +* \param[in] option string to find in the array of arguments +* \return if the option exists returns true, otherwise returns false. + */ RCUTILS_PUBLIC bool rcutils_cli_option_exist(char ** begin, char ** end, const char * option); +/// Return the value for a specific option of the command line arguments. +/** +* \param[in] begin first element to check in the array +* \param[in] end last element to check in the array +* \param[in] option string to find in the array of arguments +* \return the value for a specific option of the command line arguments or `NULL` if the option +* doesn't exist + */ RCUTILS_PUBLIC char * rcutils_cli_get_option(char ** begin, char ** end, const char * option); diff --git a/include/rcutils/error_handling.h b/include/rcutils/error_handling.h index 737bc189..9f19b834 100644 --- a/include/rcutils/error_handling.h +++ b/include/rcutils/error_handling.h @@ -130,6 +130,7 @@ static_assert( * If already initialized, the given allocator is ignored, even if it does not * match the allocator used originally to initialize the thread-local storage. * + * \param[in] allocator to be used to allocate and deallocate memory * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_INVALID_ARGUMENT` if the allocator is invalid, or * \return `RCUTILS_RET_BAD_ALLOC` if allocating memory fails, or diff --git a/include/rcutils/filesystem.h b/include/rcutils/filesystem.h index daeb2bab..8275a207 100644 --- a/include/rcutils/filesystem.h +++ b/include/rcutils/filesystem.h @@ -31,9 +31,9 @@ extern "C" /** * \param[in] buffer Allocated string to store current directory path to * \param[in] max_length maximum length to be stored in buffer - * \return bool True if success - * False if buffer is NULL - * False on failure + * \return `True` if success + * \return `False` if buffer is NULL + * \return `False` on failure */ RCUTILS_PUBLIC RCUTILS_WARN_UNUSED @@ -43,9 +43,9 @@ rcutils_get_cwd(char * buffer, size_t max_length); /// Check if the provided path points to a directory. /** * \param[in] abs_path Absolute path to check. - * \return bool True if directory - * False if abs_path is NULL - * False on failure + * \return `True` if directory + * \return `False` if abs_path is NULL + * \return `False` on failure */ RCUTILS_PUBLIC bool @@ -54,9 +54,9 @@ rcutils_is_directory(const char * abs_path); /// Check if the provided path points to a file. /** * \param[in] abs_path Absolute path to check. - * \return bool True if file - * False if abs_path is NULL - * False on failure + * \return `True` if file + * \return `False` if abs_path is NULL + * \return `False` on failure */ RCUTILS_PUBLIC bool @@ -65,9 +65,9 @@ rcutils_is_file(const char * abs_path); /// Check if the provided path points to an existing file/folder. /** * \param[in] abs_path Absolute path to check. - * \return bool True if the path exists - * False if abs_path is NULL - * False on failure + * \return `True` if the path exists + * \return `False` if abs_path is NULL + * \return `False` on failure */ RCUTILS_PUBLIC bool @@ -76,9 +76,9 @@ rcutils_exists(const char * abs_path); /// Check if the provided path points to a file/folder readable by current user. /** * \param[in] abs_path Absolute path to check. - * \return bool True if the file is readable - * False if abs_path is NULL - * False on failure + * \return `True` if the file is readable + * \return `False` if abs_path is NULL + * \return `False` on failure */ RCUTILS_PUBLIC bool @@ -87,9 +87,9 @@ rcutils_is_readable(const char * abs_path); /// Check if the provided path points to a file/folder writable by current user. /** * \param[in] abs_path Absolute path to check. - * \return bool True if the file is writable - * False if abs_path is NULL - * False on failure + * \return `True` if the file is writable + * \return `False` if abs_path is NULL + * \return `False` on failure */ RCUTILS_PUBLIC bool @@ -98,9 +98,9 @@ rcutils_is_writable(const char * abs_path); /// Check if the provided path points to a file/folder both readable and writable by current user. /** * \param[in] abs_path Absolute path to check. - * \return bool True if the file is redable and writable False otherwise - * False if abs_path is NULL - * False on failure + * \return `True` if the file is redable and writable False otherwise + * \return `False` if abs_path is NULL + * \return `False` on failure */ RCUTILS_PUBLIC bool @@ -115,9 +115,9 @@ rcutils_is_readable_and_writable(const char * abs_path); * \param[in] left_hand_path * \param[in] right_hand_path * \param[in] allocator - * \return char * concatenated path on success - * NULL on invalid arguments - * NULL on failure + * \return concatenated path on success + * \return `NULL` on invalid arguments + * \return `NULL` on failure */ RCUTILS_PUBLIC char * @@ -134,9 +134,9 @@ rcutils_join_path( * * \param[in] path * \param[in] allocator - * \return char * path using platform specific delimiters on success - * NULL on invalid arguments - * NULL on failure + * \return path using platform specific delimiters on success + * \return `NULL` on invalid arguments + * \return `NULL` on failure */ RCUTILS_PUBLIC char * @@ -156,12 +156,11 @@ rcutils_to_native_path( * openat(2) documentation. * * \param[in] abs_path - * \param[in] allocator - * \return bool True if making the directory was successful, False otherwise - * False if path is NULL - * False if path is empty - * False if path is not absolute - * False if any intermediate directories don't exist + * \return `True` if making the directory was successful, False otherwise + * \return `False` if path is NULL + * \return `False` if path is empty + * \return `False` if path is not absolute + * \return `False` if any intermediate directories don't exist */ RCUTILS_PUBLIC bool diff --git a/include/rcutils/logging.h b/include/rcutils/logging.h index ade5110b..a0a462b4 100644 --- a/include/rcutils/logging.h +++ b/include/rcutils/logging.h @@ -88,7 +88,7 @@ extern bool g_rcutils_logging_initialized; * Uses Atomics | No * Lock-Free | Yes * - * \param allocator rcutils_allocator_t to be used. + * \param[in] allocator rcutils_allocator_t to be used. * \return `RCUTILS_RET_OK` if successful. * \return `RCUTILS_RET_INVALID_ARGUMENT` if the allocator is invalid, in which * case initialization will fail. @@ -200,12 +200,12 @@ rcutils_logging_severity_level_from_string( /// The function signature to log messages. /** - * \param location The pointer to the location struct - * \param severity The severity level - * \param name The name of the logger - * \param timestamp The timestamp - * \param format The format string - * \param args The variable argument list + * \param[in] location The location information about where the log came from + * \param[in] severity The severity of the log message expressed as an integer + * \param[in] name The name of the logger that this message came from + * \param[in] timestamp The time at which the log message was generated + * \param[in] format The list of arguments to insert into the formatted log message + * \param[in] args The variable argument list */ typedef void (* rcutils_logging_output_handler_t)( const rcutils_log_location_t *, // location @@ -246,7 +246,7 @@ rcutils_logging_output_handler_t rcutils_logging_get_output_handler(); * Uses Atomics | No * Lock-Free | Yes * - * \param function The function pointer of the output handler to be used. + * \param[in] function The function pointer of the output handler to be used. */ RCUTILS_PUBLIC void rcutils_logging_set_output_handler(rcutils_logging_output_handler_t function); @@ -266,12 +266,12 @@ void rcutils_logging_set_output_handler(rcutils_logging_output_handler_t functio * * \return `RCUTILS_RET_OK` if successful. * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation error occured - * \param location The location information about where the log came from - * \param severity The severity of the log message expressed as an integer - * \param name The name of the logger that this message came from - * \param timestamp The time at which the log message was generated - * \param msg The message being logged - * \param args The list of arguments to insert into the formatted log messgae + * \param[in] location The location information about where the log came from + * \param[in] severity The severity of the log message expressed as an integer + * \param[in] name The name of the logger that this message came from + * \param[in] timestamp The time at which the log message was generated + * \param[in] msg The message being logged + * \param[in] args The list of arguments to insert into the formatted log message * \param[out] logging_output An output buffer for the formatted message */ RCUTILS_PUBLIC @@ -321,7 +321,7 @@ int rcutils_logging_get_default_logger_level(); * Uses Atomics | No * Lock-Free | Yes * - * \param level The level to be used. + * \param[in] level The level to be used. */ RCUTILS_PUBLIC void rcutils_logging_set_default_logger_level(int level); @@ -340,7 +340,7 @@ void rcutils_logging_set_default_logger_level(int level); * Uses Atomics | No * Lock-Free | Yes * - * \param name The name of the logger, must be null terminated c string + * \param[in] name The name of the logger, must be null terminated c string * \return The level of the logger if it has been set, or * \return `RCUTILS_LOG_SEVERITY_UNSET` if unset, or * \return `g_rcutils_logging_default_logger_level` for an empty name, or @@ -364,8 +364,8 @@ int rcutils_logging_get_logger_level(const char * name); * Uses Atomics | No * Lock-Free | Yes * - * \param name The name of the logger - * \param name_length Logger name length + * \param[in] name The name of the logger + * \param[in] name_length Logger name length * \return The level of the logger if it has been set, or * \return `RCUTILS_LOG_SEVERITY_UNSET` if unset, or * \return `g_rcutils_logging_default_logger_level` for `name_length` of `0`, or @@ -389,8 +389,8 @@ int rcutils_logging_get_logger_leveln(const char * name, size_t name_length); * Uses Atomics | No * Lock-Free | Yes * - * \param name The name of the logger, must be null terminated c string. - * \param level The level to be used. + * \param[in] name The name of the logger, must be null terminated c string. + * \param[in] level The level to be used. * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_INVALID_ARGUMENT` on invalid arguments, or * \return `RCUTILS_RET_LOGGING_SEVERITY_MAP_INVALID` if severity map invalid, or @@ -410,8 +410,8 @@ rcutils_ret_t rcutils_logging_set_logger_level(const char * name, int level); * Uses Atomics | No * Lock-Free | Yes * - * \param name The name of the logger, must be null terminated c string or NULL. - * \param severity The severity level. + * \param[in] name The name of the logger, must be null terminated c string or NULL. + * \param[in] severity The severity level. * * \return true if the logger is enabled for the level; false otherwise. */ @@ -438,7 +438,7 @@ bool rcutils_logging_logger_is_enabled_for(const char * name, int severity); * Uses Atomics | No * Lock-Free | Yes * - * \param name The name of the logger, must be null terminated c string. + * \param[in] name The name of the logger, must be null terminated c string. * * \return The level, or * \return -1 on invalid arguments, or @@ -462,11 +462,11 @@ int rcutils_logging_get_logger_effective_level(const char * name); * Uses Atomics | No * Lock-Free | Yes * - * \param location The pointer to the location struct or NULL - * \param severity The severity level - * \param name The name of the logger, must be null terminated c string or NULL - * \param format The format string - * \param ... The variable arguments + * \param[in] location The pointer to the location struct or NULL + * \param[in] severity The severity level + * \param[in] name The name of the logger, must be null terminated c string or NULL + * \param[in] format The format string + * \param[in] ... The variable arguments */ RCUTILS_PUBLIC void rcutils_log( @@ -496,11 +496,11 @@ RCUTILS_ATTRIBUTE_PRINTF_FORMAT(4, 5); * Uses Atomics | No * Lock-Free | Yes * - * \param location The pointer to the location struct or NULL - * \param severity The severity level - * \param name The name of the logger, must be null terminated c string - * \param timestamp The timestamp for when the log message was made - * \param log_str The string to be logged + * \param[in] location The pointer to the location struct or NULL + * \param[in] severity The severity level + * \param[in] name The name of the logger, must be null terminated c string + * \param[in] timestamp The timestamp for when the log message was made + * \param[in] log_str The string to be logged */ RCUTILS_PUBLIC void rcutils_logging_console_output_handler( diff --git a/include/rcutils/macros.h b/include/rcutils/macros.h index e254df46..a3e601b7 100644 --- a/include/rcutils/macros.h +++ b/include/rcutils/macros.h @@ -85,8 +85,8 @@ extern "C" * * IMPORTANT: the first argument has an index of ONE (not zero!). * - * \param format_string_index index of the format string passed to the function - * \param first_to_check_index index of the first "optional argument" + * \param[in] format_string_index index of the format string passed to the function + * \param[in] first_to_check_index index of the first "optional argument" */ #define RCUTILS_ATTRIBUTE_PRINTF_FORMAT(format_string_index, first_to_check_index) \ __attribute__ ((format(printf, format_string_index, first_to_check_index))) diff --git a/include/rcutils/types/array_list.h b/include/rcutils/types/array_list.h index 2b26adae..a0d1cc86 100644 --- a/include/rcutils/types/array_list.h +++ b/include/rcutils/types/array_list.h @@ -36,7 +36,7 @@ typedef struct RCUTILS_PUBLIC_TYPE rcutils_array_list_t /** * Validates that an rcutils_array_list_t* points to a valid array list. - * \param array_list A pointer to an rcutils_array_list_t + * \param[in] array_list A pointer to an rcutils_array_list_t * \return RCUTILS_RET_INVALID_ARGUMENT if array_list is null * \return RCUTILS_RET_NOT_INITIALIZED if array_list is not initialized */ diff --git a/include/rcutils/types/char_array.h b/include/rcutils/types/char_array.h index 121924a5..4d221661 100644 --- a/include/rcutils/types/char_array.h +++ b/include/rcutils/types/char_array.h @@ -58,9 +58,9 @@ rcutils_get_zero_initialized_char_array(void); * If the capacity is set to 0, no memory is allocated and the internal buffer * is still NULL. * - * \param char_array a pointer to the to be initialized char array struct - * \param buffer_capacity the size of the memory to allocate for the byte stream - * \param allocator the allocator to use for the memory allocation + * \param[in] char_array a pointer to the to be initialized char array struct + * \param[in] buffer_capacity the size of the memory to allocate for the byte stream + * \param[in] allocator the allocator to use for the memory allocation * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_INVALID_ARGUMENTS` if any arguments are invalid, or * \return 'RCUTILS_RET_BAD_ALLOC` if no memory could be allocated correctly @@ -84,7 +84,7 @@ rcutils_char_array_init( * Passing an uninitialized instance to this function leads to undefined * behavior. * - * \param char_array pointer to the rcutils_char_array_t to be cleaned up + * \param[in] char_array pointer to the rcutils_char_array_t to be cleaned up * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_INVALID_ARGUMENTS` if the char_array argument is invalid * \return `RCUTILS_RET_ERROR` if an unexpected error occurs @@ -107,8 +107,8 @@ rcutils_char_array_fini(rcutils_char_array_t * char_array); * allocates a new block of memory and copies the contents of the old buffer * instead of resizing the existing buffer. * - * \param char_array pointer to the instance of rcutils_char_array_t which is being resized - * \param new_size the new size of the internal buffer + * \param[in] char_array pointer to the instance of rcutils_char_array_t which is being resized + * \param[in] new_size the new size of the internal buffer * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_INVALID_ARGUMENT` if new_size is set to zero * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or @@ -126,8 +126,8 @@ rcutils_char_array_resize(rcutils_char_array_t * char_array, size_t new_size); * If the buffer is already big enough for `new_size`, it returns `RCUTILS_RET_OK` without * doing anything. * - * \param char_array pointer to the instance of rcutils_char_array_t which is being resized - * \param new_size the new size of the internal buffer + * \param[inout] char_array pointer to the instance of rcutils_char_array_t which is being resized + * \param[in] new_size the new size of the internal buffer * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or * \return `RCUTILS_RET_ERROR` if an unexpected error occurs @@ -145,9 +145,10 @@ rcutils_char_array_expand_as_needed(rcutils_char_array_t * char_array, size_t ne * The `va_list args` will be cloned before being used, so a user can safely * use it again after calling this function. * - * \param char_array pointer to the instance of rcutils_char_array_t which is being written to - * \param format the format string used by the underlying `vsnprintf` - * \param args the `va_list` used by the underlying `vsnprintf` + * \param[inout] char_array pointer to the instance of rcutils_char_array_t which is being + * written to + * \param[in] format the format string used by the underlying `vsnprintf` + * \param[in] args the `va_list` used by the underlying `vsnprintf` * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or * \return `RCUTILS_RET_ERROR` if an unexpected error occurs @@ -164,9 +165,9 @@ rcutils_char_array_vsprintf(rcutils_char_array_t * char_array, const char * form * It is virtually equivalent to `strncat(char_array->buffer, src, n)` except that the buffer * grows as needed so a user doesn't have to deal with memory management. * - * \param char_array pointer to the instance of rcutils_char_array_t which is being appended to - * \param src the string to be appended to the end of the string in buffer - * \param n it uses at most n bytes from the src string + * \param[inout] char_array pointer to the instance of rcutils_char_array_t which is being appended to + * \param[in] src the string to be appended to the end of the string in buffer + * \param[in] n it uses at most n bytes from the src string * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or * \return `RCUTILS_RET_ERROR` if an unexpected error occurs @@ -183,8 +184,9 @@ rcutils_char_array_strncat(rcutils_char_array_t * char_array, const char * src, * grows as needed. That is to say, a user can safely use it without doing calculation or * checks on the sizes of the src and buffer. * - * \param char_array pointer to the instance of rcutils_char_array_t which is being appended to - * \param src the string to be appended to the end of the string in buffer + * \param[inout] char_array pointer to the instance of rcutils_char_array_t which is being + * appended to + * \param[in] src the string to be appended to the end of the string in buffer * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or * \return `RCUTILS_RET_ERROR` if an unexpected error occurs @@ -199,9 +201,9 @@ rcutils_char_array_strcat(rcutils_char_array_t * char_array, const char * src); * This function is equivalent to `memcpy(char_array->buffer, src, n)` except that the buffer * grows as needed so a user doesn't have to worry about overflow. * - * \param char_array pointer to the instance of rcutils_char_array_t which is being resized - * \param src the memory to be copied from - * \param n a total of n bytes will be copied + * \param[inout] char_array pointer to the instance of rcutils_char_array_t which is being resized + * \param[in] src the memory to be copied from + * \param[in] n a total of n bytes will be copied * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or * \return `RCUTILS_RET_ERROR` if an unexpected error occurs @@ -216,8 +218,9 @@ rcutils_char_array_memcpy(rcutils_char_array_t * char_array, const char * src, s * This function is equivalent to `strcpy(char_array->buffer, src)` except that the buffer * grows as needed so that `src` will fit without overflow. * - * \param char_array pointer to the instance of rcutils_char_array_t which is being copied to - * \param src the string to be copied from + * \param[inout] char_array pointer to the instance of rcutils_char_array_t which is being + * copied to + * \param[in] src the string to be copied from * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or * \return `RCUTILS_RET_ERROR` if an unexpected error occurs diff --git a/include/rcutils/types/hash_map.h b/include/rcutils/types/hash_map.h index 7502dce8..d96ace35 100644 --- a/include/rcutils/types/hash_map.h +++ b/include/rcutils/types/hash_map.h @@ -36,7 +36,7 @@ typedef struct RCUTILS_PUBLIC_TYPE rcutils_hash_map_t /// The function signature for a key hashing function. /** - * \param key The key that needs to be hashed + * \param[in] key The key that needs to be hashed * \return A hash value for the provided string */ typedef size_t (* rcutils_hash_map_key_hasher_t)( @@ -45,8 +45,8 @@ typedef size_t (* rcutils_hash_map_key_hasher_t)( /// The function signature for a key comparison function. /** - * \param val1 The first value to compare - * \param val2 The second value to compare + * \param[in] val1 The first value to compare + * \param[in] val2 The second value to compare * \return A negative number if val1 < val2, or * \return A positve number if val1 > val2, or * \return Zero if val1 == val2 @@ -58,7 +58,7 @@ typedef int (* rcutils_hash_map_key_cmp_t)( /** * Validates that an rcutils_hash_map_t* points to a valid hash map. - * \param map A pointer to an rcutils_hash_map_t + * \param[in] map A pointer to an rcutils_hash_map_t * \return RCUTILS_RET_INVALID_ARGUMENT if map is null * \return RCUTILS_RET_NOT_INITIALIZED if map is not initialized */ diff --git a/include/rcutils/types/uint8_array.h b/include/rcutils/types/uint8_array.h index cf767aac..512a3c9c 100644 --- a/include/rcutils/types/uint8_array.h +++ b/include/rcutils/types/uint8_array.h @@ -49,9 +49,9 @@ rcutils_get_zero_initialized_uint8_array(void); * If the capacity is set to 0, no memory is allocated and the internal buffer * is still NULL. * - * \param uint8_array a pointer to the to be initialized uint8 array struct - * \param buffer_capacity the size of the memory to allocate for the byte stream - * \param allocator the allocator to use for the memory allocation + * \param[inout] uint8_array a pointer to the to be initialized uint8 array struct + * \param[in] buffer_capacity the size of the memory to allocate for the byte stream + * \param[in] allocator the allocator to use for the memory allocation * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_INVALID_ARGUMENTS` if any arguments are invalid, or * \return 'RCUTILS_RET_BAD_ALLOC` if no memory could be allocated correctly @@ -73,7 +73,7 @@ rcutils_uint8_array_init( * Passing an uninitialized instance to this function leads to undefined * behavior. * - * \param uint8_array pointer to the rcutils_uint8_array_t to be cleaned up + * \param[in] uint8_array pointer to the rcutils_uint8_array_t to be cleaned up * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_INVALID_ARGUMENTS` if the uint8_array argument is invalid * \return `RCUTILS_RET_ERROR` if an unexpected error occurs @@ -91,8 +91,9 @@ rcutils_uint8_array_fini(rcutils_uint8_array_t * uint8_array); * Be aware, that this might deallocate the memory and therefore invalidates any * pointers to this storage. * - * \param uint8_array pointer to the instance of rcutils_uint8_array_t which is being resized - * \param new_size the new size of the internal buffer + * \param[inout] uint8_array pointer to the instance of rcutils_uint8_array_t which is + * being resized + * \param[in] new_size the new size of the internal buffer * \return `RCUTILS_RET_OK` if successful, or * \return `RCUTILS_RET_INVALID_ARGUMENT` if new_size is set to zero * \return `RCUTILS_RET_BAD_ALLOC` if memory allocation failed, or diff --git a/resource/logging_macros.h.em b/resource/logging_macros.h.em index 375d741d..f22d65c5 100644 --- a/resource/logging_macros.h.em +++ b/resource/logging_macros.h.em @@ -57,11 +57,11 @@ extern "C" * * \note The condition will only be evaluated if this logging statement is enabled. * - * \param severity The severity level - * \param condition_before The condition macro(s) inserted before the log call - * \param condition_after The condition macro(s) inserted after the log call - * \param name The name of the logger - * \param ... The format string, followed by the variable arguments for the format string + * \param[in] severity The severity level + * \param[in] condition_before The condition macro(s) inserted before the log call + * \param[in] condition_after The condition macro(s) inserted after the log call + * \param[in] name The name of the logger + * \param[in] ... The format string, followed by the variable arguments for the format string */ #define RCUTILS_LOG_COND_NAMED(severity, condition_before, condition_after, name, ...) \ do { \ @@ -237,9 +237,9 @@ from rcutils.logging import severities . @[ end if]@ @[ for param_name, doc_line in feature_combinations[feature_combination].params.items()]@ - * \param @(param_name) @(doc_line) + * \param[in] @(param_name) @(doc_line) @[ end for]@ - * \param ... The format string, followed by the variable arguments for the format string + * \param[in] ... The format string, followed by the variable arguments for the format string */ # define RCUTILS_LOG_@(severity)@(suffix)(@(''.join([p + ', ' for p in get_macro_parameters(feature_combination).keys()]))...) \ RCUTILS_LOG_COND_NAMED( \ diff --git a/test/test_get_env.cpp b/test/test_get_env.cpp index ca51a4ab..998e4ede 100644 --- a/test/test_get_env.cpp +++ b/test/test_get_env.cpp @@ -18,7 +18,7 @@ #include "rcutils/get_env.h" -/* Tests the default allocator. +/* Tests rcutils_get_env. * * Expected environment variables must be set by the calling code: *