Hi, I'd like to know if there's any way to get the qos profile/library from discovery. What I'd like to do is discover publishers and open subscribers accordingly, but I didn't find a way to get the profile.
The only solution I've found is statically mapping topic names to the respective library:: profile to use when opening the subscriber.
Is there a way to avoid this step and discover everything dynamically?
Thanks
Hi Michael,
Which of these do you mean?
(a) When you discover a remote entity (say a DataWriter) you would like to find out the QoS profile that was used to configure that remote entity, that is you would like to have that profile name be propagated via discovery and see it in the PublicationsBuiltinTopicData (or SubscriptionsBuiltinTopicData)?
(b) When you create a DataReader/DataWriter you would like to have some sort of "profile discovery service" that would allow participant to lookup the peoper QoS profile that should be used to configure the created entity?
(c) Somethign else?
I think you meant (a) but I want to make sure I understand before I answer...
Gerardo
Hi Gerardo,
You're right, I meant a.
Hi Michael,
Currently there is no built-in way to do this. The QoS profile used to create an entity is converted to the actual QoS and "forgotten" buy the core and discovery only sends the actual QoS values that are relevant to the other side so there is no way looking at discovery information to tell whether the entity was configured using a Qos profile and the name of said profile.
I agree this would be a very useful feature. In fact there is an internal RFE (request for enhancement) that in the situation where the entity was created using the create_xxx_with_profile() or modified with the set_qos_with_profile() then the DDS core would set a PropertyQosPolicy on the entity that would record the profile name so that it is visible in the discovery data. However this RFE has not been prioritized yet so I do not have a timeline for when it would be implemented... If this is an important/urgent feature for you?
Gerardo
I wouldn't say it's very urgent, it's just a matter of convenience.
Anyway, thanks a lot for clearing it up
Michael
Michael,
Another option for now, is to add that information as a property yourself. Here how to do it in C but the same applies for other languages as well:
Let's assume that you are creating your participant this way:
Now you can just get the qos:
add your property using the DDS_PropertyQosPolicyHelper_assert_property:
and set back the qos:
You can now retrieve that information using the discovery information. For example I verified that everything was working using RTI Admin Console as you can see in the following screenshot:
Do you think this can work for you? Let me know if you have any questions or doubts,
Best,
Gianpiero
Hi Gianpiero,
That seems like a good idea, I'll try to use it
Thanks a lot,
Michael