Skip to content

Commit

Permalink
Implement add_qos_properties_ in reckon_participant_qos_
Browse files Browse the repository at this point in the history
Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com>
  • Loading branch information
LuciaEchevarria99 committed Sep 9, 2024
1 parent da1e972 commit c4065f3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ class CommonParticipant : public core::IParticipant, public fastdds::dds::Domain
// INTERNAL VIRTUAL METHODS
/////////////////////////

virtual
fastdds::dds::DomainParticipantQos
add_qos_properties_(
fastdds::dds::DomainParticipantQos& qos) const;

virtual
fastdds::dds::DomainParticipantQos
reckon_participant_qos_() const;
Expand All @@ -154,11 +159,6 @@ class CommonParticipant : public core::IParticipant, public fastdds::dds::Domain
fastdds::dds::DomainParticipant*
create_dds_participant_();

virtual
fastdds::dds::DomainParticipantQos
add_qos_properties_(
fastdds::dds::DomainParticipantQos& qos) const;

/////////////////////////
// INTERNAL METHODS
/////////////////////////
Expand Down
36 changes: 12 additions & 24 deletions ddspipe_participants/src/cpp/participant/dds/CommonParticipant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,10 @@ CommonParticipant::CommonParticipant(
// Do nothing
}

fastdds::dds::DomainParticipantQos CommonParticipant::reckon_participant_qos_() const
fastdds::dds::DomainParticipantQos CommonParticipant::add_qos_properties_(
fastdds::dds::DomainParticipantQos& qos) const
{
auto qos = fastdds::dds::DomainParticipantFactory::get_instance()->get_default_participant_qos();

// Enforce ignore local endpoints on XML participants
qos.properties().properties().emplace_back(
"fastdds.ignore_local_endpoints",
"true");
Expand All @@ -384,6 +384,15 @@ fastdds::dds::DomainParticipantQos CommonParticipant::reckon_participant_qos_()
return qos;
}

fastdds::dds::DomainParticipantQos CommonParticipant::reckon_participant_qos_() const
{
auto qos = fastdds::dds::DomainParticipantFactory::get_instance()->get_default_participant_qos();

add_qos_properties_(qos);

return qos;
}

fastdds::dds::DomainParticipant* CommonParticipant::create_dds_participant_()
{
// Set listener mask so reader read its own messages
Expand All @@ -398,27 +407,6 @@ fastdds::dds::DomainParticipant* CommonParticipant::create_dds_participant_()
mask);
}

fastdds::dds::DomainParticipantQos CommonParticipant::add_qos_properties_(
fastdds::dds::DomainParticipantQos& qos) const
{
// Enforce ignore local endpoints on XML participants
qos.properties().properties().emplace_back(
"fastdds.ignore_local_endpoints",
"true");

// Set app properties
qos.properties().properties().emplace_back(
"fastdds.application.id",
configuration_->app_id,
"true");
qos.properties().properties().emplace_back(
"fastdds.application.metadata",
configuration_->app_metadata,
"true");

return qos;
}

fastdds::dds::Topic* CommonParticipant::topic_related_(
const core::types::DdsTopic& topic)
{
Expand Down

0 comments on commit c4065f3

Please sign in to comment.