Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea Sorbini <[email protected]>
Signed-off-by: Chen Lihui <[email protected]>
  • Loading branch information
Chen Lihui and asorbini committed Mar 26, 2021
1 parent 587f349 commit a0de1bc
Show file tree
Hide file tree
Showing 5 changed files with 335 additions and 254 deletions.
12 changes: 12 additions & 0 deletions rmw_connextdds_common/include/rmw_connextdds/dds_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,18 @@ rmw_connextdds_enable_security(
rmw_context_impl_t * const ctx,
DDS_DomainParticipantQos * const qos);

rmw_ret_t
rmw_connextdds_set_cft_filter_expression(
DDS_TopicDescription * const topic_desc,
const char * filter_expression,
const rcutils_string_array_t * expression_parameters);

rmw_ret_t
rmw_connextdds_get_cft_filter_expression(
DDS_TopicDescription * const topic_desc,
char ** const expr_out,
rcutils_string_array_t * cft_params_out);

// Define some macro aliases for security-related properties
#ifndef DDS_SECURITY_PROPERTY_PREFIX
#define DDS_SECURITY_PROPERTY_PREFIX \
Expand Down
18 changes: 17 additions & 1 deletion rmw_connextdds_common/include/rmw_connextdds/rmw_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class RMW_Connext_Subscriber
const char * const cft_filter = nullptr);

rmw_ret_t
finalize();
finalize(const bool reset_cft = false);

DDS_DataReader *
reader() const
Expand Down Expand Up @@ -598,6 +598,7 @@ class RMW_Connext_Subscriber
const rmw_node_t * node;
std::string fqtopic_name;
rmw_qos_profile_t qos_policies;
rmw_subscription_options_t subscriber_options;

RMW_Connext_Subscriber(
rmw_context_impl_t * const ctx,
Expand All @@ -609,6 +610,21 @@ class RMW_Connext_Subscriber
DDS_TopicDescription * const dds_topic_cft,
const bool internal);

static
DDS_DataReader *
initialize_datareader(
rmw_context_impl_t * const ctx,
DDS_DomainParticipant * const dp,
DDS_Subscriber * const sub,
const std::string & fqtopic_name,
const rmw_qos_profile_t * const qos_policies,
RMW_Connext_MessageTypeSupport * const type_support,
#if RMW_CONNEXT_HAVE_OPTIONS_PUBSUB
const rmw_subscription_options_t * const subscriber_options,
#endif /* RMW_CONNEXT_HAVE_OPTIONS_PUBSUB */
const bool internal,
DDS_TopicDescription * sub_topic);

friend class RMW_Connext_SubscriberStatusCondition;
};

Expand Down
Loading

0 comments on commit a0de1bc

Please sign in to comment.