Skip to content

Commit

Permalink
Update branch dashing to support Dashing only (#17)
Browse files Browse the repository at this point in the history
* Remove all feature flags and support Dashing only

Signed-off-by: Andrea Sorbini <[email protected]>
  • Loading branch information
asorbini authored Mar 29, 2021
1 parent ffd4c73 commit 7f34843
Show file tree
Hide file tree
Showing 59 changed files with 3,644 additions and 2,823 deletions.
8 changes: 1 addition & 7 deletions rmw_connextdds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
target_link_libraries(${PROJECT_NAME}
rmw_connextdds_common::rmw_connextdds_common_pro)

# Unless we need to link the rmw_dds_common shim library generated
# by rmw_connextdds_common (produced if RMW_CONNEXT_PROVIDE_RMW_DDS_COMMON)
# we don't need to call ament_target_dependencies() since we are already
# linking library rmw_connextdds_common_pro above.
if(RMW_CONNEXT_PROVIDE_RMW_DDS_COMMON)
ament_target_dependencies(${PROJECT_NAME} rmw_connextdds_common)
endif()
ament_target_dependencies(${PROJECT_NAME} rmw_connextdds_common)

configure_rmw_library(${PROJECT_NAME})

Expand Down
158 changes: 10 additions & 148 deletions rmw_connextdds/src/rmw_api_impl_ndds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,40 +287,12 @@ rmw_node_t *
rmw_create_node(
rmw_context_t * context,
const char * name,
const char * ns
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_DASHING
,
const char * ns,
size_t domain_id,
const rmw_node_security_options_t * security_options
#elif RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
,
size_t domain_id,
const rmw_node_security_options_t * security_options,
bool localhost_only
#elif RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_FOXY
,
size_t domain_id,
bool localhost_only
#endif /* RMW_CONNEXT_RELEASE */
)
const rmw_node_security_options_t * security_options)
{
return rmw_api_connextdds_create_node(
context, name, ns
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_DASHING
,
domain_id,
security_options
#elif RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
,
domain_id,
security_options,
localhost_only
#elif RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_FOXY
,
domain_id,
localhost_only
#endif /* RMW_CONNEXT_RELEASE */
);
context, name, ns, domain_id, security_options);
}


Expand All @@ -337,14 +309,11 @@ rmw_node_get_graph_guard_condition(const rmw_node_t * rmw_node)
return rmw_api_connextdds_node_get_graph_guard_condition(rmw_node);
}

#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT

rmw_ret_t
rmw_node_assert_liveliness(const rmw_node_t * node)
{
return rmw_api_connextdds_node_assert_liveliness(node);
}
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */

/*****************************************************************************
* Publication API
Expand Down Expand Up @@ -385,21 +354,11 @@ rmw_publish_loaned_message(
rmw_ret_t
rmw_init_publisher_allocation(
const rosidl_message_type_support_t * type_support,
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
const rosidl_message_bounds_t * message_bounds,
#else
const rosidl_runtime_c__Sequence__bound * message_bounds,
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
rmw_publisher_allocation_t * allocation)
{
return rmw_api_connextdds_init_publisher_allocation(
type_support,
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
message_bounds,
#else
message_bounds,
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
allocation);
type_support, message_bounds, allocation);
}


Expand All @@ -416,19 +375,10 @@ rmw_create_publisher(
const rmw_node_t * node,
const rosidl_message_type_support_t * type_supports,
const char * topic_name,
const rmw_qos_profile_t * qos_policies
#if RMW_CONNEXT_HAVE_OPTIONS_PUBSUB
,
const rmw_publisher_options_t * publisher_options
#endif /* RMW_CONNEXT_HAVE_OPTIONS_PUBSUB */
)
const rmw_qos_profile_t * qos_policies)
{
return rmw_api_connextdds_create_publisher(
node, type_supports, topic_name, qos_policies
#if RMW_CONNEXT_HAVE_OPTIONS_PUBSUB
, publisher_options
#endif /* RMW_CONNEXT_HAVE_OPTIONS_PUBSUB */
);
node, type_supports, topic_name, qos_policies);
}


Expand Down Expand Up @@ -518,21 +468,11 @@ rmw_destroy_publisher(
rmw_ret_t
rmw_get_serialized_message_size(
const rosidl_message_type_support_t * type_supports,
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
const rosidl_message_bounds_t * message_bounds,
#else
const rosidl_runtime_c__Sequence__bound * message_bounds,
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
size_t * size)
{
return rmw_api_connextdds_get_serialized_message_size(
type_supports,
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
message_bounds,
#else
message_bounds,
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
size);
type_supports, message_bounds, size);
}


