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

Add stub dynamic network interface implementation. #99

Open
wants to merge 2 commits into
base: rolling
Choose a base branch
from

Conversation

jakymiws
Copy link

Per this ros2/rclcpp#2086 (comment) comment on a related PR, this PR seeks to add a stubbed version of a feature developed for rmw_fastrtps: ros2/rmw_fastrtps#662 so that if this feature is called with an rmw layer that does not implement the feature, it returns an error that can be handled.

Signed-off-by: Sebastian Jakymiw [email protected]

* This function returns `NULL` when either the node handle is `NULL` or when the
* node handle is from a different rmw implementation.
*
* \return rmw_ret_t non `NULL` value if successful, otherwise `NULL`
Copy link
Contributor

Choose a reason for hiding this comment

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

this comment seems wrong (the function does not return NULL and it does not take a node handle as argument)

Copy link
Author

Choose a reason for hiding this comment

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

Ah whoops. That is left over from the actual implementation. I will fix.

Signed-off-by: Sebastian Jakymiw <[email protected]>
Copy link
Collaborator

@asorbini asorbini left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you for the contribution @jakymiws.

The PR can be merged once ros2/rclcpp#2086 and other related PRs are moved forward and approved.

I guess it wouldn't hurt merging it sooner than that either, since it only adds new functions, but I would prefer to wait for the feature to be approved.

@@ -229,3 +229,9 @@ rmw_api_connextdds_node_get_graph_guard_condition(const rmw_node_t * rmw_node)

return node_impl->graph_guard_condition();
}

rmw_ret_t
rmw_notify_participant_dynamic_network_interface(rmw_context_t * context)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor comment, which applies more to the rmw interface that this specific change, but I always prefer to pass const pointers, e.g.:

Suggested change
rmw_notify_participant_dynamic_network_interface(rmw_context_t * context)
rmw_notify_participant_dynamic_network_interface(rmw_context_t * const context)

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