Skip to content

Commit e4b93d1

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 5c199c7 commit e4b93d1

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

39393939
{
39403940
//DDS_CHANGE_RESOURCE_LIMITS_QOS_POLICY
3941+
<<<<<<< HEAD
39413942
ResourceLimitsQosPolicy resource_limits;
39423943
//The ResourceLimitsQosPolicy is default constructed with max_samples = 5000
39433944
//Change max_samples to 200
@@ -3951,6 +3952,24 @@ void dds_qos_examples()
39513952
//The ResourceLimitsQosPolicy is default constructed with allocated_samples = 100
39523953
//Change allocated_samples to 50
39533954
resource_limits.allocated_samples = 50;
3955+
=======
3956+
// This example uses a DataWriter, but it can also be applied to DataReader and Topic entities
3957+
DataWriterQos writer_qos;
3958+
// The ResourceLimitsQosPolicy is constructed with max_samples = 5000 by default
3959+
// Change max_samples to 2000
3960+
writer_qos.resource_limits().max_samples = 2000;
3961+
// The ResourceLimitsQosPolicy is constructed with max_instances = 10 by default
3962+
// Change max_instances to 20
3963+
writer_qos.resource_limits().max_instances = 20;
3964+
// The ResourceLimitsQosPolicy is constructed with max_samples_per_instance = 400 by default
3965+
// Change max_samples_per_instance to 100
3966+
writer_qos.resource_limits().max_samples_per_instance = 100;
3967+
// The ResourceLimitsQosPolicy is constructed with allocated_samples = 100 by default
3968+
// Change allocated_samples to 50
3969+
writer_qos.resource_limits().allocated_samples = 50;
3970+
// Use modified QoS in the creation of the corresponding entity
3971+
writer_ = publisher_->create_datawriter(topic_, writer_qos);
3972+
>>>>>>> d60571d (Adjust XML snippets to meet QoS constraints (#934))
39543973
//!--
39553974
}
39563975

code/XMLTester.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3203,7 +3203,7 @@
32033203
<data_writer profile_name="writer_xml_conf_resource_limits_profile">
32043204
<topic>
32053205
<resourceLimitsQos>
3206-
<max_samples>200</max_samples>
3206+
<max_samples>2000</max_samples>
32073207
<max_instances>20</max_instances>
32083208
<max_samples_per_instance>100</max_samples_per_instance>
32093209
<allocated_samples>50</allocated_samples>
@@ -3214,7 +3214,7 @@
32143214
<data_reader profile_name="reader_xml_conf_resource_limits_profile">
32153215
<topic>
32163216
<resourceLimitsQos>
3217-
<max_samples>200</max_samples>
3217+
<max_samples>2000</max_samples>
32183218
<max_instances>20</max_instances>
32193219
<max_samples_per_instance>100</max_samples_per_instance>
32203220
<allocated_samples>50</allocated_samples>

0 commit comments

Comments
 (0)