Skip to content

Commit c24b83f

Browse files
mergify[bot]Mario-DLMiguelCompany
authored
Add XML configuration for FlowControllerDescriptor to 2.x (#793) (#803)
* Add XML configuration for FlowControllerDescriptor to 2.x (#793) * Refs #21136: Add XML Flow Controller Descriptors documentation Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #21136: Apply rev Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #21136: Fix XML repr. Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> --------- Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> (cherry picked from commit f3f4f0e) # Conflicts: # docs/fastdds/use_cases/large_data/large_data.rst * Fix conflicts. Signed-off-by: Miguel Company <miguelcompany@eprosima.com> --------- Signed-off-by: Miguel Company <miguelcompany@eprosima.com> Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com> Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
1 parent 9465abd commit c24b83f

File tree

4 files changed

+43
-17
lines changed

4 files changed

+43
-17
lines changed

code/DDSCodeTester.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4066,6 +4066,8 @@ void dds_qos_examples()
40664066
//The PublishModeQosPolicy is default constructed with kind = SYNCHRONOUS
40674067
//Change the kind to ASYNCHRONOUS
40684068
publish_mode.kind = ASYNCHRONOUS_PUBLISH_MODE;
4069+
// Optionally, select the flow controller name
4070+
publish_mode.flow_controller_name = "example_flow_controller";
40694071
//!--
40704072
}
40714073

code/XMLTester.xml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,26 @@
561561
<?xml version="1.0" encoding="UTF-8" ?>
562562
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
563563
-->
564+
<participant profile_name="participant_profile_qos_flowcontroller">
565+
<rtps>
566+
<flow_controller_descriptor_list>
567+
<flow_controller_descriptor>
568+
<name>example_flow_controller</name>
569+
<scheduler>FIFO</scheduler>
570+
<max_bytes_per_period>4096</max_bytes_per_period>
571+
<period_ms>500</period_ms>
572+
</flow_controller_descriptor>
573+
</flow_controller_descriptor_list>
574+
</rtps>
575+
</participant>
576+
564577
<data_writer profile_name="writer_profile_qos_flowcontroller">
565-
<!-- TODO: Configure FlowController through XML -->
578+
<qos>
579+
<publishMode>
580+
<kind>ASYNCHRONOUS</kind>
581+
<flow_controller_name>example_flow_controller</flow_controller_name>
582+
</publishMode>
583+
</qos>
566584
</data_writer>
567585
<!--><-->
568586

@@ -571,6 +589,7 @@
571589
<qos>
572590
<publishMode>
573591
<kind>ASYNCHRONOUS</kind>
592+
<flow_controller_name>example_flow_controller</flow_controller_name>
574593
</publishMode>
575594
</qos>
576595
</data_writer>

docs/fastdds/dds_layer/core/policy/eprosimaExtensions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,9 @@ There are two possible values (see |PublishModeQosPolicyKind-api|):
515515
* |ASYNCHRONOUS_PUBLISH_MODE-api|: An internal thread takes the responsibility of sending the data asynchronously.
516516
The write operation returns before the data is actually sent.
517517

518+
Also, the |PublishModeQosPolicy::flow_ctrl_name-api| has to be set to the name of a valid :ref:`flow-controllers`
519+
descriptor name.
520+
518521
Example
519522
"""""""
520523

docs/fastdds/use_cases/large_data/large_data.rst

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -246,22 +246,24 @@ They only differ in the way they decide the order in which the samples are sent.
246246
Example configuration
247247
^^^^^^^^^^^^^^^^^^^^^
248248

249-
+------------------------------------------------+
250-
| **C++** |
251-
+------------------------------------------------+
252-
| .. literalinclude:: /../code/DDSCodeTester.cpp |
253-
| :language: c++ |
254-
| :start-after: //CONF-QOS-FLOWCONTROLLER |
255-
| :end-before: //!-- |
256-
| :dedent: 8 |
257-
+------------------------------------------------+
258-
| **XML** |
259-
+------------------------------------------------+
260-
| There is currently no way of configuring flow |
261-
| controllers with XML. |
262-
| This will be added in future releases of the |
263-
| product |
264-
+------------------------------------------------+
249+
.. tabs::
250+
251+
.. tab:: C++
252+
253+
.. literalinclude:: /../code/DDSCodeTester.cpp
254+
:language: c++
255+
:start-after: //CONF-QOS-FLOWCONTROLLER
256+
:end-before: //!--
257+
:dedent: 8
258+
259+
.. tab:: XML
260+
261+
.. literalinclude:: /../code/XMLTester.xml
262+
:language: xml
263+
:start-after: <!-->CONF-QOS-FLOWCONTROLLER
264+
:end-before: <!--><-->
265+
:lines: 2-3, 5-
266+
:append: </profiles>
265267

266268
.. Warning::
267269

0 commit comments

Comments
 (0)