Add content filtering support check for subscriptions#1293
Add content filtering support check for subscriptions#1293fujitatomoya merged 2 commits intoros2:rollingfrom
Conversation
Signed-off-by: Barry Xu <barry.xu@sony.com>
fujitatomoya
left a comment
There was a problem hiding this comment.
@Barry-Xu-2018 i think we should support this feature 1st, and use it elsewhere for current existed code. what do you think?
Yes. I think so. |
There was a problem hiding this comment.
Pull request overview
Adds an rcl API to query whether a subscription supports content filtering, aiming to let higher-level code avoid unnecessary CFT-related calls when the underlying RMW can’t support them.
Changes:
- Add
rcl_subscription_is_cft_supported()public API declaration/definition. - Add init-time logic in
rcl_subscription_init()intended to determine CFT support. - Extend subscription tests to cover the new API and bad-argument behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
rcl/src/rcl/subscription.c |
Implements the support check and the new rcl_subscription_is_cft_supported() accessor. |
rcl/include/rcl/subscription.h |
Declares the new public API. |
rcl/test/rcl/test_subscription.cpp |
Adds unit tests for the new API and bad-argument cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Barry Xu <barry.xu@sony.com>
|
@Barry-Xu-2018 i will start CI for ros2/rmw#415 and #1293. after those are merged, we can take advantage of this new interface to check if the cft is supported in the upper layers. |
|
Pulls: #1293, ros2/rmw#415 |
|
@Barry-Xu-2018 This PR created a lot of console spam if using cyclone. Is there a specific reason, to why you need to perform this check during construction, and can't do it lazy ? |
Sorry, I didn't notice this problem in time. |
Description
Currently, RMW does not provide an interface to directly determine whether a subscription supports content filtering. Implementing this interface in rcl allows other code that uses the content filter feature to be optimized, making the implementation code clearer.
Depened on ros2/rmw#415
Is this user-facing behavior change?
No.
Did you use Generative AI?
No.
Additional Information