|
@@ -63,6 +63,7 @@ bool TopicsSubscriber::init(const char * strtopic,const char * strpubip,const un
|
|
|
strncpy(mstrtopic,strtopic,255);
|
|
|
// Create RTPSParticipant
|
|
|
|
|
|
+
|
|
|
ParticipantAttributes PParam;
|
|
|
PParam.rtps.setName("Participant_subscriber"); //You can put the name you want
|
|
|
|
|
@@ -72,6 +73,7 @@ bool TopicsSubscriber::init(const char * strtopic,const char * strpubip,const un
|
|
|
PParam.rtps.builtin.discovery_config.m_simpleEDP.use_PublicationWriterANDSubscriptionReader = true;
|
|
|
PParam.rtps.builtin.discovery_config.leaseDuration = c_TimeInfinite;
|
|
|
|
|
|
+
|
|
|
// SharedMem transport configuration
|
|
|
PParam.rtps.useBuiltinTransports = false;
|
|
|
|
|
@@ -97,6 +99,8 @@ bool TopicsSubscriber::init(const char * strtopic,const char * strpubip,const un
|
|
|
initial_peer_locator.port = nPort;
|
|
|
PParam.rtps.builtin.initialPeersList.push_back(initial_peer_locator);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
// PParam.rtps.builtin.discovery_config.leaseDuration = c_TimeInfinite;
|
|
|
// PParam.rtps.builtin.discovery_config.leaseDuration_announcementperiod = Duration_t(5, 0);
|
|
|
// PParam.rtps.setName("Participant_sub");
|
|
@@ -130,7 +134,6 @@ bool TopicsSubscriber::init(const char * strtopic,const char * strpubip,const un
|
|
|
|
|
|
Rparam.qos.m_reliability.kind = RELIABLE_RELIABILITY_QOS;
|
|
|
|
|
|
-
|
|
|
mp_subscriber = Domain::createSubscriber(mp_participant,Rparam, static_cast<SubscriberListener*>(&m_listener));
|
|
|
if(mp_subscriber == nullptr)
|
|
|
{
|