Function rcl_log_levels_init

Function Documentation

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

Parameters:
  • log_levels[in] The structure to be initialized.

  • allocator[in] Memory allocator to be used and assigned into log_levels.

  • logger_count[in] Number of logger settings to be allocated. This reserves memory for logger_settings, but doesn’t initialize it.

Returns:

RCL_RET_OK if the structure was initialized successfully, or

Returns:

RCL_RET_INVALID_ARGUMENT if log_levels is NULL, or

Returns:

RCL_RET_INVALID_ARGUMENT if log_levels contains initialized memory, or

Returns:

RCL_RET_INVALID_ARGUMENT if allocator is invalid, or

Returns:

RCL_RET_BAD_ALLOC if allocating memory failed.