Hello,
I'm trying to create a new DDSDomainParticipant using an input XML QoS profile.
In C++ we have the function
virtual DDSDomainParticipant* DDSDomainParticipantFactory::create_participant_with_profile | ( | DDS_DomainId_t | domainId, |
const char * | library_name, | ||
const char * | profile_name, | ||
DDSDomainParticipantListener * | listener, | ||
DDS_StatusMask | mask | ||
) |
To specify the library_name and profile_name. Same with the fucntions create_datareader_with_profile and create_datawriter_with_profile. But I can't find how to do this in C++11.
Can someone please explain how to achieve the same using C++11?
Thanks!
Some of the functionality of the Traditional C++ Participant Factory is subsumed into the DomainParticipant constructors. In this case, you might want to look further to the XML App Creation feature and define the entity tree itself via XML. But if you do want to create the entities (Participant, Publisher, Subscriber, DataWriter, DataReader) manually, you can just call the DomainParticipant constructor directly. In this case, it seems you need this constructor and a QosProvider to access the profile defined in XML, so that you can supply the QoS object to that Participant constructor.
Given this traditional C++ API code:
The equivalent Modern C++ API code is:
This article describes some of the differences between the Traditional and Modern C++ APIs: https://community.rti.com/kb/differences-between-modern-and-traditional-c-apis
Thank you Alejandro. That worked