Skip to content

Commit

Permalink
Add XML configuration for FlowControllerDescriptor (#782)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Mario-DL committed May 31, 2024
1 parent 038cc2a commit 916905d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
2 changes: 2 additions & 0 deletions code/DDSCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4230,6 +4230,8 @@ void dds_qos_examples()
//The PublishModeQosPolicy is default constructed with kind = SYNCHRONOUS
//Change the kind to ASYNCHRONOUS
publish_mode.kind = ASYNCHRONOUS_PUBLISH_MODE;
// Optionally, select the flow controller name
publish_mode.flow_controller_name = "example_flow_controller_name";
//!--
}

Expand Down
27 changes: 26 additions & 1 deletion code/XMLTester.xml
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com">
-->
<participant profile_name="participant_profile_qos_flowcontroller">
<rtps>
<flow_controller_descriptor_list>
<flow_controller_descriptor>
<name>example_flow_controller</name>
<scheduler>FIFO</scheduler>
<max_bytes_per_period>4096</max_bytes_per_period>
<period_ms>500</period_ms>
<sender_thread>
<scheduling_policy>-1</scheduling_policy>
<priority>0</priority>
<affinity>0</affinity>
<stack_size>-1</stack_size>
</sender_thread>
</flow_controller_descriptor>
</flow_controller_descriptor_list>
</rtps>
</participant>

<data_writer profile_name="writer_profile_qos_flowcontroller">
<!-- TODO: Configure FlowController through XML -->
<qos>
<publishMode>
<kind>ASYNCHRONOUS</kind>
<flow_controller_name>example_flow_controller</flow_controller_name>
</publishMode>
</qos>
</data_writer>
<!--><-->

Expand All @@ -830,6 +854,7 @@
<qos>
<publishMode>
<kind>ASYNCHRONOUS</kind>
<flow_controller_name>example_flow_controller</flow_controller_name>
</publishMode>
</qos>
</data_writer>
Expand Down
3 changes: 3 additions & 0 deletions docs/fastdds/dds_layer/core/policy/eprosimaExtensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,9 @@ There are two possible values (see |PublishModeQosPolicyKind-api|):
* |ASYNCHRONOUS_PUBLISH_MODE-api|: An internal thread takes the responsibility of sending the data asynchronously.
The write operation returns before the data is actually sent.

Also, the |PublishModeQosPolicy::flow_ctrl_name-api| has to be set to the name of a valid :ref:`flow-controllers`
descriptor name.

Example
"""""""

Expand Down
8 changes: 6 additions & 2 deletions docs/fastdds/use_cases/large_data/large_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,12 @@ Example configuration

.. tab:: XML

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

.. Warning::

Expand Down

0 comments on commit 916905d

Please sign in to comment.