Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MANUAL_BY_NODE liveliness API #1107

Merged
merged 1 commit into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions rclcpp/include/rclcpp/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1124,19 +1124,6 @@ class Node : public std::enable_shared_from_this<Node>
const rclcpp::NodeOptions &
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:
/// Construct a sub-node, which will extend the namespace of all entities created with it.
/**
Expand Down
5 changes: 0 additions & 5 deletions rclcpp/include/rclcpp/node_interfaces/node_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ class NodeBase : public NodeBaseInterface

RCLCPP_PUBLIC

bool
assert_liveliness() const override;

RCLCPP_PUBLIC

rclcpp::CallbackGroup::SharedPtr
create_callback_group(rclcpp::CallbackGroupType group_type) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ class NodeBaseInterface
std::shared_ptr<const rcl_node_t>
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.
RCLCPP_PUBLIC
virtual
Expand Down
6 changes: 0 additions & 6 deletions rclcpp/src/rclcpp/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,3 @@ Node::get_node_options() const
{
return this->node_options_;
}

bool
Node::assert_liveliness() const
{
return node_base_->assert_liveliness();
}
6 changes: 0 additions & 6 deletions rclcpp/src/rclcpp/node_interfaces/node_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,6 @@ NodeBase::get_shared_rcl_node_handle() const
return node_handle_;
}

bool
NodeBase::assert_liveliness() const
{
return RCL_RET_OK == rcl_node_assert_liveliness(get_rcl_node_handle());
}

rclcpp::CallbackGroup::SharedPtr
NodeBase::create_callback_group(rclcpp::CallbackGroupType group_type)
{
Expand Down
2 changes: 1 addition & 1 deletion rclcpp/test/test_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2591,7 +2591,7 @@ TEST_F(TestNode, get_publishers_subscriptions_info_by_topic) {
RMW_QOS_POLICY_DURABILITY_VOLATILE,
{15, 1678},
{29, 2345},
RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE,
RMW_QOS_POLICY_LIVELINESS_AUTOMATIC,
{5, 23456},
false
};
Expand Down
2 changes: 1 addition & 1 deletion rclcpp/test/test_qos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ TEST(TestQoS, equality_liveliness) {
EXPECT_NE(a, b);
b.liveliness_lease_duration(duration);
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);
}

Expand Down