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 #227

Merged
merged 9 commits into from
May 12, 2020
24 changes: 0 additions & 24 deletions rmw/include/rmw/rmw.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,30 +198,6 @@ RMW_WARN_UNUSED
rmw_ret_t
rmw_destroy_node(rmw_node_t * node);

/// 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.
*
* <hr>
* 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 `RMW_RET_OK` if the liveliness assertion was completed successfully, or
* \return `RMW_RET_ERROR` if an unspecified error occurs, or
* \return `RMW_RET_UNSUPPORTED` if the rmw implementation does not support asserting liveliness.
*/
RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_node_assert_liveliness(const rmw_node_t * node);

/// Return a guard condition which is triggered when the ROS graph changes.
/**
* The handle returned is a pointer to an internally held rmw guard condition.
Expand Down
3 changes: 0 additions & 3 deletions rmw/include/rmw/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,6 @@ enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_t
/// The signal that establishes a Topic is alive comes from the ROS rmw layer.
RMW_QOS_POLICY_LIVELINESS_AUTOMATIC,

/// The signal that establishes a Topic is alive is manually reported by the node
RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE,

/// The signal that establishes a Topic is alive is at the Topic level. Only publishing a message
/// on the Topic or an explicit signal from the application to assert liveliness on the Topic
/// will mark the Topic as being alive.
Expand Down
6 changes: 3 additions & 3 deletions rmw/test/test_topic_endpoint_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ TEST(test_topic_endpoint_info, set_qos_profile) {
qos_profile.durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
qos_profile.deadline = {1, 0};
qos_profile.lifespan = {2, 0};
qos_profile.liveliness = RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE;
qos_profile.liveliness = RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC;
qos_profile.liveliness_lease_duration = {3, 0};
qos_profile.avoid_ros_namespace_conventions = false;

Expand Down Expand Up @@ -179,7 +179,7 @@ TEST(test_topic_endpoint_info, set_qos_profile) {
EXPECT_EQ(topic_endpoint_info.qos_profile.lifespan.nsec, 0u) << "Unequal lifespan nsec";
EXPECT_EQ(
topic_endpoint_info.qos_profile.liveliness,
RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE) << "Unequal liveliness";
RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC) << "Unequal liveliness";
EXPECT_EQ(
topic_endpoint_info.qos_profile.liveliness_lease_duration.sec,
3u) << "Unequal liveliness lease duration sec";
Expand Down Expand Up @@ -231,7 +231,7 @@ TEST(test_topic_endpoint_info, fini) {
qos_profile.durability = RMW_QOS_POLICY_DURABILITY_VOLATILE;
qos_profile.deadline = {1, 0};
qos_profile.lifespan = {2, 0};
qos_profile.liveliness = RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE;
qos_profile.liveliness = RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC;
qos_profile.liveliness_lease_duration = {3, 0};
qos_profile.avoid_ros_namespace_conventions = false;
rmw_ret_t ret = rmw_topic_endpoint_info_set_qos_profile(&topic_endpoint_info, &qos_profile);
Expand Down