Function rosidl_runtime_c_type_description_utils_append_referenced_type_description
Defined in File type_description_utils.h
Function Documentation
-
rcutils_ret_t rosidl_runtime_c_type_description_utils_append_referenced_type_description(rosidl_runtime_c__type_description__TypeDescription *type_description, rosidl_runtime_c__type_description__TypeDescription *type_description_to_append, bool coerce_to_valid)
Append a referenced
TypeDescription
to aTypeDescription
, extending it with recursive types.Ownership:
A deep-copy of the
type_description_to_append
object’s main individual type description is appended totype_description
on success, thetype_description
is then responsible for freeing the copied individual type descriptions.Deep-copies of the
type_description_to_append
object’s referenced individual type descriptions are appended totype_description
on success, thetype_description
is then responsible for freeing the copied individual type descriptions (or the remaining ones if they are pruned).The ownership of the input
type_description
is not transferred, it must still be freed.
Attribute
Adherence
Allocates Memory
Yes
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
- Parameters:
type_description – [inout] the type description to append to, noop on failure
type_description – [inout] the type description to append
coerce_to_valid – [in] coerces input type_description to valid before output if true (pruning and sorting), best effort
- Returns:
#RCUTILS_RET_OK if successful, or
- Returns:
#RCUTILS_RET_BAD_ALLOC if memory allocation fails, or
- Returns:
#RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or
- Returns:
#RCUTILS_RET_ERROR if an unknown error occurs.