@@ -3963,6 +3963,7 @@ void dds_qos_examples()
3963
3963
3964
3964
{
3965
3965
// DDS_CHANGE_RESOURCE_LIMITS_QOS_POLICY
3966
+ <<<<<<< HEAD
3966
3967
ResourceLimitsQosPolicy resource_limits;
3967
3968
// The ResourceLimitsQosPolicy is default constructed with max_samples = 5000
3968
3969
// Change max_samples to 200
@@ -3976,6 +3977,24 @@ void dds_qos_examples()
3976
3977
// The ResourceLimitsQosPolicy is default constructed with allocated_samples = 100
3977
3978
// Change allocated_samples to 50
3978
3979
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 ))
3979
3998
// !--
3980
3999
}
3981
4000
0 commit comments