Skip to content

Commit

Permalink
Further changes after rebasing with master
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
  • Loading branch information
ivanpauno committed Nov 20, 2019
1 parent c9cb7f0 commit 59b1bcb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/publisher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ create_publisher(
const rosidl_message_type_support_t * type_supports,
const char * topic_name,
const rmw_qos_profile_t * qos_policies,
const rmw_publisher_options_t * publisher_options,
bool keyed,
bool create_publisher_listener);

Expand Down
4 changes: 3 additions & 1 deletion rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/subscription.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#define RMW_FASTRTPS_CPP__SUBSCRIPTION_HPP_

#include "rmw/rmw.h"
#include "rmw/subscription_options.h"

#include "rmw_fastrtps_shared_cpp/custom_participant_info.hpp"

namespace rmw_fastrtps_cpp
Expand All @@ -27,7 +29,7 @@ create_subscription(
const rosidl_message_type_support_t * type_supports,
const char * topic_name,
const rmw_qos_profile_t * qos_policies,
bool ignore_local_publications,
const rmw_subscription_options_t * subscription_options,
bool keyed,
bool create_subscription_listener);

Expand Down
8 changes: 7 additions & 1 deletion rmw_fastrtps_cpp/src/rmw_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "rmw/impl/cpp/macros.hpp"
#include "rmw/init.h"
#include "rmw/init_options.h"
#include "rmw/publisher_options.h"
#include "rmw/rmw.h"

#include "rmw_dds_common/context.hpp"
Expand Down Expand Up @@ -95,10 +96,14 @@ rmw_init(const rmw_init_options_t * options, rmw_context_t * context)
rmw_dds_common::Context * common_context = nullptr;
CustomParticipantInfo * participant_info = nullptr;
rmw_publisher_t * publisher = nullptr;
rmw_publisher_options_t publisher_options = rmw_get_default_publisher_options();
rmw_ret_t ret = RMW_RET_OK;
rmw_subscription_t * subscription = nullptr;
rmw_subscription_options_t subscription_options = rmw_get_default_subscription_options();
rmw_qos_profile_t qos = rmw_qos_profile_default;

subscription_options.ignore_local_publications = true; // This is currently not implemented in fastrtps

RCUTILS_CHECK_ARGUMENT_FOR_NULL(options, RMW_RET_INVALID_ARGUMENT);
RCUTILS_CHECK_ARGUMENT_FOR_NULL(context, RMW_RET_INVALID_ARGUMENT);
RMW_CHECK_TYPE_IDENTIFIERS_MATCH(
Expand Down Expand Up @@ -149,6 +154,7 @@ rmw_init(const rmw_init_options_t * options, rmw_context_t * context)
rosidl_typesupport_cpp::get_message_type_support_handle<ParticipantEntitiesInfo>(),
"_participant_info",
&qos,
&publisher_options,
false, // our fastrtps typesupport doesn't support keyed topics
true); // don't create a publisher listener
if (nullptr == publisher) {
Expand All @@ -161,7 +167,7 @@ rmw_init(const rmw_init_options_t * options, rmw_context_t * context)
rosidl_typesupport_cpp::get_message_type_support_handle<ParticipantEntitiesInfo>(),
"_participant_info",
&qos,
true, // ignore_local_publications, currently not implemented
&subscription_options,
false, // our fastrtps typesupport doesn't support keyed topics
true); // don't create a subscriber listener
if (nullptr == subscription) {
Expand Down
3 changes: 3 additions & 0 deletions rmw_fastrtps_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ rmw_create_node(
const rmw_security_options_t * security_options,
bool localhost_only)
{
(void)domain_id;
(void)security_options;
(void)localhost_only;
RCUTILS_CHECK_ARGUMENT_FOR_NULL(context, NULL);
RMW_CHECK_TYPE_IDENTIFIERS_MATCH(
init context,
Expand Down

0 comments on commit 59b1bcb

Please sign in to comment.