From 8a7350f21f9a56b8961ad9bf12f73563ad03c028 Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Tue, 10 Dec 2019 09:37:17 +0100 Subject: [PATCH] Adding is_intraprocess_only() method to RTPSParticipantImpl --- src/cpp/rtps/participant/RTPSParticipantImpl.cpp | 5 +++-- src/cpp/rtps/participant/RTPSParticipantImpl.h | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/cpp/rtps/participant/RTPSParticipantImpl.cpp b/src/cpp/rtps/participant/RTPSParticipantImpl.cpp index b53c81e42f9..ff68c5af0d9 100644 --- a/src/cpp/rtps/participant/RTPSParticipantImpl.cpp +++ b/src/cpp/rtps/participant/RTPSParticipantImpl.cpp @@ -70,7 +70,7 @@ static EntityId_t TrustedWriter(const EntityId_t& reader) c_EntityId_Unknown; } -static bool is_intraprocess_only( +static bool should_be_intraprocess_only( const RTPSParticipantAttributes& att) { return @@ -105,6 +105,7 @@ RTPSParticipantImpl::RTPSParticipantImpl( , mp_participantListener(plisten) , mp_userParticipant(par) , mp_mutex(new std::recursive_mutex()) + , is_intraprocess_only_(should_be_intraprocess_only(PParam)) { // Builtin transport by default if (PParam.useBuiltinTransports) @@ -241,7 +242,7 @@ RTPSParticipantImpl::RTPSParticipantImpl( << m_att.defaultUnicastLocatorList); } - if (is_intraprocess_only(m_att)) + if (is_intraprocess_only()) { m_att.builtin.metatrafficUnicastLocatorList.clear(); m_att.defaultUnicastLocatorList.clear(); diff --git a/src/cpp/rtps/participant/RTPSParticipantImpl.h b/src/cpp/rtps/participant/RTPSParticipantImpl.h index 614a3c73b4a..4e5b2b77ce2 100644 --- a/src/cpp/rtps/participant/RTPSParticipantImpl.h +++ b/src/cpp/rtps/participant/RTPSParticipantImpl.h @@ -276,6 +276,11 @@ class RTPSParticipantImpl WLP* wlp(); + bool is_intraprocess_only() const + { + return is_intraprocess_only_; + } + bool get_remote_writer_info(const GUID_t& writerGuid, WriterProxyData& returnedInfo); bool get_remote_reader_info(const GUID_t& readerGuid, ReaderProxyData& returnedInfo); @@ -410,6 +415,9 @@ class RTPSParticipantImpl //!Participant Mutex std::recursive_mutex* mp_mutex; + //!Will this participant use intraprocess only? + bool is_intraprocess_only_; + /* * Flow controllers for this participant. */