Skip to content

Commit 3c7a04f

Browse files
committed
Refs #23432. Move XML for transport_priority inside qos tag.
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
1 parent f77bd99 commit 3c7a04f

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

resources/xsd/fastdds_profiles.xsd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@
233233
├ propertiesPolicy [0~1],
234234
├ userDefinedID [int16],
235235
├ entityID [int16],
236-
└ matchedSubscribersAllocation [0~1],
237-
└ transport_priority [0~1]-->
236+
└ matchedSubscribersAllocation [0~1]-->
238237
<xs:complexType name="publisherProfileNoAttributesType">
239238
<xs:all>
240239
<xs:element name="topic" type="topicElementType" minOccurs="0" maxOccurs="1"/>
@@ -249,7 +248,6 @@
249248
<xs:element name="userDefinedID" type="int16" minOccurs="0" maxOccurs="1"/>
250249
<xs:element name="entityID" type="int16" minOccurs="0" maxOccurs="1"/>
251250
<xs:element name="matchedSubscribersAllocation" type="allocationConfigType" minOccurs="0" maxOccurs="1"/>
252-
<xs:element name="transport_priority" type="int32" minOccurs="0" maxOccurs="1"/>
253251
</xs:all>
254252
</xs:complexType>
255253

@@ -1291,7 +1289,8 @@
12911289
├ reliability [0~1],
12921290
├ timeBasedFilter [0~1],
12931291
├ topicData [0~1],
1294-
├ userData [0~1] -->
1292+
├ userData [0~1],
1293+
└ transport_priority [0~1] -->
12951294
<xs:complexType name="dataWriterQosPoliciesType">
12961295
<xs:all>
12971296
<xs:element name="data_sharing" type="dataSharingQosPolicyType" minOccurs="0" maxOccurs="1"/>
@@ -1314,6 +1313,7 @@
13141313
<xs:element name="timeBasedFilter" type="timeBasedFilterQosPolicyType" minOccurs="0" maxOccurs="1"/>
13151314
<xs:element name="topicData" type="octectVectorQosPolicyType" minOccurs="0" maxOccurs="1"/>
13161315
<xs:element name="userData" type="octectVectorQosPolicyType" minOccurs="0" maxOccurs="1"/>
1316+
<xs:element name="transport_priority" type="int32" minOccurs="0" maxOccurs="1"/>
13171317
</xs:all>
13181318
</xs:complexType>
13191319

src/cpp/xmlparser/XMLElementParser.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,7 @@ XMLP_ret XMLParser::getXMLWriterQosPolicies(
13891389
<xs:element name="data_sharing" type="dataSharingQosPolicyType" minOccurs="0"/>
13901390
<xs:element name="disablePositiveAcks" type="disablePositiveAcksQosPolicyType" minOccurs="0"/>
13911391
<xs:element name="disable_heartbeat_piggyback" type="boolType" minOccurs="0"/>
1392+
<xs:element name="transport_priority" type="boolType" minOccurs="0"/>
13921393
</xs:all>
13931394
</xs:complexType>
13941395
*/
@@ -1537,6 +1538,14 @@ XMLP_ret XMLParser::getXMLWriterQosPolicies(
15371538
return XMLP_ret::XML_ERROR;
15381539
}
15391540
}
1541+
else if (strcmp(name, "transport_priority") == 0)
1542+
{
1543+
// transport_priority - int32
1544+
if (XMLP_ret::XML_OK != getXMLInt(p_aux0, &qos.transport_priority.value, ident))
1545+
{
1546+
return XMLP_ret::XML_ERROR;
1547+
}
1548+
}
15401549
else
15411550
{
15421551
EPROSIMA_LOG_ERROR(XMLPARSER, "Invalid element found into 'writerQosPoliciesType'. Name: " << name);
@@ -4285,14 +4294,6 @@ XMLP_ret XMLParser::getXMLPublisherAttributes(
42854294
return XMLP_ret::XML_ERROR;
42864295
}
42874296
}
4288-
else if (strcmp(name, "transport_priority") == 0)
4289-
{
4290-
// transport_priority - int32
4291-
if (XMLP_ret::XML_OK != getXMLInt(p_aux0, &publisher.qos.transport_priority.value, ident))
4292-
{
4293-
return XMLP_ret::XML_ERROR;
4294-
}
4295-
}
42964297
else
42974298
{
42984299
EPROSIMA_LOG_ERROR(XMLPARSER, "Invalid element found into 'publisherProfileType'. Name: " << name);

test/blackbox/transport_priority_profile.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
<dds xmlns="http://www.eprosima.com">
33
<profiles>
44
<data_writer profile_name="TRP-FUN-04">
5-
<transport_priority>12</transport_priority>
5+
<qos>
6+
<transport_priority>12</transport_priority>
7+
</qos>
68
</data_writer>
79
</profiles>
810
</dds>

0 commit comments

Comments
 (0)