File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 284284#define RMW_CONNEXT_FAST_ENDPOINT_DISCOVERY 1
285285#endif /* RMW_CONNEXT_FAST_ENDPOINT_DISCOVERY */
286286
287+ /* *****************************************************************************
288+ * Modify DomainParticipantQos to allow sharing of DDS entities created with
289+ * the Connext C API with applications using the C++11 API.
290+ ******************************************************************************/
291+ #ifndef RMW_CONNEXT_SHARE_DDS_ENTITIES_WITH_CPP
292+ #define RMW_CONNEXT_SHARE_DDS_ENTITIES_WITH_CPP 1
293+ #endif /* RMW_CONNEXT_SHARE_DDS_ENTITIES_WITH_CPP */
294+
287295/* *****************************************************************************
288296 * Override dds.transport.UDPv4.builtin.ignore_loopback_interface in
289297 * DomainParticipantQos to force communication over loopback (in addition to
Original file line number Diff line number Diff line change @@ -208,6 +208,20 @@ rmw_connextdds_initialize_participant_qos_impl(
208208 }
209209#endif /* RMW_CONNEXT_FAST_ENDPOINT_DISCOVERY */
210210
211+ #if RMW_CONNEXT_SHARE_DDS_ENTITIES_WITH_CPP
212+ // UserObjectQosPolicy is an internal, undocumented Connext policy used by the
213+ // implementations of different language bindings to control the memory
214+ // representations of various objects created by user applications. In this
215+ // case, the settings match the requirements of the "modern C++" API, and they
216+ // allow the DomainParticipant to be used directly by applications that want
217+ // to create new entities in C++11, even though the participant was created
218+ // using the C API. If these settings are not specified, an application will
219+ // receive a SIGSEGV when trying to create one of these entities.
220+ dp_qos->user_object .flow_controller_user_object .size = sizeof (void *);
221+ dp_qos->user_object .topic_user_object .size = sizeof (void *);
222+ dp_qos->user_object .content_filtered_topic_user_object .size = sizeof (void *);
223+ #endif /* RMW_CONNEXT_SHARE_DDS_ENTITIES_WITH_CPP */
224+
211225 return RMW_RET_OK;
212226}
213227
You can’t perform that action at this time.
0 commit comments