Skip to content

Commit 526350d

Browse files
committed
Configured Connext and micro udp transport size to 65504
1 parent 2e4754d commit 526350d

4 files changed

Lines changed: 31 additions & 13 deletions

File tree

doc/test_description.template.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ product versions.
6363
* Content Filtered Topic uses MATCH operator for string comparisons.
6464
* Increased the periodic discovery announcements to 5s in the tests where
6565
the subscriber is OpenDDS and the publisher is Connext DDS.
66+
* Configured UDP transport message size max to 65504 bytes to make it
67+
compatible with other vendors.
6668

6769
* **FastDDS**:
6870

srcCxx/shape_configurator_rti_connext_dds.h

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,29 @@ bool configure_datafrag_size(
2424
if (datafrag_size == 0) {
2525
ok = false;
2626
} else {
27-
DDS_PropertyQosPolicyHelper_add_property(
27+
if (DDS_PropertyQosPolicyHelper_assert_property(
2828
&dp_qos.property,
2929
"dds.transport.UDPv4.builtin.parent.message_size_max",
3030
std::to_string(datafrag_size).c_str(),
31-
DDS_BOOLEAN_FALSE);
31+
DDS_BOOLEAN_FALSE) != DDS_RETCODE_OK) {
32+
ok = false;
33+
printf("failed to set datafrag_size\n");
34+
} else {
35+
ok = true;
36+
}
37+
}
38+
return ok;
39+
}
40+
41+
42+
static bool configure_dp_qos(DDS::DomainParticipantQos &dp_qos) {
43+
bool ok = false;
44+
if (!configure_datafrag_size(dp_qos, 65504)) {
45+
printf("failed to configure dp qos\n");
46+
} else {
3247
ok = true;
3348
}
49+
3450
return ok;
3551
}
3652

srcCxx/shape_configurator_rti_connext_micro.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static bool config_micro()
115115
goto done;
116116
}
117117

118-
udp_property->max_message_size = 64 * 1024; //64KB
118+
udp_property->max_message_size = 65504;
119119

120120
if (!registry->register_component(
121121
NETIO_DEFAULT_UDP_NAME,

srcCxx/shape_main.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,16 @@ class ShapeApplication {
12091209
DDS::DomainParticipantQos dp_qos;
12101210
dpf->get_default_participant_qos(dp_qos);
12111211

1212+
#if defined(RTI_CONNEXT_DDS) || defined(RTI_CONNEXT_MICRO)
1213+
if (!configure_dp_qos(dp_qos)) {
1214+
return false;
1215+
}
1216+
#endif
1217+
1218+
#ifdef RTI_CONNEXT_DDS
1219+
configure_participant_announcements_period(dp_qos, options->periodic_announcement_period_us);
1220+
#endif
1221+
12121222
if (options->datafrag_size > 0) {
12131223
bool result = false;
12141224
#if defined(RTI_CONNEXT_DDS)
@@ -1227,16 +1237,6 @@ class ShapeApplication {
12271237
}
12281238
}
12291239

1230-
#ifdef RTI_CONNEXT_MICRO
1231-
if (!configure_dp_qos(dp_qos)) {
1232-
return false;
1233-
}
1234-
#endif
1235-
1236-
#ifdef RTI_CONNEXT_DDS
1237-
configure_participant_announcements_period(dp_qos, options->periodic_announcement_period_us);
1238-
#endif
1239-
12401240
dp = dpf->create_participant( options->domain_id, dp_qos, &dp_listener, LISTENER_STATUS_MASK_ALL );
12411241
if (dp == NULL) {
12421242
logger.log_message("failed to create participant (missing license?).", Verbosity::ERROR);

0 commit comments

Comments
 (0)