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 declaration for function to check QoS profile compatibility #299

Merged
merged 10 commits into from
Feb 25, 2021
24 changes: 24 additions & 0 deletions rmw/include/rmw/qos_profiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,30 @@ static const rmw_qos_profile_t rmw_qos_profile_unknown =
false
};

/// Check if two QoS profiles are compatible.
/**
* Two QoS profiles are compatible if the a publisher and subcription
* using their QoS policies can communicate with each other.
*
* <hr>
* Attribute | Adherence
* ------------------ | -------------
* Allocates Memory | No
* Thread-Safe | No
jacobperron marked this conversation as resolved.
Show resolved Hide resolved
* Uses Atomics | No
* Lock-Free | No
*
* \param[in] publisher_profile: The QoS profile used for a publisher.
* \param[in] subscription_profile: The QoS profile used for a subscription.
* \return `true` if the publisher and subscription profiles are compatible, `false` otherwise.
jacobperron marked this conversation as resolved.
Show resolved Hide resolved
*/
RMW_PUBLIC
RMW_WARN_UNUSED
bool
rmw_qos_profile_are_compatible(
const rmw_qos_profile_t publisher_profile,
const rmw_qos_profile_t subscription_profile);

#ifdef __cplusplus
}
#endif
Expand Down
3 changes: 3 additions & 0 deletions rmw/include/rmw/rmw.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
* - A function to validate a node's name
* - rmw_validate_node_name()
* - rmw/validate_node_name.h
* - A function to validate the compatibility of two QoS profiles
* - rmw_qos_profile_are_compatible()
* - rmw/qos_profiles.h
*
* It also has some machinery that is necessary to wait on and act on these concepts:
*
Expand Down