Add rosidl buffer backend metadata to topic endpoint info#419
Conversation
Signed-off-by: CY Chen <cyc@nvidia.com>
53eeb93 to
3cf8b54
Compare
|
@nvcyc is there a test in See test failures across RMW impls: https://ci.ros2.org/job/ci_linux/29339/testReport/junit/ros2topic.ros2topic.test/test_cli/test_cli/ |
| /// Buffer backend metadata advertised for this endpoint | ||
| rcutils_string_map_t buffer_backend_metadata; |
There was a problem hiding this comment.
the struct previously held only const char * owning pointers, but it now holds a rcutils_string_map_t whose impl is a heap pointer with its own fini. any code path that copies an rmw_topic_endpoint_info_t by plain struct assignment or memcpy now aliases that impl between two structs.
the existing const char * members have the same hazard in principle, but the codebase already established a deep-copy discipline for strings.
i'd suggest a rmw_topic_endpoint_info deep-copy helper, or at minimum confirmation that no array/element copy in the current code and companion PRs.
There was a problem hiding this comment.
Thanks for pointing this issue out.
I agreed that adding a field of type rcutils_string_map_t in rmw_topic_endpoint_info_t is exposing more possible failure surface and requires extra care when handling rmw_topic_endpoint_info_t.
For this reason, I'm updating rmw_topic_endpoint_info_t to host the newly added buffer_backend_metadata field with const char * type, which is consistent to what most other fields in rmw_topic_endpoint_info_t already use and hence not broadening the risk surface.
Corresponding serializer and parser functions are added to store and and get the rosidl buffer metadata.
Relevant PRs are also updated accordingly for this change.
Signed-off-by: CY Chen <cyc@nvidia.com>
|
Tick the box to add this pull request to the merge queue (same as
|
Description
Add rosidl buffer backend metadata to
rmw_topic_endpoint_info_tso graph introspection APIs can carry backend support information for publishers and subscriptions.Is this user-facing behavior change?
Yes. This enables higher-level ROS graph tools to expose buffer backend support information for topic endpoints.
Did you use Generative AI?
Yes. GPT-5.5 in Cursor was used to help draft changes in this pull request.
Additional Information
This PR only adds the RMW-level data model.
RMW implementations and client libraries need separate changes to populate and expose the metadata.