From bd7534f120897ae53ea3bb5a52bb98940ca76081 Mon Sep 17 00:00:00 2001 From: Sebastian Jakymiw Date: Mon, 23 Jan 2023 09:48:03 -0500 Subject: [PATCH 1/2] Add stub dynamic network interface implementation. Signed-off-by: Sebastian Jakymiw --- rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp | 8 ++++++++ rmw_connextdds_common/src/common/rmw_node.cpp | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp b/rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp index f81f9bb0..11739ba7 100644 --- a/rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp +++ b/rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp @@ -67,6 +67,14 @@ bool rmw_connextdds_find_string_in_list( DDS_Duration_t rmw_connextdds_duration_from_ros_time( const rmw_time_t * const ros_time); +/** + * 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` + */ +rmw_ret_t rmw_notify_participant_dynamic_network_interface(rmw_context_t * context); + /****************************************************************************** * WaitSet wrapper ******************************************************************************/ diff --git a/rmw_connextdds_common/src/common/rmw_node.cpp b/rmw_connextdds_common/src/common/rmw_node.cpp index 86f57735..c0064582 100644 --- a/rmw_connextdds_common/src/common/rmw_node.cpp +++ b/rmw_connextdds_common/src/common/rmw_node.cpp @@ -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) +{ + return RMW_RET_INCORRECT_RMW_IMPLEMENTATION; +} From 59a41e4951a98585335ef566f8b43d7b9cb773f4 Mon Sep 17 00:00:00 2001 From: Sebastian Jakymiw Date: Mon, 23 Jan 2023 14:57:05 -0500 Subject: [PATCH 2/2] Fix comment and return type. Signed-off-by: Sebastian Jakymiw --- rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp | 5 ++--- rmw_connextdds_common/src/common/rmw_node.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp b/rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp index 11739ba7..7a9309cf 100644 --- a/rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp +++ b/rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp @@ -68,10 +68,9 @@ DDS_Duration_t rmw_connextdds_duration_from_ros_time( const rmw_time_t * const ros_time); /** - * This function returns `NULL` when either the node handle is `NULL` or when the - * node handle is from a different rmw implementation. + * This function returns RMW_RET_UNSUPPORTED when the rmw does not support it. * - * \return rmw_ret_t non `NULL` value if successful, otherwise `NULL` + * \return rmw_ret_t non `RMW_RET_UNSUPPORTED` value if unsupported, if unsuccessful it returns `NULL` */ rmw_ret_t rmw_notify_participant_dynamic_network_interface(rmw_context_t * context); diff --git a/rmw_connextdds_common/src/common/rmw_node.cpp b/rmw_connextdds_common/src/common/rmw_node.cpp index c0064582..e8a1e6e9 100644 --- a/rmw_connextdds_common/src/common/rmw_node.cpp +++ b/rmw_connextdds_common/src/common/rmw_node.cpp @@ -233,5 +233,5 @@ rmw_api_connextdds_node_get_graph_guard_condition(const rmw_node_t * rmw_node) rmw_ret_t rmw_notify_participant_dynamic_network_interface(rmw_context_t * context) { - return RMW_RET_INCORRECT_RMW_IMPLEMENTATION; + return RMW_RET_UNSUPPORTED; }