From feb6744c9c2bb7e9f468a9c1b2f2c70fa60cdbd0 Mon Sep 17 00:00:00 2001 From: Jaison Titus Date: Thu, 3 Oct 2019 17:27:25 -0700 Subject: [PATCH 1/5] Added functions to get qos policies - rmw_get_publishers_info_by_topic to get the qos policies for publishers to a topic - rmw_get_subscriptions_info_by_topic to a get the qos policies for subscriptions to a topic Signed-off-by: Jaison Titus --- rmw_implementation/src/functions.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/rmw_implementation/src/functions.cpp b/rmw_implementation/src/functions.cpp index ba4bfb5f..8be580df 100644 --- a/rmw_implementation/src/functions.cpp +++ b/rmw_implementation/src/functions.cpp @@ -534,6 +534,24 @@ RMW_INTERFACE_FN(rmw_set_log_severity, rmw_ret_t, RMW_RET_ERROR, 1, ARG_TYPES(rmw_log_severity_t)) +RMW_INTERFACE_FN(rmw_get_publishers_info_by_topic, + rmw_ret_t, RMW_RET_ERROR, + 5, ARG_TYPES( + const rmw_node_t *, + rcutils_allocator_t *, + const char *, + bool, + rmw_topic_info_array_t *)) + +RMW_INTERFACE_FN(rmw_get_subscriptions_info_by_topic, + rmw_ret_t, RMW_RET_ERROR, + 5, ARG_TYPES( + const rmw_node_t *, + rcutils_allocator_t *, + const char *, + bool, + rmw_topic_info_array_t *)) + #define GET_SYMBOL(x) symbol_ ## x = get_symbol(#x); void prefetch_symbols(void) @@ -607,6 +625,8 @@ void prefetch_symbols(void) GET_SYMBOL(rmw_compare_gids_equal) GET_SYMBOL(rmw_service_server_is_available) GET_SYMBOL(rmw_set_log_severity) + GET_SYMBOL(rmw_get_publishers_info_by_topic) + GET_SYMBOL(rmw_get_subscriptions_info_by_topic) } void * symbol_rmw_init = nullptr; From 6dd0abf8380378c6dc2e432aed2a73f049db9856 Mon Sep 17 00:00:00 2001 From: Jaison Titus Date: Thu, 14 Nov 2019 17:37:48 -0800 Subject: [PATCH 2/5] - Changed default return type for rmw_get_publishers_info_by_topic and rmw_get_subscriptions_info_by_topic to RMW_RET_UNSUPPORTED. - Added a rmw_reset_error_msg() after GET_SYMBOL() to above two functions to prevent a display of "Error message being replaced. Called rcultils_reset_error() after error handling". Signed-off-by: Jaison Titus --- rmw_implementation/src/functions.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rmw_implementation/src/functions.cpp b/rmw_implementation/src/functions.cpp index 8be580df..3a6d5354 100644 --- a/rmw_implementation/src/functions.cpp +++ b/rmw_implementation/src/functions.cpp @@ -535,7 +535,7 @@ RMW_INTERFACE_FN(rmw_set_log_severity, 1, ARG_TYPES(rmw_log_severity_t)) RMW_INTERFACE_FN(rmw_get_publishers_info_by_topic, - rmw_ret_t, RMW_RET_ERROR, + rmw_ret_t, RMW_RET_UNSUPPORTED, 5, ARG_TYPES( const rmw_node_t *, rcutils_allocator_t *, @@ -544,7 +544,7 @@ RMW_INTERFACE_FN(rmw_get_publishers_info_by_topic, rmw_topic_info_array_t *)) RMW_INTERFACE_FN(rmw_get_subscriptions_info_by_topic, - rmw_ret_t, RMW_RET_ERROR, + rmw_ret_t, RMW_RET_UNSUPPORTED, 5, ARG_TYPES( const rmw_node_t *, rcutils_allocator_t *, @@ -626,7 +626,9 @@ void prefetch_symbols(void) GET_SYMBOL(rmw_service_server_is_available) GET_SYMBOL(rmw_set_log_severity) GET_SYMBOL(rmw_get_publishers_info_by_topic) + rmw_reset_error(); GET_SYMBOL(rmw_get_subscriptions_info_by_topic) + rmw_reset_error(); } void * symbol_rmw_init = nullptr; From 98795835d074953bbb4d9e1406be41c3f01cd5d4 Mon Sep 17 00:00:00 2001 From: Jaison Titus Date: Fri, 22 Nov 2019 08:52:20 -0800 Subject: [PATCH 3/5] This reverts commit 6dd0abf8380378c6dc2e432aed2a73f049db9856. Signed-off-by: Jaison Titus --- rmw_implementation/src/functions.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rmw_implementation/src/functions.cpp b/rmw_implementation/src/functions.cpp index 3a6d5354..8be580df 100644 --- a/rmw_implementation/src/functions.cpp +++ b/rmw_implementation/src/functions.cpp @@ -535,7 +535,7 @@ RMW_INTERFACE_FN(rmw_set_log_severity, 1, ARG_TYPES(rmw_log_severity_t)) RMW_INTERFACE_FN(rmw_get_publishers_info_by_topic, - rmw_ret_t, RMW_RET_UNSUPPORTED, + rmw_ret_t, RMW_RET_ERROR, 5, ARG_TYPES( const rmw_node_t *, rcutils_allocator_t *, @@ -544,7 +544,7 @@ RMW_INTERFACE_FN(rmw_get_publishers_info_by_topic, rmw_topic_info_array_t *)) RMW_INTERFACE_FN(rmw_get_subscriptions_info_by_topic, - rmw_ret_t, RMW_RET_UNSUPPORTED, + rmw_ret_t, RMW_RET_ERROR, 5, ARG_TYPES( const rmw_node_t *, rcutils_allocator_t *, @@ -626,9 +626,7 @@ void prefetch_symbols(void) GET_SYMBOL(rmw_service_server_is_available) GET_SYMBOL(rmw_set_log_severity) GET_SYMBOL(rmw_get_publishers_info_by_topic) - rmw_reset_error(); GET_SYMBOL(rmw_get_subscriptions_info_by_topic) - rmw_reset_error(); } void * symbol_rmw_init = nullptr; From 1b31503278254d34402cfa969d44e07d8e74f66a Mon Sep 17 00:00:00 2001 From: Jaison Titus Date: Tue, 26 Nov 2019 18:00:47 -0800 Subject: [PATCH 4/5] Handles modifications to headers in rmw Signed-off-by: Jaison Titus --- rmw_implementation/src/functions.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/rmw_implementation/src/functions.cpp b/rmw_implementation/src/functions.cpp index 8be580df..fcacad17 100644 --- a/rmw_implementation/src/functions.cpp +++ b/rmw_implementation/src/functions.cpp @@ -33,6 +33,7 @@ #include "rmw/names_and_types.h" #include "rmw/get_node_info_and_types.h" #include "rmw/get_service_names_and_types.h" +#include "rmw/get_topic_info.h" #include "rmw/get_topic_names_and_types.h" #include "rmw/rmw.h" From 62e9c6fabaeab6c20a2f93faa4cf350094792620 Mon Sep 17 00:00:00 2001 From: Miaofei Date: Thu, 9 Jan 2020 23:44:47 -0800 Subject: [PATCH 5/5] rename *topic_info* to *topic_endpoint_info* Signed-off-by: Miaofei --- rmw_implementation/src/functions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rmw_implementation/src/functions.cpp b/rmw_implementation/src/functions.cpp index fcacad17..a3d7e841 100644 --- a/rmw_implementation/src/functions.cpp +++ b/rmw_implementation/src/functions.cpp @@ -33,7 +33,7 @@ #include "rmw/names_and_types.h" #include "rmw/get_node_info_and_types.h" #include "rmw/get_service_names_and_types.h" -#include "rmw/get_topic_info.h" +#include "rmw/get_topic_endpoint_info.h" #include "rmw/get_topic_names_and_types.h" #include "rmw/rmw.h" @@ -542,7 +542,7 @@ RMW_INTERFACE_FN(rmw_get_publishers_info_by_topic, rcutils_allocator_t *, const char *, bool, - rmw_topic_info_array_t *)) + rmw_topic_endpoint_info_array_t *)) RMW_INTERFACE_FN(rmw_get_subscriptions_info_by_topic, rmw_ret_t, RMW_RET_ERROR, @@ -551,7 +551,7 @@ RMW_INTERFACE_FN(rmw_get_subscriptions_info_by_topic, rcutils_allocator_t *, const char *, bool, - rmw_topic_info_array_t *)) + rmw_topic_endpoint_info_array_t *)) #define GET_SYMBOL(x) symbol_ ## x = get_symbol(#x);