Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rmw_publisher_count_non_local_matched_subscriptions #358

Open
wants to merge 1 commit into
base: rolling
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions rmw/include/rmw/rmw.h
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,35 @@ rmw_publisher_count_matched_subscriptions(
const rmw_publisher_t * publisher,
size_t * subscription_count);

/// Retrieve the number of non local matched subscriptions to a publisher.
/**
* Query the underlying middleware to determine how many non local subscriptions are
* matched to a given publisher.
*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to define what is local means by here.

Suggested change
*
* The definition of local means that in the same context.
*

* <hr>
* Attribute | Adherence
* ------------------ | -------------
* Allocates Memory | No
* Thread-Safe | No
* Uses Atomics | Maybe [1]
* Lock-Free | Maybe [1]
* <i>[1] rmw implementation defined, check the implementation documentation</i>
*
* \param[in] publisher the publisher object to inspect
* \param[out] non_local_subscription_count the number of non local subscriptions matched
* \return `RMW_RET_OK` if successful, or
* \return `RMW_RET_INVALID_ARGUMENT` if either argument is null, or
* \return `RMW_RET_INCORRECT_RMW_IMPLEMENTATION` if publisher
* implementation identifier does not match, or
* \return `RMW_RET_ERROR` if an unexpected error occurs.
*/
RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_publisher_count_non_local_matched_subscriptions(
const rmw_publisher_t * publisher,
size_t * non_local_subscription_count);

/// Retrieve the actual qos settings of the publisher.
/**
* Query the underlying middleware to determine the qos settings
Expand Down