add event_type_is_supported() for Publisher/Subscription.#3132
add event_type_is_supported() for Publisher/Subscription.#3132fujitatomoya wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a public runtime capability-check API to rclcpp so application code (and rclcpp tests) can determine whether specific publisher/subscription QoS event types are supported by the currently loaded RMW implementation, via PublisherBase/SubscriptionBase.
Changes:
- Add
PublisherBase::event_type_is_supported(rcl_publisher_event_type_t)andSubscriptionBase::event_type_is_supported(rcl_subscription_event_type_t)as public static APIs that forward torclsupport-check functions. - Update
test_qos_event.cppto use the newrclcppAPIs instead ofrmw_event_type_is_supported(...). - Add unit tests asserting the
rclcppAPI results match the underlyingrclresults.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| rclcpp/test/rclcpp/test_qos_event.cpp | Switches capability checks to the new rclcpp APIs and adds parity tests vs rcl. |
| rclcpp/src/rclcpp/subscription_base.cpp | Implements SubscriptionBase::event_type_is_supported() by forwarding to rcl_subscription_event_type_is_supported(). |
| rclcpp/src/rclcpp/publisher_base.cpp | Implements PublisherBase::event_type_is_supported() by forwarding to rcl_publisher_event_type_is_supported(). |
| rclcpp/include/rclcpp/subscription_base.hpp | Declares the new public static capability-check API for subscriptions with Doxygen docs. |
| rclcpp/include/rclcpp/publisher_base.hpp | Declares the new public static capability-check API for publishers with Doxygen docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fujitatomoya
left a comment
There was a problem hiding this comment.
@ahcorde can you review this?
Signed-off-by: Tomoya Fujita <tomoya.fujita825@gmail.com>
cd7bcc7 to
b725a1d
Compare
|
Pulls: ros2/rcl#1317, #3132, ros2/rclpy#1647 |
Description
depends on ros2/rcl#1317
Fixes # (issue)
Is this user-facing behavior change?
No
Did you use Generative AI?
Yes Claude Code Opus4.6
Additional Information