hi,
I'm reading the waitset_status_cond examples codes, and I try to understand the different between C++ & C++11.
in C++, the domain participant can be create via:
participant = DDSTheParticipantFactory->create_participant(
domainId, DDS_PARTICIPANT_QOS_DEFAULT,
NULL /* listener */, DDS_STATUS_MASK_NONE);
in C++11, I don't see any equilvalent.
// When not explicitly provided to the constructor, the
// created DomainParticipants's QoS is default, has a NULL listener, and a
// status mask dds::core::status::StatusMask::all()
// Creating a DomainParticipants on domain id
dds::domain::DomainParticipant participant1(domainId) ;
can someone please explain how do I get the DDS_PARTICIPANT_QOS_DEFAULT in modern C++11?
basically what I try to do is to create the domain participant using this constructor but I couldn't figure out how do I get the DDS_PARTICIPANT_QOS_DEFAULT
DomainParticipant (int32_t the_domain_id, const dds::domain::qos::DomainParticipantQos &the_qos, dds::domain::DomainParticipantListener *the_listener=NULL, const dds::core::status::StatusMask &mask=dds::core::status::StatusMask::all())
thanks
Hi David,
Looking into the API doc I see that you can get the default QoS profile from the dds::domain::qos::DomainParticipantQos default constructor.
That said, I think it's better that you use the DomainParticipant constructor that only takes the ID if you plan to use all the defaults:
Let me know how it goes.
All the best,
Sara
Thanks Sara.
the reason I use that constructor because I want to set the StatusMask to StatusMask::none()
I'm pretty new to RTI DDS for C++ so any help is appreciated.
Hi David,
If you use the constructor, you can use the first function that I mentioned. Something like:
dds::domain::DomainParticipant participant (domain_id, dds::domain::qos::DomainParticipantQos(),NULL, dds::core::status::StatusMask::none());
Thanks,
Sara