From b64408f0959911b672582e7c9a8438b108800fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Dom=C3=ADnguez=20L=C3=B3pez?= <116071334+Mario-DL@users.noreply.github.com> Date: Wed, 4 Jun 2025 11:42:35 +0200 Subject: [PATCH 1/2] Retrieve `HistoryQoS` in discovery when available (#829) Signed-off-by: Mario Dominguez (cherry picked from commit e78f3f43ed8d61fe2f101174b5d0852cc28e8bcc) # Conflicts: # rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp --- .../include/rmw_fastrtps_shared_cpp/qos.hpp | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp b/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp index 694745b35a..a543c5f754 100644 --- a/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp +++ b/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp @@ -176,7 +176,28 @@ rtps_qos_to_rmw_qos( qos->liveliness = RMW_QOS_POLICY_LIVELINESS_UNKNOWN; break; } +<<<<<<< HEAD qos->liveliness_lease_duration = dds_duration_to_rmw(rtps_qos.m_liveliness.lease_duration); +======= + qos->liveliness_lease_duration = dds_duration_to_rmw(rtps_qos.liveliness.lease_duration); + + if (rtps_qos.history.has_value()) { + switch (rtps_qos.history->kind) { + case eprosima::fastdds::dds::KEEP_LAST_HISTORY_QOS: + qos->history = RMW_QOS_POLICY_HISTORY_KEEP_LAST; + break; + case eprosima::fastdds::dds::KEEP_ALL_HISTORY_QOS: + qos->history = RMW_QOS_POLICY_HISTORY_KEEP_ALL; + break; + default: + qos->history = RMW_QOS_POLICY_HISTORY_UNKNOWN; + break; + } + qos->depth = static_cast(rtps_qos.history->depth); + } else { + qos->history = RMW_QOS_POLICY_HISTORY_UNKNOWN; + } +>>>>>>> e78f3f4 (Retrieve `HistoryQoS` in discovery when available (#829)) } extern template RMW_FASTRTPS_SHARED_CPP_PUBLIC From 918fa6f4df1ca9d34b888a9967d32b61c402afbf Mon Sep 17 00:00:00 2001 From: Emerson Knapp <537409+emersonknapp@users.noreply.github.com> Date: Wed, 15 Oct 2025 01:56:28 -0700 Subject: [PATCH 2/2] Resolve merge conflicts Signed-off-by: Emerson Knapp <537409+emersonknapp@users.noreply.github.com> --- .../include/rmw_fastrtps_shared_cpp/qos.hpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp b/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp index a543c5f754..f789f872a2 100644 --- a/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp +++ b/rmw_fastrtps_shared_cpp/include/rmw_fastrtps_shared_cpp/qos.hpp @@ -176,10 +176,7 @@ rtps_qos_to_rmw_qos( qos->liveliness = RMW_QOS_POLICY_LIVELINESS_UNKNOWN; break; } -<<<<<<< HEAD qos->liveliness_lease_duration = dds_duration_to_rmw(rtps_qos.m_liveliness.lease_duration); -======= - qos->liveliness_lease_duration = dds_duration_to_rmw(rtps_qos.liveliness.lease_duration); if (rtps_qos.history.has_value()) { switch (rtps_qos.history->kind) { @@ -197,7 +194,6 @@ rtps_qos_to_rmw_qos( } else { qos->history = RMW_QOS_POLICY_HISTORY_UNKNOWN; } ->>>>>>> e78f3f4 (Retrieve `HistoryQoS` in discovery when available (#829)) } extern template RMW_FASTRTPS_SHARED_CPP_PUBLIC