File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
include/agent/graph_manager Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,12 @@ class GraphManager
111111 const eprosima::fastdds::dds::DomainParticipant* participant,
112112 bool from_microros = true );
113113
114+ /* *
115+ * @brief Getter for the graph cache.
116+ * @return Reference to inner graph cache
117+ */
118+ rmw_dds_common::GraphCache& get_graph_cache () { return graphCache_; }
119+
114120 /* *
115121 * @brief Adds a DDS datawriter to the graph tree.
116122 * @param datawriter_guid rtps::GUID_t of the datawriter to be added.
Original file line number Diff line number Diff line change @@ -597,7 +597,7 @@ GraphManager::ParticipantListener::ParticipantListener(
597597}
598598
599599void GraphManager::ParticipantListener::on_participant_discovery (
600- eprosima::fastdds::dds::DomainParticipant* participant,
600+ eprosima::fastdds::dds::DomainParticipant* /* participant */ ,
601601 eprosima::fastrtps::rtps::ParticipantDiscoveryInfo&& info)
602602{
603603 switch (info.status )
@@ -614,13 +614,15 @@ void GraphManager::ParticipantListener::on_participant_discovery(
614614 const std::string enclave =
615615 std::string (name_found->second .begin (), name_found->second .end ());
616616
617- graphManager_from_->add_participant (participant, false , enclave);
617+ const rmw_gid_t gid = rmw_fastrtps_shared_cpp::create_rmw_gid (" rmw_fastrtps_cpp" , info.info .m_guid );
618+ graphManager_from_->get_graph_cache ().add_participant (gid, enclave);
618619 break ;
619620 }
620621 case eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::REMOVED_PARTICIPANT:
621622 case eprosima::fastrtps::rtps::ParticipantDiscoveryInfo::DROPPED_PARTICIPANT:
622623 {
623- graphManager_from_->remove_participant (participant, false );
624+ const rmw_gid_t gid = rmw_fastrtps_shared_cpp::create_rmw_gid (" rmw_fastrtps_cpp" , info.info .m_guid );
625+ graphManager_from_->get_graph_cache ().remove_participant (gid);
624626 break ;
625627 }
626628 default :
You can’t perform that action at this time.
0 commit comments