Skip to content

Commit 7f34843

Browse files
authored
Update branch dashing to support Dashing only (#17)
* Remove all feature flags and support Dashing only Signed-off-by: Andrea Sorbini <[email protected]>
1 parent ffd4c73 commit 7f34843

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3644
-2823
lines changed

rmw_connextdds/CMakeLists.txt

+1-7
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
4747
target_link_libraries(${PROJECT_NAME}
4848
rmw_connextdds_common::rmw_connextdds_common_pro)
4949

50-
# Unless we need to link the rmw_dds_common shim library generated
51-
# by rmw_connextdds_common (produced if RMW_CONNEXT_PROVIDE_RMW_DDS_COMMON)
52-
# we don't need to call ament_target_dependencies() since we are already
53-
# linking library rmw_connextdds_common_pro above.
54-
if(RMW_CONNEXT_PROVIDE_RMW_DDS_COMMON)
55-
ament_target_dependencies(${PROJECT_NAME} rmw_connextdds_common)
56-
endif()
50+
ament_target_dependencies(${PROJECT_NAME} rmw_connextdds_common)
5751

5852
configure_rmw_library(${PROJECT_NAME})
5953

rmw_connextdds/src/rmw_api_impl_ndds.cpp

+10-148
Original file line numberDiff line numberDiff line change
@@ -287,40 +287,12 @@ rmw_node_t *
287287
rmw_create_node(
288288
rmw_context_t * context,
289289
const char * name,
290-
const char * ns
291-
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_DASHING
292-
,
290+
const char * ns,
293291
size_t domain_id,
294-
const rmw_node_security_options_t * security_options
295-
#elif RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
296-
,
297-
size_t domain_id,
298-
const rmw_node_security_options_t * security_options,
299-
bool localhost_only
300-
#elif RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_FOXY
301-
,
302-
size_t domain_id,
303-
bool localhost_only
304-
#endif /* RMW_CONNEXT_RELEASE */
305-
)
292+
const rmw_node_security_options_t * security_options)
306293
{
307294
return rmw_api_connextdds_create_node(
308-
context, name, ns
309-
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_DASHING
310-
,
311-
domain_id,
312-
security_options
313-
#elif RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
314-
,
315-
domain_id,
316-
security_options,
317-
localhost_only
318-
#elif RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_FOXY
319-
,
320-
domain_id,
321-
localhost_only
322-
#endif /* RMW_CONNEXT_RELEASE */
323-
);
295+
context, name, ns, domain_id, security_options);
324296
}
325297

326298

@@ -337,14 +309,11 @@ rmw_node_get_graph_guard_condition(const rmw_node_t * rmw_node)
337309
return rmw_api_connextdds_node_get_graph_guard_condition(rmw_node);
338310
}
339311

340-
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
341-
342312
rmw_ret_t
343313
rmw_node_assert_liveliness(const rmw_node_t * node)
344314
{
345315
return rmw_api_connextdds_node_assert_liveliness(node);
346316
}
347-
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
348317

349318
/*****************************************************************************
350319
* Publication API
@@ -385,21 +354,11 @@ rmw_publish_loaned_message(
385354
rmw_ret_t
386355
rmw_init_publisher_allocation(
387356
const rosidl_message_type_support_t * type_support,
388-
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
389357
const rosidl_message_bounds_t * message_bounds,
390-
#else
391-
const rosidl_runtime_c__Sequence__bound * message_bounds,
392-
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
393358
rmw_publisher_allocation_t * allocation)
394359
{
395360
return rmw_api_connextdds_init_publisher_allocation(
396-
type_support,
397-
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
398-
message_bounds,
399-
#else
400-
message_bounds,
401-
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
402-
allocation);
361+
type_support, message_bounds, allocation);
403362
}
404363

405364

@@ -416,19 +375,10 @@ rmw_create_publisher(
416375
const rmw_node_t * node,
417376
const rosidl_message_type_support_t * type_supports,
418377
const char * topic_name,
419-
const rmw_qos_profile_t * qos_policies
420-
#if RMW_CONNEXT_HAVE_OPTIONS_PUBSUB
421-
,
422-
const rmw_publisher_options_t * publisher_options
423-
#endif /* RMW_CONNEXT_HAVE_OPTIONS_PUBSUB */
424-
)
378+
const rmw_qos_profile_t * qos_policies)
425379
{
426380
return rmw_api_connextdds_create_publisher(
427-
node, type_supports, topic_name, qos_policies
428-
#if RMW_CONNEXT_HAVE_OPTIONS_PUBSUB
429-
, publisher_options
430-
#endif /* RMW_CONNEXT_HAVE_OPTIONS_PUBSUB */
431-
);
381+
node, type_supports, topic_name, qos_policies);
432382
}
433383

434384

@@ -518,21 +468,11 @@ rmw_destroy_publisher(
518468
rmw_ret_t
519469
rmw_get_serialized_message_size(
520470
const rosidl_message_type_support_t * type_supports,
521-
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
522471
const rosidl_message_bounds_t * message_bounds,
523-
#else
524-
const rosidl_runtime_c__Sequence__bound * message_bounds,
525-
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
526472
size_t * size)
527473
{
528474
return rmw_api_connextdds_get_serialized_message_size(
529-
type_supports,
530-
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
531-
message_bounds,
532-
#else
533-
message_bounds,
534-
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
535-
size);
475+
type_supports, message_bounds, size);
536476
}
537477

538478

