Remove MANUAL_BY_NODE liveliness API (#1107)

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
This commit is contained in:
Ivan Santiago Paunovic 2020-05-12 14:52:26 -03:00 committed by GitHub
parent cac761373f
commit 803d7f27be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 38 deletions

View file

@ -1124,19 +1124,6 @@ public:
const rclcpp::NodeOptions & const rclcpp::NodeOptions &
get_node_options() const; get_node_options() const;
/// 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.
*
* \return `true` if the liveliness was asserted successfully, otherwise `false`
*/
RCLCPP_PUBLIC
RCUTILS_WARN_UNUSED
bool
assert_liveliness() const;
protected: protected:
/// Construct a sub-node, which will extend the namespace of all entities created with it. /// Construct a sub-node, which will extend the namespace of all entities created with it.
/** /**

View file

@ -91,11 +91,6 @@ public:
RCLCPP_PUBLIC RCLCPP_PUBLIC
bool
assert_liveliness() const override;
RCLCPP_PUBLIC
rclcpp::CallbackGroup::SharedPtr rclcpp::CallbackGroup::SharedPtr
create_callback_group(rclcpp::CallbackGroupType group_type) override; create_callback_group(rclcpp::CallbackGroupType group_type) override;

View file

@ -102,12 +102,6 @@ public:
std::shared_ptr<const rcl_node_t> std::shared_ptr<const rcl_node_t>
get_shared_rcl_node_handle() const = 0; get_shared_rcl_node_handle() const = 0;
/// Manually assert that this Node is alive (for RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE).
RCLCPP_PUBLIC
virtual
bool
assert_liveliness() const = 0;
/// Create and return a callback group. /// Create and return a callback group.
RCLCPP_PUBLIC RCLCPP_PUBLIC
virtual virtual

View file

@ -499,9 +499,3 @@ Node::get_node_options() const
{ {
return this->node_options_; return this->node_options_;
} }
bool
Node::assert_liveliness() const
{
return node_base_->assert_liveliness();
}

View file

@ -202,12 +202,6 @@ NodeBase::get_shared_rcl_node_handle() const
return node_handle_; return node_handle_;
} }
bool
NodeBase::assert_liveliness() const
{
return RCL_RET_OK == rcl_node_assert_liveliness(get_rcl_node_handle());
}
rclcpp::CallbackGroup::SharedPtr rclcpp::CallbackGroup::SharedPtr
NodeBase::create_callback_group(rclcpp::CallbackGroupType group_type) NodeBase::create_callback_group(rclcpp::CallbackGroupType group_type)
{ {

View file

@ -2591,7 +2591,7 @@ TEST_F(TestNode, get_publishers_subscriptions_info_by_topic) {
RMW_QOS_POLICY_DURABILITY_VOLATILE, RMW_QOS_POLICY_DURABILITY_VOLATILE,
{15, 1678}, {15, 1678},
{29, 2345}, {29, 2345},
RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE, RMW_QOS_POLICY_LIVELINESS_AUTOMATIC,
{5, 23456}, {5, 23456},
false false
}; };

View file

@ -65,7 +65,7 @@ TEST(TestQoS, equality_liveliness) {
EXPECT_NE(a, b); EXPECT_NE(a, b);
b.liveliness_lease_duration(duration); b.liveliness_lease_duration(duration);
EXPECT_EQ(a, b); EXPECT_EQ(a, b);
a.liveliness(RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE); a.liveliness(RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC);
EXPECT_NE(a, b); EXPECT_NE(a, b);
} }