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

Extend names_and_types to contain type hashes #356

Open
emersonknapp opened this issue Jul 26, 2023 · 2 comments
Open

Extend names_and_types to contain type hashes #356

emersonknapp opened this issue Jul 26, 2023 · 2 comments

Comments

@emersonknapp
Copy link
Contributor

Feature request

Feature description

REP-2016 type hashes now exist and are passed during discovery for the 3 DDS implementations, but are only exposed through rmw_topic_endpoint_info_t, which is given by get_publishers_info_by_topic/get_subscriptions_info_by_topic, but otherwise is not exposed.

When querying information about a node rather than a topic, one generally uses rmw_get_publisher_names_and_types_by_node(etc) which returns the topic name and typename, but does have access to the type hash, which it would be appropriate to return in these functions, making it easier to then query information about those topics.

Implementation considerations

This probably looks like:

typedef struct RMW_PUBLIC_TYPE rmw_names_and_types_s
{
  /// Array of names
  rcutils_string_array_t names;

  /// Dynamic array of arrays of type names, with the same length as `names`
  rcutils_string_array_t * types;

  /// NEW FIELD
  /// Dynamic array of type hashes, with the same length as `names`
  rosidl_type_hash_t * type_hashes;
} rmw_names_and_types_t;

And then will require filling out this information in all names_and_types APIs.

This would be ABI-breaking, so probably can only be planned for Jazzy.

@wjwwood
Copy link
Member

wjwwood commented Jul 27, 2023

Makes sense to me, basically anywhere we have the type of a topic we should have the hash.

@fujitatomoya
Copy link
Collaborator

sounds good to me.

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

No branches or pull requests

3 participants