diff --git a/rclpy/rclpy/qos_event.py b/rclpy/rclpy/qos_event.py index 6cb904682..4c4a66024 100644 --- a/rclpy/rclpy/qos_event.py +++ b/rclpy/rclpy/qos_event.py @@ -26,6 +26,22 @@ from rclpy.waitable import Waitable +class QoSPolicyKind(IntEnum): + """ + Enum for types of QoS policies that a Publisher or Subscription can set. + + This enum matches the one defined in rmw/incompatible_qos_events_statuses.h + """ + + RMW_QOS_POLICY_INVALID = 1 << 0 + RMW_QOS_POLICY_DURABILITY = 1 << 1 + RMW_QOS_POLICY_DEADLINE = 1 << 2 + RMW_QOS_POLICY_LIVELINESS = 1 << 3 + RMW_QOS_POLICY_RELIABILITY = 1 << 4 + RMW_QOS_POLICY_HISTORY = 1 << 5 + RMW_QOS_POLICY_LIFESPAN = 1 << 6 + + class QoSPublisherEventType(IntEnum): """ Enum for types of QoS events that a Publisher can receive. @@ -83,7 +99,7 @@ class QoSSubscriptionEventType(IntEnum): 'QoSRequestedIncompatibleQoSInfo', [ ('total_count', 'int'), ('total_count_change', 'int'), - ('last_policy_id', 'int'), + ('last_policy_kind', 'int'), ]) """ @@ -113,12 +129,7 @@ class QoSSubscriptionEventType(IntEnum): Mirrors rmw_offered_incompatible_qos_status_t from rmw/types.h """ -QoSOfferedIncompatibleQoSInfo = NamedTuple( - 'QoSOfferedIncompatibleQoSInfo', [ - ('total_count', 'int'), - ('total_count_change', 'int'), - ('last_policy_id', 'int'), - ]) +QoSOfferedIncompatibleQoSInfo = QoSRequestedIncompatibleQoSInfo class QoSEventHandler(Waitable):