@@ -564,21 +504,13 @@ rmw_deserialize(
564504
rmw_ret_t
565505
rmw_take_response(
566506
const rmw_client_t * client,
567-
#if RMW_CONNEXT_HAVE_SERVICE_INFO
568-
rmw_service_info_t * request_header,
569-
#else
570507
rmw_request_id_t * request_header,
571-
#endif /* RMW_CONNEXT_HAVE_SERVICE_INFO */
572508
void * ros_response,
573509
bool * taken)
574510
{
575511
return rmw_api_connextdds_take_response(
576512
client,
577-
#if RMW_CONNEXT_HAVE_SERVICE_INFO
578-
request_header,
579-
#else
580513
request_header,
581-
#endif /* RMW_CONNEXT_HAVE_SERVICE_INFO */
582514
ros_response,
583515
taken);
584516
}
@@ -587,21 +519,13 @@ rmw_take_response(
587519
rmw_ret_t
588520
rmw_take_request(
589521
const rmw_service_t * service,
590-
#if RMW_CONNEXT_HAVE_SERVICE_INFO
591-
rmw_service_info_t * request_header,
592-
#else
593522
rmw_request_id_t * request_header,
594-
#endif /* RMW_CONNEXT_HAVE_SERVICE_INFO */
595523
void * ros_request,
596524
bool * taken)
597525
{
598526
return rmw_api_connextdds_take_request(
599527
service,
600-
#if RMW_CONNEXT_HAVE_SERVICE_INFO
601528
request_header,
602-
#else
603-
request_header,
604-
#endif /* RMW_CONNEXT_HAVE_SERVICE_INFO */
605529
ros_request,
606530
taken);
607531
}
@@ -674,21 +598,11 @@ rmw_destroy_service(
674598
rmw_ret_t
675599
rmw_init_subscription_allocation(
676600
const rosidl_message_type_support_t * type_support,
677-
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
678601
const rosidl_message_bounds_t * message_bounds,
679-
#else
680-
const rosidl_runtime_c__Sequence__bound * message_bounds,
681-
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
682602
rmw_subscription_allocation_t * allocation)
683603
{
684604
return rmw_api_connextdds_init_subscription_allocation(
685-
type_support,
686-
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
687-
message_bounds,
688-
#else
689-
message_bounds,
690-
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
691-
allocation);
605+
type_support, message_bounds, allocation);
692606
}
693607

694608

@@ -706,21 +620,10 @@ rmw_create_subscription(
706620
const rosidl_message_type_support_t * type_supports,
707621
const char * topic_name,
708622
const rmw_qos_profile_t * qos_policies,
709-
#if RMW_CONNEXT_HAVE_OPTIONS_PUBSUB
710-
const rmw_subscription_options_t * subscription_options
711-
#else
712-
bool ignore_local_publications
713-
#endif /* RMW_CONNEXT_HAVE_OPTIONS_PUBSUB */
714-
)
623+
bool ignore_local_publications)
715624
{
716625
return rmw_api_connextdds_create_subscription(
717-
node, type_supports, topic_name, qos_policies,
718-
#if RMW_CONNEXT_HAVE_OPTIONS_PUBSUB
719-
subscription_options
720-
#else
721-
ignore_local_publications
722-
#endif /* RMW_CONNEXT_HAVE_OPTIONS_PUBSUB */
723-
);
626+
node, type_supports, topic_name, qos_policies, ignore_local_publications);
724627
}
725628

726629

@@ -775,25 +678,6 @@ rmw_take_with_info(
775678
subscription, ros_message, taken, message_info, allocation);
776679
}
777680

778-
#if RMW_CONNEXT_HAVE_TAKE_SEQ
779-
780-
rmw_ret_t
781-
rmw_take_sequence(
782-
const rmw_subscription_t * subscription,
783-
size_t count,
784-
rmw_message_sequence_t * message_sequence,
785-
rmw_message_info_sequence_t * message_info_sequence,
786-
size_t * taken,
787-
rmw_subscription_allocation_t * allocation)
788-
{
789-
return rmw_api_connextdds_take_sequence(
790-
subscription, count, message_sequence, message_info_sequence,
791-
taken, allocation);
792-
}
793-
794-
#endif /* RMW_CONNEXT_HAVE_TAKE_SEQ */
795-
796-
797681
rmw_ret_t
798682
rmw_take_serialized_message(
799683
const rmw_subscription_t * subscription,
@@ -910,25 +794,3 @@ rmw_wait(
910794
return rmw_api_connextdds_wait(
911795
subs, gcs, srvs, cls, evs, wait_set, wait_timeout);
912796
}
913-
914-
915-
/******************************************************************************
916-
* QoS Profile functions
917-
******************************************************************************/
918-
#if RMW_CONNEXT_HAVE_QOS_PROFILE_API
919-
rmw_ret_t
920-
rmw_qos_profile_check_compatible(
921-
const rmw_qos_profile_t publisher_profile,
922-
const rmw_qos_profile_t subscription_profile,
923-
rmw_qos_compatibility_type_t * compatibility,
924-
char * reason,
925-
size_t reason_size)
926-
{
927-
return rmw_api_connextdds_qos_profile_check_compatible(
928-
publisher_profile,
929-
subscription_profile,
930-
compatibility,
931-
reason,
932-
reason_size);
933-
}
934-
#endif /* RMW_CONNEXT_HAVE_QOS_PROFILE_API */

0 commit comments

Comments
 (0)