Skip to content

Commit

Permalink
Remove is_keyed_ method after Publication/SubscriptionBuiltinTopicDat…
Browse files Browse the repository at this point in the history
…a update in Fast DDS

Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com>
  • Loading branch information
LuciaEchevarria99 committed Aug 16, 2024
1 parent d1de313 commit 9df8c98
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
12 changes: 1 addition & 11 deletions ddspipe_participants/src/cpp/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<class DiscoveryBuiltinTopicData>
core::types::Endpoint create_common_endpoint_from_info_(
const DiscoveryBuiltinTopicData& info,
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 9df8c98

Please sign in to comment.