Skip to content

Commit 95900dc

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 d7c3472 commit 95900dc

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
@@ -3963,6 +3963,7 @@ void dds_qos_examples()
39633963

39643964
{
39653965
//DDS_CHANGE_RESOURCE_LIMITS_QOS_POLICY
3966+
<<<<<<< HEAD
39663967
ResourceLimitsQosPolicy resource_limits;
39673968
//The ResourceLimitsQosPolicy is default constructed with max_samples = 5000
39683969
//Change max_samples to 200
@@ -3976,6 +3977,24 @@ void dds_qos_examples()
39763977
//The ResourceLimitsQosPolicy is default constructed with allocated_samples = 100
39773978
//Change allocated_samples to 50
39783979
resource_limits.allocated_samples = 50;
3980+
=======
3981+
// This example uses a DataWriter, but it can also be applied to DataReader and Topic entities
3982+
DataWriterQos writer_qos;
3983+
// The ResourceLimitsQosPolicy is constructed with max_samples = 5000 by default
3984+
// Change max_samples to 2000
3985+
writer_qos.resource_limits().max_samples = 2000;
3986+
// The ResourceLimitsQosPolicy is constructed with max_instances = 10 by default
3987+
// Change max_instances to 20
3988+
writer_qos.resource_limits().max_instances = 20;
3989+
// The ResourceLimitsQosPolicy is constructed with max_samples_per_instance = 400 by default
3990+
// Change max_samples_per_instance to 100
3991+
writer_qos.resource_limits().max_samples_per_instance = 100;
3992+
// The ResourceLimitsQosPolicy is constructed with allocated_samples = 100 by default
3993+
// Change allocated_samples to 50
3994+
writer_qos.resource_limits().allocated_samples = 50;
3995+
// Use modified QoS in the creation of the corresponding entity
3996+
writer_ = publisher_->create_datawriter(topic_, writer_qos);
3997+
>>>>>>> d60571d (Adjust XML snippets to meet QoS constraints (#934))
39793998
//!--
39803999
}
39814000

code/XMLTester.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3655,7 +3655,7 @@
36553655
<data_writer profile_name="writer_xml_conf_resource_limits_profile">
36563656
<topic>
36573657
<resourceLimitsQos>
3658-
<max_samples>200</max_samples>
3658+
<max_samples>2000</max_samples>
36593659
<max_instances>20</max_instances>
36603660
<max_samples_per_instance>100</max_samples_per_instance>
36613661
<allocated_samples>50</allocated_samples>
@@ -3666,7 +3666,7 @@
36663666
<data_reader profile_name="reader_xml_conf_resource_limits_profile">
36673667
<topic>
36683668
<resourceLimitsQos>
3669-
<max_samples>200</max_samples>
3669+
<max_samples>2000</max_samples>
36703670
<max_instances>20</max_instances>
36713671
<max_samples_per_instance>100</max_samples_per_instance>
36723672
<allocated_samples>50</allocated_samples>

0 commit comments

Comments
 (0)