Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions 6 micro_ros_agent/include/agent/graph_manager/graph_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ class GraphManager
const eprosima::fastdds::dds::DomainParticipant* participant,
bool from_microros = true);

/**
* @brief Getter for the graph cache.
* @return Reference to inner graph cache
*/
rmw_dds_common::GraphCache& get_graph_cache() { return graphCache_; }

/**
* @brief Adds a DDS datawriter to the graph tree.
* @param datawriter_guid rtps::GUID_t of the datawriter to be added.
Expand Down
8 changes: 5 additions & 3 deletions 8 micro_ros_agent/src/agent/graph_manager/graph_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ GraphManager::ParticipantListener::ParticipantListener(
}

void GraphManager::ParticipantListener::on_participant_discovery(
eprosima::fastdds::dds::DomainParticipant* participant,
eprosima::fastdds::dds::DomainParticipant* /* participant */,
eprosima::fastrtps::rtps::ParticipantDiscoveryInfo&& info)
{
switch (info.status)
Expand All @@ -614,13 +614,15 @@ void GraphManager::ParticipantListener::on_participant_discovery(
const std::string enclave =
std::string(name_found->second.begin(), name_found->second.end());

graphManager_from_->add_participant(participant, false, enclave);
const rmw_gid_t gid = rmw_fastrtps_shared_cpp::create_rmw_gid("rmw_fastrtps_cpp", info.info.m_guid);
graphManager_from_->get_graph_cache().add_participant(gid, enclave);
break;
}
case eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::REMOVED_PARTICIPANT:
case eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::DROPPED_PARTICIPANT:
{
graphManager_from_->remove_participant(participant, false);
const rmw_gid_t gid = rmw_fastrtps_shared_cpp::create_rmw_gid("rmw_fastrtps_cpp", info.info.m_guid);
graphManager_from_->get_graph_cache().remove_participant(gid);
break;
}
default:
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.