Skip to content

Commit

Permalink
Adjust XML snippets to meet QoS constraints (#934)
Browse files Browse the repository at this point in the history
* Refs #21908: Adjust XML snippets to meet QoS constraints

Signed-off-by: eProsima <[email protected]>

* Refs #21908: ARS - Revert unnecessary changes

Signed-off-by: eProsima <[email protected]>

* Refs #21908: ARS - Add missing snippet change

Signed-off-by: eProsima <[email protected]>

---------

Signed-off-by: eProsima <[email protected]>
(cherry picked from commit d60571d)

# Conflicts:
#	code/DDSCodeTester.cpp
  • Loading branch information
JesusPoderoso authored and mergify[bot] committed Oct 17, 2024
1 parent d7c3472 commit 95900dc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions code/DDSCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3963,6 +3963,7 @@ void dds_qos_examples()

{
//DDS_CHANGE_RESOURCE_LIMITS_QOS_POLICY
<<<<<<< HEAD
ResourceLimitsQosPolicy resource_limits;
//The ResourceLimitsQosPolicy is default constructed with max_samples = 5000
//Change max_samples to 200
Expand All @@ -3976,6 +3977,24 @@ void dds_qos_examples()
//The ResourceLimitsQosPolicy is default constructed with allocated_samples = 100
//Change allocated_samples to 50
resource_limits.allocated_samples = 50;
=======
// This example uses a DataWriter, but it can also be applied to DataReader and Topic entities
DataWriterQos writer_qos;
// The ResourceLimitsQosPolicy is constructed with max_samples = 5000 by default
// Change max_samples to 2000
writer_qos.resource_limits().max_samples = 2000;
// The ResourceLimitsQosPolicy is constructed with max_instances = 10 by default
// Change max_instances to 20
writer_qos.resource_limits().max_instances = 20;
// The ResourceLimitsQosPolicy is constructed with max_samples_per_instance = 400 by default
// Change max_samples_per_instance to 100
writer_qos.resource_limits().max_samples_per_instance = 100;
// The ResourceLimitsQosPolicy is constructed with allocated_samples = 100 by default
// Change allocated_samples to 50
writer_qos.resource_limits().allocated_samples = 50;
// Use modified QoS in the creation of the corresponding entity
writer_ = publisher_->create_datawriter(topic_, writer_qos);
>>>>>>> d60571d (Adjust XML snippets to meet QoS constraints (#934))
//!--
}

Expand Down
4 changes: 2 additions & 2 deletions code/XMLTester.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3655,7 +3655,7 @@
<data_writer profile_name="writer_xml_conf_resource_limits_profile">
<topic>
<resourceLimitsQos>
<max_samples>200</max_samples>
<max_samples>2000</max_samples>
<max_instances>20</max_instances>
<max_samples_per_instance>100</max_samples_per_instance>
<allocated_samples>50</allocated_samples>
Expand All @@ -3666,7 +3666,7 @@
<data_reader profile_name="reader_xml_conf_resource_limits_profile">
<topic>
<resourceLimitsQos>
<max_samples>200</max_samples>
<max_samples>2000</max_samples>
<max_instances>20</max_instances>
<max_samples_per_instance>100</max_samples_per_instance>
<allocated_samples>50</allocated_samples>
Expand Down

0 comments on commit 95900dc

Please sign in to comment.