Function rmw_network_flow_endpoint_array_init

Function Documentation

rmw_ret_t rmw_network_flow_endpoint_array_init(rmw_network_flow_endpoint_array_t *network_flow_endpoint_array, size_t size, rcutils_allocator_t *allocator)

Allocate a rmw_network_flow_endpoint_array_t instance.

Remark

RMW error state is set on failure

Parameters:
  • network_flow_endpoint_array[inout] array to be allocated

  • size[in] size of the array to be allocated

  • allocator[in] the allcator for allocating memory

Returns:

RMW_RET_OK on successfull initilization, or

Returns:

RMW_RET_INVALID_ARGUMENT if network_flow_endpoint_array or allocator is NULL, or

Returns:

RMW_RET_BAD_ALLOC if memory allocation fails, or

Returns:

RMW_RET_ERROR when an unspecified error occurs.