Function rmw_init_options_init
Defined in File init_options.h
Function Documentation
-
rmw_ret_t rmw_init_options_init(rmw_init_options_t *init_options, rcutils_allocator_t allocator)
Initialize given init options with the default values and implementation specific values.
The given allocator is used, if required, during setup of the init options, but is also used during initialization.
In either case the given allocator is stored in the returned init options.
The
impl
pointer should not be changed manually.Attribute
Adherence
Allocates Memory
Yes
Thread-Safe
No
Uses Atomics
Yes
Lock-Free
Yes
Remark
Giving an already initialized init options will result in a failure with return code
RMW_RET_INVALID_ARGUMENT
.This should be defined by the rmw implementation.
- Pre:
The given init options must be zero initialized.
- Post:
If initialization fails, init options will remain zero initialized.
- Parameters:
init_options – [inout] object to be setup
allocator – [in] to be used during setup and during initialization
- Returns:
RMW_RET_OK
if setup is successful, or- Returns:
RMW_RET_INVALID_ARGUMENT
if any arguments are invalid, or- Returns:
RMW_RET_BAD_ALLOC
if allocating memory failed, or- Returns:
RMW_RET_ERROR
if an unspecified error occurs.