"Unexpected tag" Error when trying to configure DPSE via Python API

5 posts / 0 new
Last post
Offline
Last seen: 9 months 3 weeks ago
Joined: 11/23/2021
Posts: 32
"Unexpected tag" Error when trying to configure DPSE via Python API

Hello @all,

I am trying to configure the Limited Endpoint Discovery Plugin in the "USER_QOS_PROFILES.xml" file of a Python API application.
See configuration below:

    <qos_library name="LBEDiscoveryPluginExample_Library">
<!-- QoS profile used to configure reliable communication between the DataWriter
        and DataReader created in the example code.
        A QoS profile groups a set of related QoS.
        -->
<qos_profile name="LBEDiscoveryPluginExamplePublisher_Profile" is_default_qos="true">
            <domain_participant_qos>
                <discovery_config>
                    <builtin_discovery_plugins>SPDP</builtin_discovery_plugins>
                </discovery_config>
            <property>
               <value>
                  <element>
                     <name>dds.discovery.endpoint.lbediscovery.library</name>
                     <value>rtilbedisc</value>
                  </element>
                  <element>
                     <name>dds.discovery.endpoint.lbediscovery.create_function</name>
                     <value>DDS_LBEDiscoveryPlugin_create</value>
                  </element>
                  <element>
                     <name>dds.discovery.endpoint.lbediscovery.config_file</name>
                     <value>LBEDiscoveryPluginExampleSubscriber.xml</value>
                  </element>
                  <element>
                     <name>dds.discovery.endpoint.load_plugins</name>
                     <value>dds.discovery.endpoint.lbediscovery</value>
                  </element>
                  <element>
                            <name>dds.discovery.endpoint.lbediscovery.verbosity</name>
                            <value>0</value>
                  </element>
               </value>
            </property>
            </domain_participant_qos>
            <datawriter_qos>
                <protocol>
                    <rtps_object_id>200</rtps_object_id>
                </protocol>
            </datawriter_qos>
        </qos_profile>
</qos_library>


However, when the application loads the "USER_QOS_PROFILES.xml", it returns the following error message:

RTIXMLParser_validateOnStartTag:Parse error at line 75: Unexpected tag 'domain_participant_qos'
RTIXMLParser_parseFromFile_ex:Parse error in file 'USER_QOS_PROFILES.xml'

Do you have any ideas?

Thanks in advance!

Regards,

Marc

Offline
Last seen: 1 year 2 months ago
Joined: 10/22/2018
Posts: 91

I think your XML file is missing the dds tag:

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://community.rti.com/schema/current/rti_dds_qos_profiles.xsd">
</dds>

Can you wrap your XML file with that and see if it resolves your issue?

 

Offline
Last seen: 9 months 3 weeks ago
Joined: 11/23/2021
Posts: 32

Hello samr,

It is not missing. I didnt post the whole xml content. Here once again with the whole content:

<?xml version="1.0"?>
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://community.rti.com/schema/current/rti_dds_qos_profiles.xsd">
    <qos_library name = "System_Library">
        <qos_profile name = "ParticipantBase" base_name="BuiltinQosLib::Generic.BestEffort">
            <participant_qos>
<!--
                The participant name, if it is set, will be displayed in the
                RTI tools, making it easier for you to tell one
                application from another when you're debugging.
                -->
             <participant_name>
                    <name>MyParticipant</name>
                    <role_name>MyRole</role_name>
                </participant_name>
                <transport_builtin>
                    <mask>UDPv4 | SHMEM</mask>
                </transport_builtin>
            </participant_qos>
        </qos_profile>
    </qos_library>
        <qos_library name="Data_Library">
        <qos_profile name="Dw_QoS">
            <datawriter_qos>
<!-- Strict reliable -->
<reliability>
                    <kind>RELIABLE_RELIABILITY_QOS</kind>
                </reliability>
               <resource_limits>
                  <initial_instances>2</initial_instances>
                  <max_samples_per_instance>32</max_samples_per_instance>
                  <max_instances>32</max_instances>
                  <max_samples>64</max_samples>
               </resource_limits>
               <protocol>
                  <rtps_reliable_writer>
                     <heartbeat_period>
                        <sec>0</sec>
                        <nanosec>250000000</nanosec>
                    </heartbeat_period>
                    <late_joiner_heartbeat_period>
                       <sec>0</sec>
                       <nanosec>250000000</nanosec>
                    </late_joiner_heartbeat_period>
                    <fast_heartbeat_period>
                       <sec>0</sec>
                       <nanosec>250000000</nanosec>
                    </fast_heartbeat_period>
                 </rtps_reliable_writer>
               </protocol>
                <history>
                    <depth>32</depth>
                </history>
            </datawriter_qos>
        </qos_profile>
    </qos_library>
    <qos_library name="LBEDiscoveryPluginExample_Library">
<!-- QoS profile used to configure reliable communication between the DataWriter
        and DataReader created in the example code.
        A QoS profile groups a set of related QoS.
        -->
<qos_profile name="LBEDiscoveryPluginExamplePublisher_Profile" is_default_qos="true">
            <domain_participant_qos>
                <discovery_config>
                    <builtin_discovery_plugins>SPDP</builtin_discovery_plugins>
                </discovery_config>
            <property>
               <value>
                  <element>
                     <name>dds.discovery.endpoint.lbediscovery.library</name>
                     <value>rtilbedisc</value>
                  </element>
                  <element>
                     <name>dds.discovery.endpoint.lbediscovery.create_function</name>
                     <value>DDS_LBEDiscoveryPlugin_create</value>
                  </element>
                  <element>
                     <name>dds.discovery.endpoint.lbediscovery.config_file</name>
                     <value>LBEDiscoveryPluginExampleSubscriber.xml</value>
                  </element>
                  <element>
                     <name>dds.discovery.endpoint.load_plugins</name>
                     <value>dds.discovery.endpoint.lbediscovery</value>
                  </element>
                  <element>
                            <name>dds.discovery.endpoint.lbediscovery.verbosity</name>
                            <value>0</value>
                  </element>
               </value>
            </property>
            </domain_participant_qos>
            <datawriter_qos>
                <protocol>
                    <rtps_object_id>200</rtps_object_id>
                </protocol>
            </datawriter_qos>
        </qos_profile>
</qos_library>
</dds>

 

Offline
Last seen: 2 months 6 days ago
Joined: 09/23/2018
Posts: 62

Marc, 

Can you replace domain_participant_qos  with just  'participant_qos'  as a quick experiment?   

We made this change recently. 

Offline
Last seen: 9 months 3 weeks ago
Joined: 11/23/2021
Posts: 32

Hello garyb,

Thanks, that works so far.

Regards,

Marc