Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[21054] Add XML configuration for FlowControllerDescriptor #782

Merged
merged 4 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -819,8 +819,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 @@ -829,6 +853,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: <!--><-->
JesusPoderoso marked this conversation as resolved.
Show resolved Hide resolved
:lines: 2-3, 5-25
:append: </profiles>

.. Warning::

Expand Down