Function rmw_publisher_count_matched_subscriptions

Function Documentation

rmw_ret_t rmw_publisher_count_matched_subscriptions(const rmw_publisher_t *publisher, size_t *subscription_count)

Retrieve the number of matched subscriptions to a publisher.

Query the underlying middleware to determine how many subscriptions are matched to a given publisher.

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:
  • publisher[in] the publisher object to inspect

  • subscription_count[out] the number of subscriptions 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 publisher implementation identifier does not match, or

Returns:

RMW_RET_ERROR if an unexpected error occurs.