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());