From 39a93dc6e1874447e8afc2264a75bcda3f990f8e 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 ad5799452f..de91b41606 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 @@ -172,7 +172,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 fbc498d4c77faf2ffab4c65c21235bb257f449c2 Mon Sep 17 00:00:00 2001 From: Alejandro Hernandez Cordero Date: Wed, 19 Nov 2025 22:41:20 +0100 Subject: [PATCH 2/2] Fixed merge Signed-off-by: Alejandro Hernandez Cordero --- .../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 de91b41606..7e5b380c71 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 @@ -172,10 +172,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) { @@ -193,7 +190,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