Function rmw_subscription_count_matched_publishers

Function Documentation

rmw_ret_t rmw_subscription_count_matched_publishers(const rmw_subscription_t *subscription, size_t *publisher_count)

Retrieve the number of matched publishers to a subscription.

Query the underlying middleware to determine how many publishers are matched to a given subscription.

Attribute

Adherence

Allocates Memory

No

Thread-Safe

No

Uses Atomics

Maybe [1]

Lock-Free

Maybe [1]

[1] rmw implementation defined, check the implementation documentation

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

  • publisher_count[out] the number of publishers matched

Returns:

RMW_RET_OK if successful, or

Returns:

RMW_RET_INVALID_ARGUMENT if either argument is null, or

Returns:

RMW_RET_INCORRECT_RMW_IMPLEMENTATION if subscription implementation identifier does not match, or

Returns:

RMW_RET_ERROR if an unexpected error occurs.