Skip to content

Commit

Permalink
Add StatusMask to DDS CommonParticipant
Browse files Browse the repository at this point in the history
Signed-off-by: Irene Bandera <irenebandera@eprosima.com>
  • Loading branch information
irenebm committed Aug 30, 2024
1 parent 01e3607 commit dce676b
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions ddspipe_participants/src/cpp/participant/dds/CommonParticipant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void CommonParticipant::init()
eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->set_qos(
original_fact_qos);

if (dds_participant_ == nullptr)
if (!dds_participant_)
{
throw utils::InitializationException(STR_ENTRY << "Error creating DDS Participant " << id() << ".");
}
Expand All @@ -96,6 +96,11 @@ void CommonParticipant::init()
{
throw utils::InitializationException(STR_ENTRY << "Error enabling DDS Participant " << id() << ".");
}

EPROSIMA_LOG_INFO(DDSPIPE_RTPS_PARTICIPANT,
"New Participant created with id " << this->id() <<
" in domain " << domain_id_ << " with guid " << dds_participant_->guid() <<
(this->is_repeater() ? " (repeater)" : " (non repeater)"));
}

template<>
Expand Down Expand Up @@ -495,15 +500,17 @@ CommonParticipant::reckon_participant_qos_(
fastdds::dds::DomainParticipant* CommonParticipant::create_dds_participant_()
{
// Set listener mask so reader read its own messages TODO Irene: check if this is needed
// fastdds::dds::StatusMask mask;
// mask << fastdds::dds::StatusMask::publication_matched();
// mask << fastdds::dds::StatusMask::subscription_matched();
return eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->create_participant(domain_id_, participant_qos_, this);
// return eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->create_participant(
// configuration_->domain,
// reckon_participant_qos_(),
// this,
// mask);
fastdds::dds::StatusMask mask;
mask << fastdds::dds::StatusMask::publication_matched();
mask << fastdds::dds::StatusMask::subscription_matched();
EPROSIMA_LOG_INFO(DDSPIPE_RTPS_PARTICIPANT,
"Creating Participant in domain " << domain_id_);

return eprosima::fastdds::dds::DomainParticipantFactory::get_instance()->create_participant(
domain_id_,
participant_qos_,
this,
mask);
}

fastdds::dds::Topic* CommonParticipant::topic_related_(
Expand Down

0 comments on commit dce676b

Please sign in to comment.