Go to the source code of this file.
◆ rmw_topic_endpoint_info_array_t
Array of topic endpoint information.
◆ rmw_get_zero_initialized_topic_endpoint_info_array()
Return a zero initialized array of topic endpoint information.
◆ rmw_topic_endpoint_info_array_check_zero()
Check that the given topic_endpoint_info_array is zero initialized.
| Attribute | Adherence |
| Allocates Memory | No |
| Thread-Safe | Yes |
| Uses Atomics | No |
| Lock-Free | Yes |
- Thread-safety
- Access to the array of topic endpoint information is read-only, but it is not synchronized. Concurrent
topic_endpoint_info_array reads are safe, but concurrent reads and writes are not.
- Parameters
-
| [in] | topic_endpoint_info_array | Array to be checked. |
- Returns
RMW_RET_OK if array is zero initialized, or
-
RMW_RET_INVALID_ARGUMENT if topic_endpoint_info_array is NULL, or
-
RMW_RET_ERROR if topic_endpoint_info_array is not zero initialized.
◆ rmw_topic_endpoint_info_array_init_with_size()
Initialize an array of topic endpoint information.
This function allocates space to hold size topic endpoint information elements. Both info_array and size members are updated accordingly.
| Attribute | Adherence |
| Allocates Memory | Yes |
| Thread-Safe | No |
| Uses Atomics | No |
| Lock-Free | Yes |
- Thread-safety
- Initialization is a reentrant procedure, but:
- Access to the array of topic endpoint information is not synchronized. It is not safe to read or write
topic_endpoint_info_array during initialization.
- The default allocators are thread-safe objects, but any custom
allocator may not be. Check your allocator documentation for further reference.
- Parameters
-
| [in,out] | topic_endpoint_info_array | Array to be initialized on success, but left unchanged on failure. |
| [in] | size | Size of the array. |
| [in] | allocator | Allocator to be used to populate names_and_types. |
- Returns
RMW_RET_OK if successful, or
-
RMW_RET_INVALID_ARGUMENT if topic_endpoint_info_array is NULL, or
-
RMW_RET_INVALID_ARGUMENT if topic_endpoint_info_array is not a zero initialized array, or
-
RMW_RET_INVALID_ARGUMENT if allocator is invalid, by rcutils_allocator_is_valid() definition, or
-
RMW_BAD_ALLOC if memory allocation fails, or
-
RMW_RET_ERROR when an unspecified error occurs.
◆ rmw_topic_endpoint_info_array_fini()
Finalize an array of topic endpoint information.
This function deallocates the given array storage, and then zero initializes it. If a logical error, such as RMW_RET_INVALID_ARGUMENT, ensues, this function will return early, leaving the given array unchanged. Otherwise, it will proceed despite errors.
| Attribute | Adherence |
| Allocates Memory | No |
| Thread-Safe | No |
| Uses Atomics | No |
| Lock-Free | Yes |
- Thread-safety
- Finalization is a reentrant procedure, but:
- Access to the array of topic endpoint information is not synchronized. It is not safe to read or write
topic_endpoint_info_array during finalization.
- The default allocators are thread-safe objects, but any custom
allocator may not be. Check your allocator documentation for further reference.
- Precondition
- Given
allocator must be the same used to initialize the given topic_endpoint_info_array.
- Parameters
-
| [in,out] | topic_endpoint_info_array | object to be finalized. |
| [in] | allocator | Allocator used to populate the given topic_endpoint_info_array. |
- Returns
RMW_RET_OK if successful, or
-
RMW_RET_INVALID_ARGUMENT if topic_endpoint_info_array is NULL, or
-
RMW_RET_INVALID_ARGUMENT if allocator is invalid, by rcutils_allocator_is_valid() definition, or
-
RMW_RET_ERROR when an unspecified error occurs.