Skip to content

add event_type_is_supported() for Publisher/Subscription.#3132

Open
fujitatomoya wants to merge 1 commit into
rollingfrom
fujitatomoya/rmw/pull/395/followup
Open

add event_type_is_supported() for Publisher/Subscription.#3132
fujitatomoya wants to merge 1 commit into
rollingfrom
fujitatomoya/rmw/pull/395/followup

Conversation

@fujitatomoya
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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) and SubscriptionBase::event_type_is_supported(rcl_subscription_event_type_t) as public static APIs that forward to rcl support-check functions.
  • Update test_qos_event.cpp to use the new rclcpp APIs instead of rmw_event_type_is_supported(...).
  • Add unit tests asserting the rclcpp API results match the underlying rcl results.

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.

Copy link
Copy Markdown
Collaborator Author

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

@ahcorde can you review this?

Comment thread rclcpp/test/rclcpp/test_qos_event.cpp
@fujitatomoya fujitatomoya requested a review from ahcorde April 15, 2026 22:52
Signed-off-by: Tomoya Fujita <tomoya.fujita825@gmail.com>
@fujitatomoya
Copy link
Copy Markdown
Collaborator Author

Pulls: ros2/rcl#1317, #3132, ros2/rclpy#1647
Gist: https://gist.githubusercontent.com/fujitatomoya/da0945366990a7a90848379cce0e0673/raw/deef0ce8ee6811fcb8d377a8ecf8ddda07e6fe23/ros2.repos
BUILD args: --packages-above-and-dependencies rcl rclcpp rclpy
TEST args: --packages-above rcl rclcpp rclpy
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19228

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants