1515#ifndef _UROS_AGENT_GRAPH_MANAGER_HPP
1616#define _UROS_AGENT_GRAPH_MANAGER_HPP
1717
18- #include " fastrtps/Domain.h"
19- #include < fastrtps/TopicDataType.h>
20- #include " fastrtps/attributes/ParticipantAttributes.h"
21- #include " fastrtps/participant/Participant.h"
22- #include " fastrtps/participant/ParticipantListener.h"
23- #include " fastrtps/attributes/PublisherAttributes.h"
24- #include " fastrtps/publisher/Publisher.h"
25- #include < fastrtps/publisher/PublisherListener.h>
26- #include < fastrtps/rtps/common/MatchingInfo.h>
27-
18+ #include " fastdds/dds/topic/TopicDataType.hpp"
19+ #include " fastdds/rtps/attributes/RTPSParticipantAttributes.hpp"
20+ #include " fastdds/rtps/participant/RTPSParticipant.hpp"
21+ #include " fastdds/rtps/participant/RTPSParticipantListener.hpp"
22+ #include " fastdds/rtps/RTPSDomain.hpp"
2823#include < fastdds/dds/domain/DomainParticipant.hpp>
2924#include < fastdds/dds/domain/DomainParticipantFactory.hpp>
3025#include < fastdds/dds/domain/DomainParticipantListener.hpp>
3126#include < fastdds/dds/domain/qos/DomainParticipantQos.hpp>
3227#include < fastdds/dds/publisher/DataWriter.hpp>
33- #include < fastdds/dds/publisher/qos/DataWriterQos.hpp>
3428#include < fastdds/dds/publisher/Publisher.hpp>
29+ #include < fastdds/dds/publisher/PublisherListener.hpp>
30+ #include < fastdds/dds/publisher/qos/DataWriterQos.hpp>
3531#include < fastdds/dds/subscriber/DataReader.hpp>
32+ #include < fastdds/dds/subscriber/DataReaderListener.hpp>
3633#include < fastdds/dds/subscriber/qos/DataReaderQos.hpp>
3734#include < fastdds/dds/subscriber/SampleInfo.hpp>
3835#include < fastdds/dds/subscriber/Subscriber.hpp>
39- #include < fastdds/dds/subscriber/DataReaderListener .hpp>
36+ #include < fastdds/rtps/common/MatchingInfo .hpp>
4037
4138#include " rmw/types.h"
4239#include " rmw/names_and_types.h"
@@ -125,7 +122,7 @@ class GraphManager
125122 * @param datawriter Pointer to the datawriter to be added.
126123 */
127124 void add_datawriter (
128- const eprosima::fastrtps ::rtps::GUID_t& datawriter_guid,
125+ const eprosima::fastdds ::rtps::GUID_t& datawriter_guid,
129126 const eprosima::fastdds::dds::DomainParticipant* participant,
130127 const eprosima::fastdds::dds::DataWriter* datawriter);
131128
@@ -138,18 +135,18 @@ class GraphManager
138135 * @param writer_qos QOS of the datawriter to be included into the graph tree.
139136 */
140137 void add_datawriter (
141- const eprosima::fastrtps ::rtps::GUID_t& datawriter_guid,
138+ const eprosima::fastdds ::rtps::GUID_t& datawriter_guid,
142139 const std::string& topic_name,
143140 const std::string& type_name,
144- const eprosima::fastrtps ::rtps::GUID_t& participant_guid,
141+ const eprosima::fastdds ::rtps::GUID_t& participant_guid,
145142 const eprosima::fastdds::dds::DataWriterQos& writer_qos);
146143
147144 /* *
148145 * @brief Removes a DDS datawriter from the graph tree.
149146 * @param datawriter_guid rtps::GUID_t of the datawriter to be removed.
150147 */
151148 void remove_datawriter (
152- const eprosima::fastrtps ::rtps::GUID_t& datawriter_guid);
149+ const eprosima::fastdds ::rtps::GUID_t& datawriter_guid);
153150
154151 /* *
155152 * @brief Adds a DDS datareader to the graph tree.
@@ -158,7 +155,7 @@ class GraphManager
158155 * @param datareader Pointer to the datareader to be added.
159156 */
160157 void add_datareader (
161- const eprosima::fastrtps ::rtps::GUID_t& datareader_guid,
158+ const eprosima::fastdds ::rtps::GUID_t& datareader_guid,
162159 const eprosima::fastdds::dds::DomainParticipant* participant,
163160 const eprosima::fastdds::dds::DataReader* datareader);
164161
@@ -168,21 +165,21 @@ class GraphManager
168165 * @param topic_name Name of the topic to which the datareader sends information to.
169166 * @param type_name Type name of the sent topic.
170167 * @param participant_guid rtps::GUID_t of the participant which owns this datareader.
171- * @param writer_qos QOS of the datareader to be included into the graph tree.
168+ * @param reader_qos QOS of the datareader to be included into the graph tree.
172169 */
173170 void add_datareader (
174- const eprosima::fastrtps ::rtps::GUID_t& datareader_guid,
171+ const eprosima::fastdds ::rtps::GUID_t& datareader_guid,
175172 const std::string& topic_name,
176173 const std::string& type_name,
177- const eprosima::fastrtps ::rtps::GUID_t& participant_guid,
174+ const eprosima::fastdds ::rtps::GUID_t& participant_guid,
178175 const eprosima::fastdds::dds::DataReaderQos& reader_qos);
179176
180177 /* *
181178 * @brief Removes a DDS datareader from the graph tree.
182179 * @param datareader_guid rtps::GUID_t of the datareader to be removed.
183180 */
184181 void remove_datareader (
185- const eprosima::fastrtps ::rtps::GUID_t& datareader_guid);
182+ const eprosima::fastdds ::rtps::GUID_t& datareader_guid);
186183
187184 /* *
188185 * @brief Associates a certain DDS entity with a provided participant.
@@ -191,7 +188,7 @@ class GraphManager
191188 * @param entity_kind Kind of the DDS entity.
192189 */
193190 void associate_entity (
194- const eprosima::fastrtps ::rtps::GUID_t& entity_guid,
191+ const eprosima::fastdds ::rtps::GUID_t& entity_guid,
195192 const eprosima::fastdds::dds::DomainParticipant* participant,
196193 const dds::xrce::ObjectKind& entity_kind);
197194
@@ -212,21 +209,28 @@ class GraphManager
212209 GraphManager* graph_manager);
213210 private:
214211
215- template <typename Info>
212+ template <typename DiscoveryStatus, typename Info>
216213 void process_discovery_info (
214+ DiscoveryStatus reason,
217215 const Info& proxyData);
218216
219217 void on_participant_discovery (
220218 eprosima::fastdds::dds::DomainParticipant* participant,
221- eprosima::fastrtps::rtps::ParticipantDiscoveryInfo&& info) override ;
219+ eprosima::fastdds::rtps::ParticipantDiscoveryStatus reason,
220+ const eprosima::fastdds::dds::ParticipantBuiltinTopicData& info,
221+ bool & should_be_ignored) override ;
222222
223- void on_subscriber_discovery (
224- eprosima::fastdds::dds::DomainParticipant* /* participant*/ ,
225- eprosima::fastrtps::rtps::ReaderDiscoveryInfo&& info) override ;
223+ void on_data_reader_discovery (
224+ eprosima::fastdds::dds::DomainParticipant* participant,
225+ eprosima::fastdds::rtps::ReaderDiscoveryStatus reason,
226+ const eprosima::fastdds::dds::SubscriptionBuiltinTopicData& info,
227+ bool & should_be_ignored) override ;
226228
227- void on_publisher_discovery (
228- eprosima::fastdds::dds::DomainParticipant* /* participant*/ ,
229- eprosima::fastrtps::rtps::WriterDiscoveryInfo&& info) override ;
229+ void on_data_writer_discovery (
230+ eprosima::fastdds::dds::DomainParticipant* participant,
231+ eprosima::fastdds::rtps::WriterDiscoveryStatus reason,
232+ const eprosima::fastdds::dds::PublicationBuiltinTopicData& info,
233+ bool & should_be_ignored) override ;
230234
231235 GraphManager* graphManager_from_;
232236 };
0 commit comments