From 63147766323870f12385222fbd095eaa9955a32f Mon Sep 17 00:00:00 2001 From: Lucia Echevarria Date: Tue, 13 Aug 2024 10:18:23 +0200 Subject: [PATCH] Remove is_keyed_ method after Publication/SubscriptionBuiltinTopicData update in Fast DDS Signed-off-by: Lucia Echevarria --- .../include/ddspipe_participants/utils/utils.hpp | 6 ------ ddspipe_participants/src/cpp/utils/utils.cpp | 12 +----------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/ddspipe_participants/include/ddspipe_participants/utils/utils.hpp b/ddspipe_participants/include/ddspipe_participants/utils/utils.hpp index 1cd8b3b2..01eb53be 100644 --- a/ddspipe_participants/include/ddspipe_participants/utils/utils.hpp +++ b/ddspipe_participants/include/ddspipe_participants/utils/utils.hpp @@ -28,12 +28,6 @@ namespace ddspipe { namespace participants { namespace detail { -/** - * @brief Checks if the writer/reader is keyed based on its \c GUID_t . - */ -bool is_keyed_( - const eprosima::fastdds::rtps::GUID_t& guid); - /** * @brief Common part to create any endpoint from info object */ diff --git a/ddspipe_participants/src/cpp/utils/utils.cpp b/ddspipe_participants/src/cpp/utils/utils.cpp index 7c26d4f2..2ac1f62e 100644 --- a/ddspipe_participants/src/cpp/utils/utils.cpp +++ b/ddspipe_participants/src/cpp/utils/utils.cpp @@ -28,16 +28,6 @@ namespace ddspipe { namespace participants { namespace detail { -bool is_keyed_( - const eprosima::fastdds::rtps::GUID_t& guid) -{ - const eprosima::fastdds::rtps::octet identifier = guid.entityId.value[3]; - - // - For writers: NO_KEY = 0x03, WITH_KEY = 0x02 - // - For readers: NO_KEY = 0x04, WITH_KEY = 0x07 - return (identifier & 0x0F) == 0x02 || (identifier & 0x0F) == 0x07; -} - template core::types::Endpoint create_common_endpoint_from_info_( const DiscoveryBuiltinTopicData& info, @@ -72,7 +62,7 @@ core::types::Endpoint create_common_endpoint_from_info_( // Set Topic with ownership endpoint.topic.topic_qos.ownership_qos.set_value(info.ownership.kind); // Set Topic key - endpoint.topic.topic_qos.keyed.set_value(is_keyed_(info.guid)); + endpoint.topic.topic_qos.keyed.set_value(info.topic_kind == eprosima::fastdds::rtps::TopicKind_t::WITH_KEY); // Set TypeIdentifier endpoint.topic.type_identifiers.type_identifier1(info.type_information.type_information.complete().typeid_with_size().type_id());