File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4094,6 +4094,8 @@ void dds_qos_examples()
40944094 // The PublishModeQosPolicy is default constructed with kind = SYNCHRONOUS
40954095 // Change the kind to ASYNCHRONOUS
40964096 publish_mode.kind = ASYNCHRONOUS_PUBLISH_MODE ;
4097+ // Optionally, select the flow controller name
4098+ publish_mode.flow_controller_name = " example_flow_controller" ;
40974099 // !--
40984100 }
40994101
Original file line number Diff line number Diff line change 820820<?xml version="1.0" encoding="UTF-8" ?>
821821<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
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
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 >
Original file line number Diff line number Diff 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+
551554Example
552555"""""""
553556
Original file line number Diff line number Diff 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-
266+ :append: </profiles>
263267
264268.. Warning ::
265269
You can’t perform that action at this time.
0 commit comments