Function rosidl_runtime_c_type_description_utils_find_field
Defined in File type_description_utils.h
Function Documentation
-
rcutils_ret_t rosidl_runtime_c_type_description_utils_find_field(const rosidl_runtime_c__type_description__Field__Sequence *fields, const char *name, rosidl_runtime_c__type_description__Field **field)
Get the first Field, matching by name.
The
field
output arg must be passed in pointing toNULL
. It will remain pointing toNULL
if no matchingField
is found.Ownership:
The output
Field
borrows thefields
arg’sField
element. It is not authorized to deallocate it and cannot outlive the owner it borrows from.
Attribute
Adherence
Allocates Memory
No
Thread-Safe
No
Uses Atomics
No
Lock-Free
Yes
- Parameters:
fields – [in] array of fields to search through
name – [in] field name of the field to look for
field – [out] the first field with field name that matches the name arg. Must point to
NULL
, outputs pointing toNULL
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
Field
with a matching name is found, or- Returns:
#RCUTILS_RET_ERROR if an unknown error occurs.