Function rosidl_runtime_c_type_description_utils_find_referenced_type_description

Function Documentation

rcutils_ret_t rosidl_runtime_c_type_description_utils_find_referenced_type_description(const rosidl_runtime_c__type_description__IndividualTypeDescription__Sequence *referenced_types, const char *type_name, rosidl_runtime_c__type_description__IndividualTypeDescription **referenced_type)

Get the first referenced IndividualTypeDescription, matching by type name.

The referenced_type output arg must be passed in pointing NULL. It will remain pointing to NULL if no matching IndividualTypeDescription is found.

Ownership:

  • The output IndividualTypeDescription borrows the referenced_types arg’s IndividualTypeDescription element. It is not authorized to deallocate it and it cannot outlive the referenced_types it borrows from.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • referenced_types[in] array of referenced individual type descriptions to search through

  • type_name[in] name of the referenced referenced individual type description to look for

  • referenced_type[out] the first individual type description with type name that matches the type_name arg. Must point to NULL, outputs pointing to NULL if not found.

Returns:

#RCUTILS_RET_OK if successful, or

Returns:

#RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or

Returns:

#RCUTILS_RET_NOT_FOUND if no IndividualTypeDescription with matching name is found, or

Returns:

#RCUTILS_RET_ERROR if an unknown error occurs.