Skip to content

Commit 916905d

Browse files
authored
Add XML configuration for FlowControllerDescriptor (#782)
* Refs #21054: Add XML flow_controller_descriptos docs Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #21054: Apply rev Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #21054: Linter Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> * Refs #21054: Extend flow controller descriptor with a thread settings conf Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> --------- Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
1 parent 038cc2a commit 916905d

4 files changed

Lines changed: 37 additions & 3 deletions

File tree

code/DDSCodeTester.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4230,6 +4230,8 @@ void dds_qos_examples()
42304230
//The PublishModeQosPolicy is default constructed with kind = SYNCHRONOUS
42314231
//Change the kind to ASYNCHRONOUS
42324232
publish_mode.kind = ASYNCHRONOUS_PUBLISH_MODE;
4233+
// Optionally, select the flow controller name
4234+
publish_mode.flow_controller_name = "example_flow_controller_name";
42334235
//!--
42344236
}
42354237

code/XMLTester.xml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,32 @@
820820
<?xml version="1.0" encoding="UTF-8" ?>
821821
<profiles xmlns="http://www.eprosima.com">
822822
-->
823+
<participant profile_name="participant_profile_qos_flowcontroller">
824+
<rtps>
825+
<flow_controller_descriptor_list>
826+
<flow_controller_descriptor>
827+
<name>example_flow_controller</name>
828+
<scheduler>FIFO</scheduler>
829+
<max_bytes_per_period>4096</max_bytes_per_period>
830+
<period_ms>500</period_ms>
831+
<sender_thread>
832+
<scheduling_policy>-1</scheduling_policy>
833+
<priority>0</priority>
834+
<affinity>0</affinity>
835+
<stack_size>-1</stack_size>
836+
</sender_thread>
837+
</flow_controller_descriptor>
838+
</flow_controller_descriptor_list>
839+
</rtps>
840+
</participant>
841+
823842
<data_writer profile_name="writer_profile_qos_flowcontroller">
824-
<!-- TODO: Configure FlowController through XML -->
843+
<qos>
844+
<publishMode>
845+
<kind>ASYNCHRONOUS</kind>
846+
<flow_controller_name>example_flow_controller</flow_controller_name>
847+
</publishMode>
848+
</qos>
825849
</data_writer>
826850
<!--><-->
827851

@@ -830,6 +854,7 @@
830854
<qos>
831855
<publishMode>
832856
<kind>ASYNCHRONOUS</kind>
857+
<flow_controller_name>example_flow_controller</flow_controller_name>
833858
</publishMode>
834859
</qos>
835860
</data_writer>

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

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

551+
Also, the |PublishModeQosPolicy::flow_ctrl_name-api| has to be set to the name of a valid :ref:`flow-controllers`
552+
descriptor name.
553+
551554
Example
552555
"""""""
553556

docs/fastdds/use_cases/large_data/large_data.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,12 @@ Example configuration
258258

259259
.. tab:: XML
260260

261-
There is currently no way of configuring flow controllers with XML.
262-
This will be added in future releases of the product.
261+
.. literalinclude:: /../code/XMLTester.xml
262+
:language: xml
263+
:start-after: <!-->CONF-QOS-FLOWCONTROLLER
264+
:end-before: <!--><-->
265+
:lines: 2-3, 5-25
266+
:append: </profiles>
263267

264268
.. Warning::
265269

0 commit comments

Comments
 (0)