File tree Expand file tree Collapse file tree 7 files changed +23
-2
lines changed
include/fastdds/rtps/attributes
builtin/discovery/participant
test/mock/rtps/RTPSParticipantAttributes/fastdds/rtps/attributes Expand file tree Collapse file tree 7 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,9 @@ class BuiltinAttributes
391391 // ! Set to true to avoid multicast traffic on builtin endpoints
392392 bool avoid_builtin_multicast = true ;
393393
394+ // ! Flow controller name to use for the builtin writers
395+ std::string flow_controller_name = " " ;
396+
394397 BuiltinAttributes () = default ;
395398
396399 virtual ~BuiltinAttributes () = default ;
@@ -410,6 +413,7 @@ class BuiltinAttributes
410413 (this ->writerHistoryMemoryPolicy == b.writerHistoryMemoryPolicy ) &&
411414 (this ->writerPayloadSize == b.writerPayloadSize ) &&
412415 (this ->mutation_tries == b.mutation_tries ) &&
416+ (this ->flow_controller_name == b.flow_controller_name ) &&
413417 (this ->avoid_builtin_multicast == b.avoid_builtin_multicast );
414418 }
415419
Original file line number Diff line number Diff line change 720720 ├ writerHistoryMemoryPolicy [0~1],
721721 ├ readerPayloadSize [uint32],
722722 ├ writerPayloadSize [uint32],
723- └ mutation_tries [uint32]-->
723+ ├ mutation_tries [uint32],
724+ └ flow_controller_name [string] -->
724725 <xs : complexType name =" builtinAttributesType" >
725726 <xs : all >
726727 <xs : element name =" discovery_config" type =" discoverySettingsType" minOccurs =" 0" maxOccurs =" 1" />
735736 <xs : element name =" readerPayloadSize" type =" uint32" minOccurs =" 0" maxOccurs =" 1" />
736737 <xs : element name =" writerPayloadSize" type =" uint32" minOccurs =" 0" maxOccurs =" 1" />
737738 <xs : element name =" mutation_tries" type =" uint32" minOccurs =" 0" maxOccurs =" 1" />
739+ <xs : element name =" flow_controller_name" type =" string" minOccurs =" 0" maxOccurs =" 1" />
738740 </xs : all >
739741 </xs : complexType >
740742
Original file line number Diff line number Diff line change @@ -2090,6 +2090,7 @@ bool DomainParticipantImpl::can_qos_be_updated(
20902090 from.wire_protocol ().builtin .writerHistoryMemoryPolicy ) ||
20912091 !(to.wire_protocol ().builtin .writerPayloadSize == from.wire_protocol ().builtin .writerPayloadSize ) ||
20922092 !(to.wire_protocol ().builtin .mutation_tries == from.wire_protocol ().builtin .mutation_tries ) ||
2093+ !(to.wire_protocol ().builtin .flow_controller_name == from.wire_protocol ().builtin .flow_controller_name ) ||
20932094 !(to.wire_protocol ().builtin .avoid_builtin_multicast ==
20942095 from.wire_protocol ().builtin .avoid_builtin_multicast ) ||
20952096 !(to.wire_protocol ().builtin .discovery_config .discoveryProtocol ==
Original file line number Diff line number Diff line change 5050#include < rtps/builtin/discovery/participant/PDPEndpoints.hpp>
5151#include < rtps/builtin/discovery/participant/PDPListener.h>
5252#include < rtps/builtin/liveliness/WLP.hpp>
53+ #include < rtps/flowcontrol/FlowControllerFactory.hpp>
5354#include < rtps/history/TopicPayloadPoolRegistry.hpp>
5455#include < rtps/network/utils/external_locators.hpp>
5556#include < rtps/participant/RTPSParticipantImpl.hpp>
@@ -1700,6 +1701,7 @@ WriterAttributes PDP::static_create_builtin_writer_attributes(
17001701 if (!pattr.flow_controllers .empty ())
17011702 {
17021703 attributes.mode = ASYNCHRONOUS_WRITER;
1704+ attributes.flow_controller_name = (pattr.builtin .flow_controller_name != " " ) ? pattr.builtin .flow_controller_name : fastdds::rtps::async_flow_controller_name;
17031705 }
17041706
17051707 attributes.times .heartbeat_period = pdp_heartbeat_period;
Original file line number Diff line number Diff line change @@ -1127,7 +1127,6 @@ class FlowControllerImpl : public FlowController
11271127 const std::chrono::time_point<std::chrono::steady_clock>& max_blocking_time)
11281128 {
11291129 bool ret_value = false ;
1130- assert (!change->writer_info .is_linked .load ());
11311130 // Sync delivery failed. Try to store for asynchronous delivery.
11321131#if HAVE_STRICT_REALTIME
11331132 std::unique_lock<fastdds::TimedMutex> lock (async_mode.changes_interested_mutex , std::defer_lock);
Original file line number Diff line number Diff line change @@ -593,6 +593,7 @@ XMLP_ret XMLParser::getXMLBuiltinAttributes(
593593 <xs:element name="readerHistoryMemoryPolicy" type="historyMemoryPolicyType" minOccurs="0"/>
594594 <xs:element name="writerHistoryMemoryPolicy" type="historyMemoryPolicyType" minOccurs="0"/>
595595 <xs:element name="mutation_tries" type="uint32Type" minOccurs="0"/>
596+ <xs:element name="flow_controller_name" type="stringType" minOccurs="0"/>
596597 </xs:all>
597598 </xs:complexType>
598599 */
@@ -709,6 +710,14 @@ XMLP_ret XMLParser::getXMLBuiltinAttributes(
709710 return XMLP_ret::XML_ERROR;
710711 }
711712 }
713+ else if (strcmp (name, FLOW_CONTROLLER_NAME) == 0 )
714+ {
715+ // flow_controller_name - stringType
716+ if (XMLP_ret::XML_OK != getXMLString (p_aux0, &builtin.flow_controller_name , ident))
717+ {
718+ return XMLP_ret::XML_ERROR;
719+ }
720+ }
712721 else
713722 {
714723 EPROSIMA_LOG_ERROR (XMLPARSER, " Invalid element found into 'builtinAttributesType'. Name: " << name);
Original file line number Diff line number Diff line change @@ -377,6 +377,9 @@ class BuiltinAttributes
377377 // ! Mutation tries if the port is being used.
378378 uint32_t mutation_tries = 100u ;
379379
380+ // ! Flow controller name to use for the builtin writers
381+ std::string flow_controller_name = " " ;
382+
380383 // ! Set to true to avoid multicast traffic on builtin endpoints
381384 bool avoid_builtin_multicast = true ;
382385
@@ -399,6 +402,7 @@ class BuiltinAttributes
399402 (this ->writerHistoryMemoryPolicy == b.writerHistoryMemoryPolicy ) &&
400403 (this ->writerPayloadSize == b.writerPayloadSize ) &&
401404 (this ->mutation_tries == b.mutation_tries ) &&
405+ (this ->flow_controller_name == b.flow_controller_name ) &&
402406 (this ->avoid_builtin_multicast == b.avoid_builtin_multicast );
403407 }
404408
You can’t perform that action at this time.
0 commit comments