4242#include < fastdds/rtps/attributes/ThreadSettings.hpp>
4343#include < fastdds/rtps/common/WriteParams.hpp>
4444#include < fastdds/rtps/history/IPayloadPool.hpp>
45- #include < fastdds/rtps/reader/ReaderDiscoveryInfo .hpp>
45+ #include < fastdds/rtps/reader/ReaderDiscoveryStatus .hpp>
4646#include < fastdds/rtps/transport/ChainingTransport.hpp>
4747#include < fastdds/rtps/transport/ChainingTransportDescriptor.hpp>
4848#include < fastdds/rtps/transport/network/AllowedNetworkInterface.hpp>
@@ -210,11 +210,12 @@ class CustomDomainParticipantListener : public DomainParticipantListener
210210
211211 void on_data_reader_discovery (
212212 DomainParticipant* participant,
213- eprosima::fastdds::rtps::ReaderDiscoveryInfo&& info,
213+ eprosima::fastdds::rtps::ReaderDiscoveryStatus reason,
214+ const eprosima::fastdds::rtps::SubscriptionBuiltinTopicData& info,
214215 bool & should_be_ignored) override
215216 {
216217 should_be_ignored = false ;
217- if (info. status == eprosima::fastdds::rtps::ReaderDiscoveryInfo ::DISCOVERED_READER )
218+ if (reason == eprosima::fastdds::rtps::ReaderDiscoveryStatus ::DISCOVERED_READER )
218219 {
219220 std::cout << " New datareader discovered" << std::endl;
220221 // The following line can be modified to evaluate whether the discovered datareader should be ignored
@@ -225,7 +226,7 @@ class CustomDomainParticipantListener : public DomainParticipantListener
225226 should_be_ignored = true ; // Request the ignoring of the discovered datareader
226227 }
227228 }
228- else if (info. status == eprosima::fastdds::rtps::ReaderDiscoveryInfo ::REMOVED_READER )
229+ else if (reason == eprosima::fastdds::rtps::ReaderDiscoveryStatus ::REMOVED_READER )
229230 {
230231 std::cout << " Datareader lost" << std::endl;
231232 }
@@ -994,17 +995,18 @@ class DiscoveryDomainParticipantListener : public DomainParticipantListener
994995 /* Custom Callback on_data_reader_discovery */
995996 void on_data_reader_discovery (
996997 DomainParticipant* participant,
997- eprosima::fastdds::rtps::ReaderDiscoveryInfo&& info,
998+ eprosima::fastdds::rtps::ReaderDiscoveryStatus reason,
999+ const eprosima::fastdds::rtps::SubscriptionBuiltinTopicData& info,
9981000 bool & should_be_ignored) override
9991001 {
10001002 should_be_ignored = false ;
10011003 static_cast <void >(participant);
1002- switch (info. status ){
1003- case eprosima::fastdds::rtps::ReaderDiscoveryInfo ::DISCOVERED_READER :
1004+ switch (reason ){
1005+ case eprosima::fastdds::rtps::ReaderDiscoveryStatus ::DISCOVERED_READER :
10041006 {
10051007 /* Process the case when a new datareader was found in the domain */
1006- std::cout << " New DataReader subscribed to topic '" << info.info . topicName () <<
1007- " ' of type '" << info.info . typeName () << " ' discovered" ;
1008+ std::cout << " New DataReader subscribed to topic '" << info.topic_name <<
1009+ " ' of type '" << info.type_name << " ' discovered" ;
10081010 /* The following line can be substituted to evaluate whether the discovered datareader should be ignored */
10091011 bool ignoring_condition = false ;
10101012 if (ignoring_condition)
@@ -1013,13 +1015,13 @@ class DiscoveryDomainParticipantListener : public DomainParticipantListener
10131015 }
10141016 }
10151017 break ;
1016- case eprosima::fastdds::rtps::ReaderDiscoveryInfo ::CHANGED_QOS_READER :
1018+ case eprosima::fastdds::rtps::ReaderDiscoveryStatus ::CHANGED_QOS_READER :
10171019 /* Process the case when a datareader changed its QOS */
10181020 break ;
1019- case eprosima::fastdds::rtps::ReaderDiscoveryInfo ::REMOVED_READER :
1021+ case eprosima::fastdds::rtps::ReaderDiscoveryStatus ::REMOVED_READER :
10201022 /* Process the case when a datareader was removed from the domain */
1021- std::cout << " DataReader subscribed to topic '" << info.info . topicName () <<
1022- " ' of type '" << info.info . typeName () << " ' left the domain." ;
1023+ std::cout << " DataReader subscribed to topic '" << info.topic_name <<
1024+ " ' of type '" << info.type_name << " ' left the domain." ;
10231025 break ;
10241026 }
10251027 }
@@ -1067,14 +1069,15 @@ class RemoteDiscoveryDomainParticipantListener : public DomainParticipantListene
10671069 /* Custom Callback on_data_reader_discovery */
10681070 void on_data_reader_discovery (
10691071 DomainParticipant* participant,
1070- eprosima::fastdds::rtps::ReaderDiscoveryInfo&& info,
1072+ eprosima::fastdds::rtps::ReaderDiscoveryStatus reason,
1073+ const eprosima::fastdds::rtps::SubscriptionBuiltinTopicData& info,
10711074 bool & should_be_ignored) override
10721075 {
10731076 should_be_ignored = false ;
10741077 // Get remote type information
10751078 xtypes::TypeObject remote_type_object;
10761079 if (RETCODE_OK != DomainParticipantFactory::get_instance ()->type_object_registry ().get_type_object (
1077- info.info . type_information () .type_information .complete ().typeid_with_size ().type_id (),
1080+ info.type_information .type_information .complete ().typeid_with_size ().type_id (),
10781081 remote_type_object))
10791082 {
10801083 // Error
@@ -1088,7 +1091,7 @@ class RemoteDiscoveryDomainParticipantListener : public DomainParticipantListene
10881091
10891092 // Create a Topic with the remotely discovered type.
10901093 Topic* topic =
1091- participant->create_topic (info.info . topicName () .to_string (), dyn_type_support.get_type_name (),
1094+ participant->create_topic (info.topic_name .to_string (), dyn_type_support.get_type_name (),
10921095 TOPIC_QOS_DEFAULT );
10931096 if (nullptr == topic)
10941097 {
@@ -1172,13 +1175,14 @@ class TypeIntrospectionSubscriber : public DomainParticipantListener
11721175 /* Custom Callback on_data_reader_discovery */
11731176 void on_data_reader_discovery (
11741177 DomainParticipant* /* participant */ ,
1175- eprosima::fastdds::rtps::ReaderDiscoveryInfo&& info,
1178+ eprosima::fastdds::rtps::ReaderDiscoveryStatus /* reason */ ,
1179+ const eprosima::fastdds::dds::SubscriptionBuiltinTopicData& info,
11761180 bool & /* should_be_ignored */ ) override
11771181 {
11781182 // Get remote type information
11791183 xtypes::TypeObject remote_type_object;
11801184 if (RETCODE_OK != DomainParticipantFactory::get_instance ()->type_object_registry ().get_type_object (
1181- info.info . type_information () .type_information .complete ().typeid_with_size ().type_id (),
1185+ info.type_information .type_information .complete ().typeid_with_size ().type_id (),
11821186 remote_type_object))
11831187 {
11841188 // Error
0 commit comments