@@ -195,14 +195,37 @@ enum RMW_PUBLIC_TYPE rmw_qos_durability_policy_t
195195 RMW_QOS_POLICY_DURABILITY_UNKNOWN
196196};
197197
198+ enum RMW_PUBLIC_TYPE rmw_qos_liveliness_policy_t
199+ {
200+ RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT ,
201+ RMW_QOS_POLICY_LIVELINESS_AUTOMATIC ,
202+ RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_NODE ,
203+ RMW_QOS_POLICY_LIVELINESS_MANUAL_BY_TOPIC
204+ };
205+
206+ #define RMW_QOS_DEADLINE_DEFAULT {0, 0}
207+ #define RMW_QOS_LIFESPAN_DEFAULT {0, 0}
208+ #define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT {0, 0}
209+
198210/// ROS MiddleWare quality of service profile.
199211typedef struct RMW_PUBLIC_TYPE rmw_qos_profile_t
200212{
201213 enum rmw_qos_history_policy_t history ;
202214 /// Size of the message queue.
203215 size_t depth ;
216+ /// Reliabiilty QoS policy setting
204217 enum rmw_qos_reliability_policy_t reliability ;
218+ /// Durability QoS policy setting
205219 enum rmw_qos_durability_policy_t durability ;
220+ /// The period at which messages are expected to be sent/received
221+ struct rmw_time_t deadline ;
222+ /// The age at which messages are considered expired and no longer valid
223+ struct rmw_time_t lifespan ;
224+ /// Liveliness QoS policy setting
225+ enum rmw_qos_liveliness_policy_t liveliness ;
226+ /// The time within which the RMW node or publisher must show that it is alive
227+ struct rmw_time_t liveliness_lease_duration ;
228+
206229 /// If true, any ROS specific namespacing conventions will be circumvented.
207230 /**
208231 * In the case of DDS and topics, for example, this means the typical
@@ -231,8 +254,7 @@ typedef struct RMW_PUBLIC_TYPE rmw_message_info_t
231254
232255enum {RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT = 0 };
233256
234- // Type mapping of rcutils log severity types to
235- // rmw specific types.
257+ /// Type mapping of rcutils log severity types to rmw specific types.
236258typedef enum RMW_PUBLIC_TYPE
237259{
238260 RMW_LOG_SEVERITY_DEBUG = RCUTILS_LOG_SEVERITY_DEBUG ,
@@ -242,6 +264,75 @@ typedef enum RMW_PUBLIC_TYPE
242264 RMW_LOG_SEVERITY_FATAL = RCUTILS_LOG_SEVERITY_FATAL
243265} rmw_log_severity_t ;
244266
267+ /// QoS Liveliness Changed information provided by a subscription.
268+ typedef struct RMW_PUBLIC_TYPE rmw_liveliness_changed_status_t
269+ {
270+ /**
271+ * The total number of currently active Publishers which publish to the topic associated with
272+ * the Subscription.
273+ * This count increases when a newly matched Publisher asserts its liveliness for the first time
274+ * or when a Publisher previously considered to be not alive reasserts its liveliness.
275+ * The count decreases when a Publisher considered alive fails to assert its liveliness and
276+ * becomes not alive, whether because it was deleted normally or for some other reason.
277+ */
278+ int32_t alive_count ;
279+ /**
280+ * The total count of current Publishers which publish to the topic associated with the
281+ * Subscription that are no longer asserting their liveliness.
282+ * This count increases when a Publisher considered alive fails to assert its liveliness and
283+ * becomes not alive for some reason other than the normal deletion of that Publisher.
284+ * It decreases when a previously not alive Publisher either reasserts its liveliness or is
285+ * deleted normally.
286+ */
287+ int32_t not_alive_count ;
288+ /// The change in the alive_count since the status was last read.
289+ int32_t alive_count_change ;
290+ /// The change in the not_alive_count since the status was last read.
291+ int32_t not_alive_count_change ;
292+ } rmw_liveliness_changed_status_t ;
293+
294+ /// QoS Requested Deadline Missed information provided by a subscription.
295+ typedef struct RMW_PUBLIC_TYPE rmw_requested_deadline_missed_status_t
296+ {
297+ /**
298+ * Lifetime cumulative number of missed deadlines detected for any instance read by the
299+ * subscription.
300+ * Missed deadlines accumulate; that is, each deadline period the total_count will be incremented
301+ * by one for each instance for which data was not received.
302+ */
303+ int32_t total_count ;
304+ /// The incremental number of deadlines detected since the status was read.
305+ int32_t total_count_change ;
306+ } rmw_requested_deadline_missed_status_t ;
307+
308+ /// QoS Liveliness Lost information provided by a publisher.
309+ typedef struct RMW_PUBLIC_TYPE rmw_liveliness_lost_status_t
310+ {
311+ /**
312+ * Lifetime cumulative number of times that a previously-alive Publisher became not alive due to
313+ * a failure to actively signal its liveliness within its offered liveliness period.
314+ * This count does not change when an already not alive Publisher simply remains not alive for
315+ * another liveliness period.
316+ */
317+ int32_t total_count ;
318+ /// The change in total_count since the last time the status was last read.
319+ int32_t total_count_change ;
320+ } rmw_liveliness_lost_status_t ;
321+
322+ /// QoS Deadline Missed information provided by a publisher.
323+ typedef struct RMW_PUBLIC_TYPE rmw_offered_deadline_missed_status_t
324+ {
325+ /**
326+ * Lifetime cumulative number of offered deadline periods elapsed during which a Publisher failed
327+ * to provide data.
328+ * Missed deadlines accumulate; that is, each deadline period the total_count will be incremented
329+ * by one.
330+ */
331+ int32_t total_count ;
332+ /// The change in total_count since the last time the status was last read.
333+ int32_t total_count_change ;
334+ } rmw_offered_deadline_missed_status_t ;
335+
245336#ifdef __cplusplus
246337}
247338#endif
0 commit comments