Skip to content

Commit ac5c2fd

Browse files
Feature flow controller
Signed-off-by: Eugenio Collado <eugeniocollado@eprosima.com>
1 parent e225f5a commit ac5c2fd

File tree

5 files changed

+23
-1
lines changed

5 files changed

+23
-1
lines changed

code/DDSCodeTester.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -4699,6 +4699,8 @@ void dds_qos_examples()
46994699
participant_qos.wire_protocol().ignore_non_matching_locators = true;
47004700
// Increase mutation tries
47014701
participant_qos.wire_protocol().builtin.mutation_tries = 300u;
4702+
// Use a specific flow controller to control the builtin writers
4703+
participant_qos.wire_protocol().builtin.flow_controller_name = "AlreadyExistingFlowController";
47024704
// Use modified QoS in the creation of the DomainParticipant entity
47034705
participant_ = factory_->create_participant(domain, participant_qos);
47044706
//!--
@@ -6693,6 +6695,9 @@ void dds_usecase_examples()
66936695
DomainParticipantQos participant_qos;
66946696
participant_qos.flow_controllers().push_back(flow_control_300k_per_sec);
66956697

6698+
// [OPTIONAL] Link builtin writers to any of the registered flow controllers
6699+
participant_qos.wire_protocol().builtin.flow_controller_name = "example_flow_controller";
6700+
66966701
// .... create participant and publisher
66976702

66986703
// Link writer to the registered flow controller.

code/XMLTester.xml

+4
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,10 @@
836836
</sender_thread>
837837
</flow_controller_descriptor>
838838
</flow_controller_descriptor_list>
839+
840+
<builtin> <!-- Optional use of flow controller for participant's meta traffic-->
841+
<flow_controller_name>example_flow_controller</flow_controller_name>
842+
</builtin>
839843
</rtps>
840844
</participant>
841845

code/XMLTesterExample.xml

+1
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@
373373
<readerPayloadSize>512</readerPayloadSize>
374374
<writerPayloadSize>512</writerPayloadSize>
375375
<mutation_tries>55</mutation_tries>
376+
<flow_controller_name>example_flow_controller</flow_controller_name>
376377
</builtin>
377378

378379
<port>

docs/fastdds/use_cases/large_data/large_data.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,14 @@ Flow Controllers
205205

206206
*eProsima Fast DDS* provides a mechanism to limit the rate at which the data is sent by a DataWriter.
207207
These controllers should be registered on the creation of the DomainParticipant using |FlowControllersQos|, and
208-
then referenced on the creation of the DataWriter using |PublishModeQosPolicy|.
208+
then referenced by the DataWriter whose traffic is to be controlled:
209+
210+
* User DataWriters:
211+
The flow controller should be assigned through |PublishModeQosPolicy| to regulate the transmission of application data.
212+
* Built-in DataWriters:
213+
The flow controller can be configured to control meta-traffic generated by built-in DataWriters responsible for PDP,
214+
EDP, WLP, and TypeLookupService. This allows for fine-grained control over discovery and built-in traffic. The flow
215+
controller should be assigned through |WireProtocolConfigQos|.
209216

210217
A new thread is spawned the first time a flow controller is referenced by an asynchronous DataWriter.
211218
This thread will be responsible for arbitrating the network output of the samples being transmitted by all the

docs/fastdds/xml_configuration/domainparticipant.rst

+5
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,11 @@ This section specifies the available XML members for the configuration of this
333333
port is already in use.
334334
- ``uint32_t``
335335
- 100
336+
* - ``<flow_controller_name>``
337+
- :ref:`flowcontrollersqos` name.
338+
- ``string``
339+
- Empty
340+
336341

337342
**Example**
338343

0 commit comments

Comments
 (0)