@@ -3796,6 +3796,7 @@ void dds_qos_examples()
3796
3796
3797
3797
{
3798
3798
// DDS_CHANGE_RESOURCE_LIMITS_QOS_POLICY
3799
+ <<<<<<< HEAD
3799
3800
ResourceLimitsQosPolicy resource_limits;
3800
3801
// The ResourceLimitsQosPolicy is default constructed with max_samples = 5000
3801
3802
// Change max_samples to 200
@@ -3809,6 +3810,24 @@ void dds_qos_examples()
3809
3810
// The ResourceLimitsQosPolicy is default constructed with allocated_samples = 100
3810
3811
// Change allocated_samples to 50
3811
3812
resource_limits.allocated_samples = 50 ;
3813
+ =======
3814
+ // This example uses a DataWriter, but it can also be applied to DataReader and Topic entities
3815
+ DataWriterQos writer_qos;
3816
+ // The ResourceLimitsQosPolicy is constructed with max_samples = 5000 by default
3817
+ // Change max_samples to 2000
3818
+ writer_qos.resource_limits ().max_samples = 2000 ;
3819
+ // The ResourceLimitsQosPolicy is constructed with max_instances = 10 by default
3820
+ // Change max_instances to 20
3821
+ writer_qos.resource_limits ().max_instances = 20 ;
3822
+ // The ResourceLimitsQosPolicy is constructed with max_samples_per_instance = 400 by default
3823
+ // Change max_samples_per_instance to 100
3824
+ writer_qos.resource_limits ().max_samples_per_instance = 100 ;
3825
+ // The ResourceLimitsQosPolicy is constructed with allocated_samples = 100 by default
3826
+ // Change allocated_samples to 50
3827
+ writer_qos.resource_limits ().allocated_samples = 50 ;
3828
+ // Use modified QoS in the creation of the corresponding entity
3829
+ writer_ = publisher_->create_datawriter (topic_, writer_qos);
3830
+ >>>>>>> d60571d (Adjust XML snippets to meet QoS constraints (#934 ))
3812
3831
// !--
3813
3832
}
3814
3833
0 commit comments