Function rcutils_array_list_set
Defined in File array_list.h
Function Documentation
-
rcutils_ret_t rcutils_array_list_set(rcutils_array_list_t *array_list, size_t index, const void *data)
Sets an entry in the list to the provided data.
This function sets the provided data at the specified index in the list. A shallow copy of the provided data is made to store in the list instead of just storing the pointer to the provided data.
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 position in the list to set the data
data – [in] a pointer to the data that will be set in the list
- Returns:
RCUTILS_RET_OK if successful, or
- Returns:
RCUTILS_RET_INVALID_ARGUMENT for invalid arguments, or
- Returns:
RCUTILS_RET_INVALID_ARGUMENT if index out of bounds, or
- Returns:
RCUTILS_RET_ERROR if an unknown error occurs.