Function rmw_init_options_copy
Defined in File init_options.h
Function Documentation
-
rmw_ret_t rmw_init_options_copy(const rmw_init_options_t *src, rmw_init_options_t *dst)
Copy the given source init options to the destination init options.
The allocator from the source is used for any allocations and stored in the destination.
Attribute
Adherence
Allocates Memory
Yes
Thread-Safe
No
Uses Atomics
Yes
Lock-Free
Yes
Remark
Giving an zero initialized init options as a source will result in a failure with return code
RMW_RET_INVALID_ARGUMENT
.Remark
Giving an already initialized init options for the destination will result in a failure with return code
RMW_RET_INVALID_ARGUMENT
.This should be defined by the rmw implementation.
- Pre:
The source init options must have been initialized i.e. had
rmw_init_options_init()
called on.- Pre:
The destination init options must be zero initialized.
- Post:
If copy fails, destination init options will remain zero initialized.
- Parameters:
src – [in] rcl_init_options_t object to be copied from
dst – [out] rcl_init_options_t object to be copied into
- Returns:
RMW_RET_OK
if the copy is successful, or- Returns:
RMW_RET_INCORRECT_RMW_IMPLEMENTATION
if the implementation identifier for src does not match the implementation of this function, 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.