Function rcl_subscription_get_network_flow_endpoints

Function Documentation

rcl_ret_t rcl_subscription_get_network_flow_endpoints(const rcl_subscription_t *subscription, rcutils_allocator_t *allocator, rcl_network_flow_endpoint_array_t *network_flow_endpoint_array)

Get network flow endpoints of a subscription.

Query the underlying middleware for a given subscription’s network flow endpoints

The subscription argument must point to a valid subscription.

The allocator argument must be a valid allocator.

The network_flow_endpoint_array argument must be allocated and zero-initialized. The function returns network flow endpoints in the network_flow_endpoint_array argument, using the allocator to allocate memory for the network_flow_endpoint_array argument’s internal data structures whenever required. The caller is reponsible for memory deallocation by passing the network_flow_endpoint_array argument to rcl_network_flow_endpoint_array_fini function.

Attribute

Adherence

Allocates Memory

Yes

Thread-Safe

No

Uses Atomics

No

Lock-Free

Maybe [1]

[1] implementation may need to protect the data structure with a lock

Parameters:
  • subscription[in] the subscription instance to inspect

  • allocator[in] allocator to be used when allocating space for network_flow_endpoint_array_t

  • network_flow_endpoint_array[out] the network flow endpoints

Returns:

RCL_RET_OK if successful, or

Returns:

RCL_RET_INVALID_ARGUMENT if any argument is null, or

Returns:

RCL_RET_BAD_ALLOC if memory allocation fails, or

Returns:

RCL_RET_UNSUPPORTED if not supported, or

Returns:

RCL_RET_ERROR if an unexpected error occurs.