@@ -3938,6 +3938,7 @@ void dds_qos_examples()
3938
3938
3939
3939
{
3940
3940
// DDS_CHANGE_RESOURCE_LIMITS_QOS_POLICY
3941
+ <<<<<<< HEAD
3941
3942
ResourceLimitsQosPolicy resource_limits;
3942
3943
// The ResourceLimitsQosPolicy is default constructed with max_samples = 5000
3943
3944
// Change max_samples to 200
@@ -3951,6 +3952,24 @@ void dds_qos_examples()
3951
3952
// The ResourceLimitsQosPolicy is default constructed with allocated_samples = 100
3952
3953
// Change allocated_samples to 50
3953
3954
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 ))
3954
3973
// !--
3955
3974
}
3956
3975
0 commit comments