From 87a724d32c39b7255f71f23b56fb1332a9b7fbc1 Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Tue, 12 May 2020 14:52:19 -0300 Subject: [PATCH] Remove MANUAL_BY_NODE liveliness API (#645) Signed-off-by: Ivan Santiago Paunovic --- rcl/include/rcl/node.h | 25 ------------------------- rcl/src/rcl/node.c | 13 ------------- rcl/test/rcl/test_events.cpp | 2 +- 3 files changed, 1 insertion(+), 39 deletions(-) diff --git a/rcl/include/rcl/node.h b/rcl/include/rcl/node.h index e9259d6..2c31094 100644 --- a/rcl/include/rcl/node.h +++ b/rcl/include/rcl/node.h @@ -369,31 +369,6 @@ RCL_WARN_UNUSED rcl_ret_t rcl_node_get_domain_id(const rcl_node_t * node, size_t * domain_id); -/// Manually assert that this node is alive (for RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE) -/** - * If the rmw Liveliness policy is set to RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE, the creator of - * this node may manually call `assert_liveliness` at some point in time to signal to the rest - * of the system that this Node is still alive. - * This function must be called at least as often as the qos_profile's liveliness_lease_duration - * - *
- * Attribute | Adherence - * ------------------ | ------------- - * Allocates Memory | No - * Thread-Safe | Yes - * Uses Atomics | No - * Lock-Free | Yes - * - * \param[in] node handle to the node that needs liveliness to be asserted - * \return `RCL_RET_OK` if the liveliness assertion was completed successfully, or - * \return `RCL_RET_NODE_INVALID` if the node is invalid, or - * \return `RCL_RET_ERROR` if an unspecified error occurs. - */ -RCL_PUBLIC -RCL_WARN_UNUSED -rcl_ret_t -rcl_node_assert_liveliness(const rcl_node_t * node); - /// Return the rmw node handle. /** * The handle returned is a pointer to the internally held rmw handle. diff --git a/rcl/src/rcl/node.c b/rcl/src/rcl/node.c index 5fa895c..4ae93ec 100644 --- a/rcl/src/rcl/node.c +++ b/rcl/src/rcl/node.c @@ -492,19 +492,6 @@ rcl_node_get_domain_id(const rcl_node_t * node, size_t * domain_id) return RCL_RET_OK; } -rcl_ret_t -rcl_node_assert_liveliness(const rcl_node_t * node) -{ - if (!rcl_node_is_valid(node)) { - return RCL_RET_NODE_INVALID; // error already set - } - if (rmw_node_assert_liveliness(node->impl->rmw_node_handle) != RMW_RET_OK) { - RCL_SET_ERROR_MSG(rmw_get_error_string().str); - return RCL_RET_ERROR; - } - return RCL_RET_OK; -} - rmw_node_t * rcl_node_get_rmw_handle(const rcl_node_t * node) { diff --git a/rcl/test/rcl/test_events.cpp b/rcl/test/rcl/test_events.cpp index 98d3779..c5184ac 100644 --- a/rcl/test/rcl/test_events.cpp +++ b/rcl/test/rcl/test_events.cpp @@ -726,7 +726,7 @@ get_test_pubsub_incompatible_qos_inputs() inputs[2].testcase_name = "IncompatibleQoS_LivelinessPolicy"; inputs[2].qos_policy_kind = RMW_QOS_POLICY_LIVELINESS; inputs[2].publisher_qos_profile = TestEventFixture::default_qos_profile; - inputs[2].publisher_qos_profile.liveliness = RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE; + inputs[2].publisher_qos_profile.liveliness = RMW_QOS_POLICY_LIVELINESS_AUTOMATIC; inputs[2].subscription_qos_profile = TestEventFixture::default_qos_profile; inputs[2].subscription_qos_profile.liveliness = RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC; inputs[2].error_msg = "Incompatible qos liveliness policy";