From 457203cc89429fd3c0d81e4bb63e2519163423dc Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Thu, 7 May 2020 11:05:03 -0300 Subject: [PATCH 1/2] Remove MANUAL_BY_NODE liveliness API Signed-off-by: Ivan Santiago Paunovic --- rmw_fastrtps_cpp/src/rmw_node.cpp | 7 ------- rmw_fastrtps_dynamic_cpp/src/rmw_node.cpp | 7 ------- .../include/rmw_fastrtps_shared_cpp/qos.hpp | 3 --- .../include/rmw_fastrtps_shared_cpp/rmw_common.hpp | 6 ------ rmw_fastrtps_shared_cpp/src/listener_thread.cpp | 7 +++++++ rmw_fastrtps_shared_cpp/src/qos.cpp | 3 --- rmw_fastrtps_shared_cpp/src/rmw_node.cpp | 11 ----------- .../test/test_dds_attributes_to_rmw_qos.cpp | 2 +- 8 files changed, 8 insertions(+), 38 deletions(-) diff --git a/rmw_fastrtps_cpp/src/rmw_node.cpp b/rmw_fastrtps_cpp/src/rmw_node.cpp index 6b38efe66..3aae8dac9 100644 --- a/rmw_fastrtps_cpp/src/rmw_node.cpp +++ b/rmw_fastrtps_cpp/src/rmw_node.cpp @@ -81,13 +81,6 @@ rmw_destroy_node(rmw_node_t * node) return rmw_fastrtps_shared_cpp::decrement_context_impl_ref_count(context); } -rmw_ret_t -rmw_node_assert_liveliness(const rmw_node_t * node) -{ - return rmw_fastrtps_shared_cpp::__rmw_node_assert_liveliness( - eprosima_fastrtps_identifier, node); -} - const rmw_guard_condition_t * rmw_node_get_graph_guard_condition(const rmw_node_t * node) { diff --git a/rmw_fastrtps_dynamic_cpp/src/rmw_node.cpp b/rmw_fastrtps_dynamic_cpp/src/rmw_node.cpp index 110a32c0b..6c8e90890 100644 --- a/rmw_fastrtps_dynamic_cpp/src/rmw_node.cpp +++ b/rmw_fastrtps_dynamic_cpp/src/rmw_node.cpp @@ -81,13 +81,6 @@ rmw_destroy_node(rmw_node_t * node) return rmw_fastrtps_shared_cpp::decrement_context_impl_ref_count(context); } -rmw_ret_t -rmw_node_assert_liveliness(const rmw_node_t * node) -{ - return rmw_fastrtps_shared_cpp::__rmw_node_assert_liveliness( - eprosima_fastrtps_identifier, node); -} - const rmw_guard_condition_t * rmw_node_get_graph_guard_condition(const rmw_node_t * node) { diff --git a/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp b/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp index 1857abba7..e6545cbbe 100644 --- a/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp +++ b/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp @@ -99,9 +99,6 @@ dds_qos_to_rmw_qos( case eprosima::fastrtps::AUTOMATIC_LIVELINESS_QOS: qos->liveliness = RMW_QOS_POLICY_LIVELINESS_AUTOMATIC; break; - case eprosima::fastrtps::MANUAL_BY_PARTICIPANT_LIVELINESS_QOS: - qos->liveliness = RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE; - break; case eprosima::fastrtps::MANUAL_BY_TOPIC_LIVELINESS_QOS: qos->liveliness = RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC; break; diff --git a/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/rmw_common.hpp b/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/rmw_common.hpp index f3a366ef7..bade097f1 100644 --- a/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/rmw_common.hpp +++ b/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/rmw_common.hpp @@ -97,12 +97,6 @@ __rmw_destroy_node( const char * identifier, rmw_node_t * node); -RMW_FASTRTPS_SHARED_CPP_PUBLIC -rmw_ret_t -__rmw_node_assert_liveliness( - const char * identifier, - const rmw_node_t * node); - RMW_FASTRTPS_SHARED_CPP_PUBLIC const rmw_guard_condition_t * __rmw_node_get_graph_guard_condition(const rmw_node_t * node); diff --git a/rmw_fastrtps_shared_cpp/src/listener_thread.cpp b/rmw_fastrtps_shared_cpp/src/listener_thread.cpp index 8df2bb70b..3a2e9a67c 100644 --- a/rmw_fastrtps_shared_cpp/src/listener_thread.cpp +++ b/rmw_fastrtps_shared_cpp/src/listener_thread.cpp @@ -165,6 +165,13 @@ node_listener(rmw_context_t * context) // ignore local messages continue; } + fprintf(stderr, "***********************************************************\n"); + fprintf(stderr, "***********************************************************\n"); + fprintf(stderr, "***********************************************************\n"); + fprintf(stderr, "received graph message\n"); + fprintf(stderr, "***********************************************************\n"); + fprintf(stderr, "***********************************************************\n"); + fprintf(stderr, "***********************************************************\n"); common_context->graph_cache.update_participant_entities(msg); } } diff --git a/rmw_fastrtps_shared_cpp/src/qos.cpp b/rmw_fastrtps_shared_cpp/src/qos.cpp index e6ca5a20c..96fc80d71 100644 --- a/rmw_fastrtps_shared_cpp/src/qos.cpp +++ b/rmw_fastrtps_shared_cpp/src/qos.cpp @@ -115,9 +115,6 @@ bool fill_entity_qos_from_profile( case RMW_QOS_POLICY_LIVELINESS_AUTOMATIC: entity_qos.m_liveliness.kind = eprosima::fastrtps::AUTOMATIC_LIVELINESS_QOS; break; - case RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE: - entity_qos.m_liveliness.kind = eprosima::fastrtps::MANUAL_BY_PARTICIPANT_LIVELINESS_QOS; - break; case RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC: entity_qos.m_liveliness.kind = eprosima::fastrtps::MANUAL_BY_TOPIC_LIVELINESS_QOS; break; diff --git a/rmw_fastrtps_shared_cpp/src/rmw_node.cpp b/rmw_fastrtps_shared_cpp/src/rmw_node.cpp index d59789289..14c935102 100644 --- a/rmw_fastrtps_shared_cpp/src/rmw_node.cpp +++ b/rmw_fastrtps_shared_cpp/src/rmw_node.cpp @@ -152,17 +152,6 @@ __rmw_destroy_node( return RMW_RET_OK; } -rmw_ret_t -__rmw_node_assert_liveliness( - const char * identifier, - const rmw_node_t * node) -{ - (void)identifier; - (void)node; - - return RMW_RET_UNSUPPORTED; -} - const rmw_guard_condition_t * __rmw_node_get_graph_guard_condition(const rmw_node_t * node) { diff --git a/rmw_fastrtps_shared_cpp/test/test_dds_attributes_to_rmw_qos.cpp b/rmw_fastrtps_shared_cpp/test/test_dds_attributes_to_rmw_qos.cpp index 1633ec49e..bb134a641 100644 --- a/rmw_fastrtps_shared_cpp/test/test_dds_attributes_to_rmw_qos.cpp +++ b/rmw_fastrtps_shared_cpp/test/test_dds_attributes_to_rmw_qos.cpp @@ -113,7 +113,7 @@ TEST_F(DDSAttributesToRMWQosTest, test_subscriber_liveliness_conversion) { subscriber_attributes_.qos.m_liveliness.kind = eprosima::fastrtps::MANUAL_BY_PARTICIPANT_LIVELINESS_QOS; dds_attributes_to_rmw_qos(subscriber_attributes_, &qos_profile_); - EXPECT_EQ(qos_profile_.liveliness, RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE); + EXPECT_EQ(qos_profile_.liveliness, RMW_QOS_POLICY_LIVELINESS_UNKNOWN); } TEST_F(DDSAttributesToRMWQosTest, test_subscriber_liveliness_lease_duration_conversion) { From 1ad4a8dc632ee627eb5142d7cd72e310ecdaee71 Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Thu, 7 May 2020 13:09:08 -0300 Subject: [PATCH 2/2] Undo unrelated changes Signed-off-by: Ivan Santiago Paunovic --- rmw_fastrtps_shared_cpp/src/listener_thread.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/rmw_fastrtps_shared_cpp/src/listener_thread.cpp b/rmw_fastrtps_shared_cpp/src/listener_thread.cpp index 3a2e9a67c..8df2bb70b 100644 --- a/rmw_fastrtps_shared_cpp/src/listener_thread.cpp +++ b/rmw_fastrtps_shared_cpp/src/listener_thread.cpp @@ -165,13 +165,6 @@ node_listener(rmw_context_t * context) // ignore local messages continue; } - fprintf(stderr, "***********************************************************\n"); - fprintf(stderr, "***********************************************************\n"); - fprintf(stderr, "***********************************************************\n"); - fprintf(stderr, "received graph message\n"); - fprintf(stderr, "***********************************************************\n"); - fprintf(stderr, "***********************************************************\n"); - fprintf(stderr, "***********************************************************\n"); common_context->graph_cache.update_participant_entities(msg); } }