Creating a Distributed Logger with custom QoS

2 posts / 0 new
Last post
Last seen: 8 years 4 months ago
Joined: 03/15/2016
Posts: 1
Creating a Distributed Logger with custom QoS

I am attempting to create a distributed logger using a custom QoS. I have created the following XML file:



<dds xmlns:xsi=""

xsi:noNamespaceSchemaLocation="" version="5.2.0">

<!-- Qos Library -->

<qos_library name="CustomQosLib">

<qos_profile name="CustomQos" base_name="BuiltinQosLib::Baseline.5.2.0"> <participant_qos>









I am making the domain particpiant factory aware of the custom qos with the following code.


DDS_DomainParticipantFactoryQos factory_qos;


factory_qos.profile.url_profile.ensure_length(1, 1);

factory_qos.profile.url_profile[0] = DDS_String_dup("/valid/path/to/distributed_logger_qos.xml");



When I use the following code, the distributed logger is correctly created with my custom qos.



RTI_DLOptions dlOptions;




DDSDomainParticipant* part = DDSTheParticipantFactory->create_participant_with_profile(_domain, "CustomQosLib", "CustomQos", NULL, DDS_STATUS_MASK_NONE);




_distributedLogger = RTI_DLDistLogger::getInstance();


When I try the following code:



RTI_DLOptions dlOptions;








_distributedLogger = RTI_DLDistLogger::getInstance();



I get the following console output.

"DL Warning: RTI_DL_DDSEntities_create: QoS Library and Profile cannot be found, using default QoS"

Am I misinterpreting what setQosLibrary and setQosProfile do / what their input parameters should be? For code maintainability it would be preferable to not create the participant myself, but I can't seem to get the factory to acknowledge the qos inside of the construction of the distributed logger.




Gonzalo J.'s picture
Last seen: 8 years 4 months ago
Joined: 03/06/2015
Posts: 2

Hi Andrew,

I just wanted to let you know that I was able to reproduce this behavior and confirm it as an issue. The reason is that we use different DomainParticipantFactories for the C and C++ APIs: as Distributed Logger is written in C, when no custom DomainParticipant is provided, Distributed Logger will create its own DomainParticipant from the C DomainParticipantFactory. Therefore, if you set a different QoS profile path in the C++ DomainParticipantFactory, these changes will not be reflected in DistributedLogger.

The workaround is to pass a custom DomainParticipant to DistributedLogger, created with the appropriate DomainParticipantFactory settings.

PS: Please note that this will change the DomainParticipantFactory that Distributed Logger will use to retrieve QoS settings for other entities. If you provide a DomainParticipant created from a C++ DomainParticipantFactory through setDomainParticipant, you can still set a QoS library and profile through setQosLibrary and setQosPath. DL will use this information to load the right QoS settings when creating the remaining Distributed Logger entities.


Gonzalo J.