Function rosidl_runtime_c_type_description_utils_create_type_description

Function Documentation

rcutils_ret_t rosidl_runtime_c_type_description_utils_create_type_description(const char *type_name, size_t type_name_length, rosidl_runtime_c__type_description__TypeDescription **type_description)

Construct a new populated TypeDescription object, with fields and referenced types sequences of size 0. NOTE: The description output arg must be passed in pointing to NULL.

Ownership:

  • The caller assumes ownership of the output TypeDescription and must free it and its members.

  • The char * members are copied.

Attribute

Adherence

Allocates Memory

Yes

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • type_name[in] the name of the type description’s main individual type

  • type_name_length[in] the string length of type_name (not counting the null terminator)

  • type_description[out] TypeDescription to be initialized. Must point to NULL, outputs pointing to NULL if error.

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.