Function rcutils_array_list_get

Function Documentation

rcutils_ret_t rcutils_array_list_get(const rcutils_array_list_t *array_list, size_t index, void *data)

Retrieves an entry in the list at the provided index.

This function retrieves a copy of the data stored in the list at the provided index.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

No

Lock-Free

Yes

Parameters:
  • array_list[in] to add the data to

  • index[in] the index at which to get the data

  • data[out] a copy of the data stored in the list

Returns:

RCUTILS_RET_OK if successful, or

Returns:

RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or

Returns:

RCUTILS_RET_ERROR if an unknown error occurs.