Skip to content

Commit 1013d82

Browse files
JesusPoderosomergify[bot]
authored andcommitted
Adjust XML snippets to meet QoS constraints (#934)
* Refs #21908: Adjust XML snippets to meet QoS constraints Signed-off-by: eProsima <jesuspoderoso@eprosima.com> * Refs #21908: ARS - Revert unnecessary changes Signed-off-by: eProsima <jesuspoderoso@eprosima.com> * Refs #21908: ARS - Add missing snippet change Signed-off-by: eProsima <jesuspoderoso@eprosima.com> --------- Signed-off-by: eProsima <jesuspoderoso@eprosima.com> (cherry picked from commit d60571d) # Conflicts: # code/DDSCodeTester.cpp
1 parent 7ffe353 commit 1013d82

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

code/DDSCodeTester.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3796,6 +3796,7 @@ void dds_qos_examples()
37963796

37973797
{
37983798
//DDS_CHANGE_RESOURCE_LIMITS_QOS_POLICY
3799+
<<<<<<< HEAD
37993800
ResourceLimitsQosPolicy resource_limits;
38003801
//The ResourceLimitsQosPolicy is default constructed with max_samples = 5000
38013802
//Change max_samples to 200
@@ -3809,6 +3810,24 @@ void dds_qos_examples()
38093810
//The ResourceLimitsQosPolicy is default constructed with allocated_samples = 100
38103811
//Change allocated_samples to 50
38113812
resource_limits.allocated_samples = 50;
3813+
=======
3814+
// This example uses a DataWriter, but it can also be applied to DataReader and Topic entities
3815+
DataWriterQos writer_qos;
3816+
// The ResourceLimitsQosPolicy is constructed with max_samples = 5000 by default
3817+
// Change max_samples to 2000
3818+
writer_qos.resource_limits().max_samples = 2000;
3819+
// The ResourceLimitsQosPolicy is constructed with max_instances = 10 by default
3820+
// Change max_instances to 20
3821+
writer_qos.resource_limits().max_instances = 20;
3822+
// The ResourceLimitsQosPolicy is constructed with max_samples_per_instance = 400 by default
3823+
// Change max_samples_per_instance to 100
3824+
writer_qos.resource_limits().max_samples_per_instance = 100;
3825+
// The ResourceLimitsQosPolicy is constructed with allocated_samples = 100 by default
3826+
// Change allocated_samples to 50
3827+
writer_qos.resource_limits().allocated_samples = 50;
3828+
// Use modified QoS in the creation of the corresponding entity
3829+
writer_ = publisher_->create_datawriter(topic_, writer_qos);
3830+
>>>>>>> d60571d (Adjust XML snippets to meet QoS constraints (#934))
38123831
//!--
38133832
}
38143833

code/XMLTester.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4482,7 +4482,7 @@
44824482
<data_writer profile_name="writer_xml_conf_resource_limits_profile">
44834483
<topic>
44844484
<resourceLimitsQos>
4485-
<max_samples>200</max_samples>
4485+
<max_samples>2000</max_samples>
44864486
<max_instances>20</max_instances>
44874487
<max_samples_per_instance>100</max_samples_per_instance>
44884488
<allocated_samples>50</allocated_samples>
@@ -4493,7 +4493,7 @@
44934493
<data_reader profile_name="reader_xml_conf_resource_limits_profile">
44944494
<topic>
44954495
<resourceLimitsQos>
4496-
<max_samples>200</max_samples>
4496+
<max_samples>2000</max_samples>
44974497
<max_instances>20</max_instances>
44984498
<max_samples_per_instance>100</max_samples_per_instance>
44994499
<allocated_samples>50</allocated_samples>

0 commit comments

Comments
 (0)