File tree 7 files changed +23
-2
lines changed
include/fastdds/rtps/attributes
builtin/discovery/participant
test/mock/rtps/RTPSParticipantAttributes/fastdds/rtps/attributes
7 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -391,6 +391,9 @@ class BuiltinAttributes
391
391
// ! Set to true to avoid multicast traffic on builtin endpoints
392
392
bool avoid_builtin_multicast = true ;
393
393
394
+ // ! Flow controller name to use for the builtin writers
395
+ std::string flow_controller_name = " " ;
396
+
394
397
BuiltinAttributes () = default ;
395
398
396
399
virtual ~BuiltinAttributes () = default ;
@@ -410,6 +413,7 @@ class BuiltinAttributes
410
413
(this ->writerHistoryMemoryPolicy == b.writerHistoryMemoryPolicy ) &&
411
414
(this ->writerPayloadSize == b.writerPayloadSize ) &&
412
415
(this ->mutation_tries == b.mutation_tries ) &&
416
+ (this ->flow_controller_name == b.flow_controller_name ) &&
413
417
(this ->avoid_builtin_multicast == b.avoid_builtin_multicast );
414
418
}
415
419
Original file line number Diff line number Diff line change 720
720
├ writerHistoryMemoryPolicy [0~1],
721
721
├ readerPayloadSize [uint32],
722
722
├ writerPayloadSize [uint32],
723
- └ mutation_tries [uint32]-->
723
+ ├ mutation_tries [uint32],
724
+ └ flow_controller_name [string] -->
724
725
<xs : complexType name =" builtinAttributesType" >
725
726
<xs : all >
726
727
<xs : element name =" discovery_config" type =" discoverySettingsType" minOccurs =" 0" maxOccurs =" 1" />
735
736
<xs : element name =" readerPayloadSize" type =" uint32" minOccurs =" 0" maxOccurs =" 1" />
736
737
<xs : element name =" writerPayloadSize" type =" uint32" minOccurs =" 0" maxOccurs =" 1" />
737
738
<xs : element name =" mutation_tries" type =" uint32" minOccurs =" 0" maxOccurs =" 1" />
739
+ <xs : element name =" flow_controller_name" type =" string" minOccurs =" 0" maxOccurs =" 1" />
738
740
</xs : all >
739
741
</xs : complexType >
740
742
Original file line number Diff line number Diff line change @@ -2090,6 +2090,7 @@ bool DomainParticipantImpl::can_qos_be_updated(
2090
2090
from.wire_protocol ().builtin .writerHistoryMemoryPolicy ) ||
2091
2091
!(to.wire_protocol ().builtin .writerPayloadSize == from.wire_protocol ().builtin .writerPayloadSize ) ||
2092
2092
!(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 ) ||
2093
2094
!(to.wire_protocol ().builtin .avoid_builtin_multicast ==
2094
2095
from.wire_protocol ().builtin .avoid_builtin_multicast ) ||
2095
2096
!(to.wire_protocol ().builtin .discovery_config .discoveryProtocol ==
Original file line number Diff line number Diff line change 50
50
#include < rtps/builtin/discovery/participant/PDPEndpoints.hpp>
51
51
#include < rtps/builtin/discovery/participant/PDPListener.h>
52
52
#include < rtps/builtin/liveliness/WLP.hpp>
53
+ #include < rtps/flowcontrol/FlowControllerFactory.hpp>
53
54
#include < rtps/history/TopicPayloadPoolRegistry.hpp>
54
55
#include < rtps/network/utils/external_locators.hpp>
55
56
#include < rtps/participant/RTPSParticipantImpl.hpp>
@@ -1700,6 +1701,7 @@ WriterAttributes PDP::static_create_builtin_writer_attributes(
1700
1701
if (!pattr.flow_controllers .empty ())
1701
1702
{
1702
1703
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;
1703
1705
}
1704
1706
1705
1707
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
1127
1127
const std::chrono::time_point<std::chrono::steady_clock>& max_blocking_time)
1128
1128
{
1129
1129
bool ret_value = false ;
1130
- assert (!change->writer_info .is_linked .load ());
1131
1130
// Sync delivery failed. Try to store for asynchronous delivery.
1132
1131
#if HAVE_STRICT_REALTIME
1133
1132
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(
593
593
<xs:element name="readerHistoryMemoryPolicy" type="historyMemoryPolicyType" minOccurs="0"/>
594
594
<xs:element name="writerHistoryMemoryPolicy" type="historyMemoryPolicyType" minOccurs="0"/>
595
595
<xs:element name="mutation_tries" type="uint32Type" minOccurs="0"/>
596
+ <xs:element name="flow_controller_name" type="stringType" minOccurs="0"/>
596
597
</xs:all>
597
598
</xs:complexType>
598
599
*/
@@ -709,6 +710,14 @@ XMLP_ret XMLParser::getXMLBuiltinAttributes(
709
710
return XMLP_ret::XML_ERROR;
710
711
}
711
712
}
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
+ }
712
721
else
713
722
{
714
723
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
377
377
// ! Mutation tries if the port is being used.
378
378
uint32_t mutation_tries = 100u ;
379
379
380
+ // ! Flow controller name to use for the builtin writers
381
+ std::string flow_controller_name = " " ;
382
+
380
383
// ! Set to true to avoid multicast traffic on builtin endpoints
381
384
bool avoid_builtin_multicast = true ;
382
385
@@ -399,6 +402,7 @@ class BuiltinAttributes
399
402
(this ->writerHistoryMemoryPolicy == b.writerHistoryMemoryPolicy ) &&
400
403
(this ->writerPayloadSize == b.writerPayloadSize ) &&
401
404
(this ->mutation_tries == b.mutation_tries ) &&
405
+ (this ->flow_controller_name == b.flow_controller_name ) &&
402
406
(this ->avoid_builtin_multicast == b.avoid_builtin_multicast );
403
407
}
404
408
You can’t perform that action at this time.
0 commit comments