ROS 2 rclcpp + rcl - rolling
rolling-a919a6e5
ROS 2 C++ Client Library with ROS Client Library
|
#include "rcl/allocator.h"
#include "rcl/macros.h"
#include "rcl/types.h"
#include "rcl/visibility_control.h"
Go to the source code of this file.
Classes | |
struct | rcl_logger_setting_s |
A logger item to specify a name and a log level. More... | |
struct | rcl_log_levels_s |
Hold default logger level and other logger setting. More... | |
Typedefs | |
typedef enum RCUTILS_LOG_SEVERITY | rcl_log_severity_t |
typedef for RCUTILS_LOG_SEVERITY; | |
typedef struct rcl_logger_setting_s | rcl_logger_setting_t |
A logger item to specify a name and a log level. | |
typedef struct rcl_log_levels_s | rcl_log_levels_t |
Hold default logger level and other logger setting. | |
Functions | |
RCL_PUBLIC RCL_WARN_UNUSED rcl_log_levels_t | rcl_get_zero_initialized_log_levels (void) |
Return a rcl_log_levels_t struct with members initialized to zero value. More... | |
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t | rcl_log_levels_init (rcl_log_levels_t *log_levels, const rcl_allocator_t *allocator, size_t logger_count) |
Initialize a log levels structure. More... | |
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t | rcl_log_levels_copy (const rcl_log_levels_t *src, rcl_log_levels_t *dst) |
Copy one log levels structure into another. More... | |
RCL_PUBLIC rcl_ret_t | rcl_log_levels_fini (rcl_log_levels_t *log_levels) |
Reclaim resources held inside rcl_log_levels_t structure. More... | |
RCL_PUBLIC rcl_ret_t | rcl_log_levels_shrink_to_size (rcl_log_levels_t *log_levels) |
Shrink log levels structure. More... | |
RCL_PUBLIC rcl_ret_t | rcl_log_levels_add_logger_setting (rcl_log_levels_t *log_levels, const char *logger_name, rcl_log_severity_t log_level) |
Add logger setting with a name and a level. More... | |
RCL_PUBLIC RCL_WARN_UNUSED rcl_log_levels_t rcl_get_zero_initialized_log_levels | ( | void | ) |
Return a rcl_log_levels_t struct with members initialized to zero value.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | Yes |
Uses Atomics | No |
Lock-Free | Yes |
Definition at line 23 of file log_level.c.
References rcl_log_levels_s::default_logger_level.
RCL_PUBLIC rcl_ret_t rcl_log_levels_add_logger_setting | ( | rcl_log_levels_t * | log_levels, |
const char * | logger_name, | ||
rcl_log_severity_t | log_level | ||
) |
Add logger setting with a name and a level.
Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | log_levels | The structure where to set the logger log level. |
[in] | logger_name | Name for the logger, a copy of it will be stored in the structure. |
[in] | log_level | Minimum log level severity to be set for logger_name. |
Definition at line 145 of file log_level.c.
References rcl_log_levels_s::allocator, rcl_log_levels_s::capacity_logger_settings, rcl_logger_setting_s::level, rcl_log_levels_s::logger_settings, rcl_logger_setting_s::name, rcl_log_levels_s::num_logger_settings, RCL_CHECK_ALLOCATOR_WITH_MSG, RCL_RET_BAD_ALLOC, RCL_RET_ERROR, RCL_RET_INVALID_ARGUMENT, and RCL_RET_OK.
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_log_levels_copy | ( | const rcl_log_levels_t * | src, |
rcl_log_levels_t * | dst | ||
) |
Copy one log levels structure into another.
Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | src | The structure to be copied. Its allocator is used to copy memory into the new structure. |
[out] | dst | A log levels structure to be copied into. |
Definition at line 64 of file log_level.c.
References rcl_log_levels_s::allocator, rcl_log_levels_s::capacity_logger_settings, rcl_log_levels_s::default_logger_level, rcl_logger_setting_s::level, rcl_log_levels_s::logger_settings, rcl_logger_setting_s::name, rcl_log_levels_s::num_logger_settings, RCL_CHECK_ALLOCATOR_WITH_MSG, rcl_log_levels_fini(), RCL_RET_BAD_ALLOC, RCL_RET_INVALID_ARGUMENT, and RCL_RET_OK.
RCL_PUBLIC rcl_ret_t rcl_log_levels_fini | ( | rcl_log_levels_t * | log_levels | ) |
Reclaim resources held inside rcl_log_levels_t structure.
Attribute | Adherence |
---|---|
Allocates Memory | No |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | log_levels | The structure which its resources have to be deallocated. |
Definition at line 102 of file log_level.c.
References rcl_log_levels_s::allocator, rcl_log_levels_s::logger_settings, rcl_logger_setting_s::name, rcl_log_levels_s::num_logger_settings, RCL_CHECK_ALLOCATOR_WITH_MSG, RCL_RET_INVALID_ARGUMENT, and RCL_RET_OK.
Referenced by rcl_log_levels_copy().
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_log_levels_init | ( | rcl_log_levels_t * | log_levels, |
const rcl_allocator_t * | allocator, | ||
size_t | logger_count | ||
) |
Initialize a log levels structure.
Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | log_levels | The structure to be initialized. |
[in] | allocator | Memory allocator to be used and assigned into log_levels. |
[in] | logger_count | Number of logger settings to be allocated. This reserves memory for logger_settings, but doesn't initialize it. |
Definition at line 36 of file log_level.c.
References rcl_log_levels_s::allocator, rcl_log_levels_s::capacity_logger_settings, rcl_log_levels_s::default_logger_level, rcl_log_levels_s::logger_settings, rcl_log_levels_s::num_logger_settings, RCL_CHECK_ALLOCATOR_WITH_MSG, RCL_RET_BAD_ALLOC, RCL_RET_INVALID_ARGUMENT, and RCL_RET_OK.
RCL_PUBLIC rcl_ret_t rcl_log_levels_shrink_to_size | ( | rcl_log_levels_t * | log_levels | ) |
Shrink log levels structure.
Attribute | Adherence |
---|---|
Allocates Memory | Yes |
Thread-Safe | No |
Uses Atomics | No |
Lock-Free | Yes |
[in] | log_levels | The structure to be shrunk. |
Definition at line 121 of file log_level.c.
References rcl_log_levels_s::allocator, rcl_log_levels_s::capacity_logger_settings, rcl_log_levels_s::logger_settings, rcl_log_levels_s::num_logger_settings, RCL_CHECK_ALLOCATOR_WITH_MSG, RCL_RET_BAD_ALLOC, RCL_RET_INVALID_ARGUMENT, and RCL_RET_OK.