Expand Down Expand Up @@ -564,21 +504,13 @@ rmw_deserialize(
rmw_ret_t
rmw_take_response(
const rmw_client_t * client,
#if RMW_CONNEXT_HAVE_SERVICE_INFO
rmw_service_info_t * request_header,
#else
rmw_request_id_t * request_header,
#endif /* RMW_CONNEXT_HAVE_SERVICE_INFO */
void * ros_response,
bool * taken)
{
return rmw_api_connextdds_take_response(
client,
#if RMW_CONNEXT_HAVE_SERVICE_INFO
request_header,
#else
request_header,
#endif /* RMW_CONNEXT_HAVE_SERVICE_INFO */
ros_response,
taken);
}
Expand All @@ -587,21 +519,13 @@ rmw_take_response(
rmw_ret_t
rmw_take_request(
const rmw_service_t * service,
#if RMW_CONNEXT_HAVE_SERVICE_INFO
rmw_service_info_t * request_header,
#else
rmw_request_id_t * request_header,
#endif /* RMW_CONNEXT_HAVE_SERVICE_INFO */
void * ros_request,
bool * taken)
{
return rmw_api_connextdds_take_request(
service,
#if RMW_CONNEXT_HAVE_SERVICE_INFO
request_header,
#else
request_header,
#endif /* RMW_CONNEXT_HAVE_SERVICE_INFO */
ros_request,
taken);
}
Expand Down Expand Up @@ -674,21 +598,11 @@ rmw_destroy_service(
rmw_ret_t
rmw_init_subscription_allocation(
const rosidl_message_type_support_t * type_support,
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
const rosidl_message_bounds_t * message_bounds,
#else
const rosidl_runtime_c__Sequence__bound * message_bounds,
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
rmw_subscription_allocation_t * allocation)
{
return rmw_api_connextdds_init_subscription_allocation(
type_support,
#if RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT
message_bounds,
#else
message_bounds,
#endif /* RMW_CONNEXT_RELEASE <= RMW_CONNEXT_RELEASE_ELOQUENT */
allocation);
type_support, message_bounds, allocation);
}


Expand All @@ -706,21 +620,10 @@ rmw_create_subscription(
const rosidl_message_type_support_t * type_supports,
const char * topic_name,
const rmw_qos_profile_t * qos_policies,
#if RMW_CONNEXT_HAVE_OPTIONS_PUBSUB
const rmw_subscription_options_t * subscription_options
#else
bool ignore_local_publications
#endif /* RMW_CONNEXT_HAVE_OPTIONS_PUBSUB */
)
bool ignore_local_publications)
{
return rmw_api_connextdds_create_subscription(
node, type_supports, topic_name, qos_policies,
#if RMW_CONNEXT_HAVE_OPTIONS_PUBSUB
subscription_options
#else
ignore_local_publications
#endif /* RMW_CONNEXT_HAVE_OPTIONS_PUBSUB */
);
node, type_supports, topic_name, qos_policies, ignore_local_publications);
}


Expand Down Expand Up @@ -775,25 +678,6 @@ rmw_take_with_info(
subscription, ros_message, taken, message_info, allocation);
}

#if RMW_CONNEXT_HAVE_TAKE_SEQ

rmw_ret_t
rmw_take_sequence(
const rmw_subscription_t * subscription,
size_t count,
rmw_message_sequence_t * message_sequence,
rmw_message_info_sequence_t * message_info_sequence,
size_t * taken,
rmw_subscription_allocation_t * allocation)
{
return rmw_api_connextdds_take_sequence(
subscription, count, message_sequence, message_info_sequence,
taken, allocation);
}

#endif /* RMW_CONNEXT_HAVE_TAKE_SEQ */


rmw_ret_t
rmw_take_serialized_message(
const rmw_subscription_t * subscription,
Expand Down Expand Up @@ -910,25 +794,3 @@ rmw_wait(
return rmw_api_connextdds_wait(
subs, gcs, srvs, cls, evs, wait_set, wait_timeout);
}


/******************************************************************************
* QoS Profile functions
******************************************************************************/
#if RMW_CONNEXT_HAVE_QOS_PROFILE_API
rmw_ret_t
rmw_qos_profile_check_compatible(
const rmw_qos_profile_t publisher_profile,
const rmw_qos_profile_t subscription_profile,
rmw_qos_compatibility_type_t * compatibility,
char * reason,
size_t reason_size)
{
return rmw_api_connextdds_qos_profile_check_compatible(
publisher_profile,
subscription_profile,
compatibility,
reason,
reason_size);
}
#endif /* RMW_CONNEXT_HAVE_QOS_PROFILE_API */
Loading

0 comments on commit 7f34843

Please sign in to comment.