How to specify the qos of a topic with xml
I have the xml config as this:
<qos_library name="QosLibrary">
<qos_profile name="DefaultProfile" base_name="BuiltinQosLibExp::Generic.BestEffort" is_default_qos="true">
<participant_qos>
<transport_builtin>
<mask>UDPV4 | SHMEM</mask>
</transport_builtin>
</participant_qos>
</qos_profile>
<qos_profile name="ReliableProfile" base_name="BuiltinQosLibExp::Generic.StrictReliable">
<datawriter_qos topic_filter="ShuttleService*"/>
</qos_profile>
</qos_library>
<domain_library name="DomainLibraryGroup">
.....
<topic name="ShuttleServiceRequest_c0a4c169-05c8-419e-9f5a-653e3a97544a" register_type_ref="ShuttleServiceRequest"/>
.......
</domain_library>
I hope the datawriter datawriter with prefix ShuttleService work with StrictReliable qos, But it still work as BestEffort qos. What I have missed?
Connector will use the default QoS that in your configuration is currently set to be the "DefaultProfile". Remove the attribute
is_default_qos="true"
from the "Default Profile" and place it in the "ReliableProfile" Then keep in mind that if you still want to keep enabled UDPv4 and Shared Memory you need to copy those settings as well.
In short, try with this configuration:
<qos_library name="QosLibrary">
<qos_profile name="ReliableProfile"
base_name="BuiltinQosLibExp::Generic.StrictReliable"
is_default_qos="true"> <participant_qos>
<transport_builtin>
Regards, Fabrizio
On Tue, Jun 26, 2018 at 11:37 PM, shixukai [email protected] wrote:
I have the xml config as this:
<qos_library name="QosLibrary"> <qos_profile name="DefaultProfile" base_name="BuiltinQosLibExp::Generic.BestEffort" is_default_qos="true"> <participant_qos> <transport_builtin>
UDPV4 | SHMEM </transport_builtin> </participant_qos> </qos_profile><qos_profile name="ReliableProfile" base_name="BuiltinQosLibExp::Generic.StrictReliable"> <datawriter_qos topic_filter="ShuttleService*"/> </qos_profile></qos_library>
<domain_library name="DomainLibraryGroup"> ..... <register_type name="ShuttleServiceRequest" type_ref="ShuttleServiceRequest"/> ....... </domain_library>
I hope the datawriter datawriter with perfix ShuttleService work with StrictReliable qos, But it still work as BestEffort qos. What I have missed?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rticommunity/rticonnextdds-connector/issues/62, or mute the thread https://github.com/notifications/unsubscribe-auth/AHsRycj5xzK1xISzf2ZOGHDF4spOCWCKks5uAyg0gaJpZM4U5IeV .
@fabriziobertocci thanks for your replay! If i set the "ReliableProfile" is_default_qos="true", will this profile affect all topics? I mean if that will cause all data writer and reader use "ReliableProfile" as default qos but not only "ShuttleService*"? In my case I want other topics have BestEffort qos.
When you define your datawriters (in the domain participant library), you can to tell each datawriter what is the qos profile to inherit from. For example:
- Define two QoS profiles in your QoS library, one for reliable (" QosLibrary::ReliableProfile") and one for best effort (" QosLibrary::BestEffortProfile") profile. I.e.:
<qos_library name="QosLibrary">
<qos_profile name="BestEffortProfile"
base_name="BuiltinQosLibExp::Generic.BestEffort">
<participant_qos>
<transport_builtin>
<qos_profile name="*ReliableProfile*"
base_name="BuiltinQosLibExp::Generic.StrictReliable"> <datawriter_qos topic_filter="ShuttleService*"/> </qos_profile> </qos_library>
-
Then in the domain library, define the two data writers for your domain participant; for each datawriter specify a custom QoS that extends one of the QoS defined in the previous QoS library:
<domain_participant_library name="MyParticipantLibrary"> <domain_participant name="Zero" domain_ref="MyDomainLibrary::MyDomain">
<data_writer name="MyBestEffortWriter" topic_ref="Square"> <datawriter_qos base_name="QosLibrary::MyBestEffortProfile"> </datawriter_qos> </data_writer> <data_writer name="MyReliableWriter" topic_ref="Square"> <datawriter_qos base_name="QosLibrary::MyReliableProfile"> </datawriter_qos> </data_writer> <data_reader name="MySquareReader" topic_ref="Square"/> </domain_participant> </domain_participant_library> -
In your Connector script, just create the Connector object as usual, and get the writers (example for node.js): var connector = new rti.Connector("MyParticipantLibrary::Zero","../ShapesExample.xml"); var output1 = connector.getOutput("MyPublisher::MyBestEffortWriter"); var output2 = connector.getOutput("MyPublisher::MyReliableWriter");
Regards, Fabrizio
On Wed, Jun 27, 2018 at 9:15 PM, shixukai [email protected] wrote:
@fabriziobertocci https://github.com/fabriziobertocci thanks for your replay! If i set the "ReliableProfile" is_default_qos="true", will this profile affect all topics? I mean if that will cause all data writer and reader use "ReliableProfile" as default qos but not only "ShuttleService*"?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rticommunity/rticonnextdds-connector/issues/62#issuecomment-400879523, or mute the thread https://github.com/notifications/unsubscribe-auth/AHsRyUdDXqc4cYtx1jxd_2Tt8NwMP4Z5ks5uBC45gaJpZM4U5IeV .