Merge pull request #133 from ros2/optional-qos-profile

Made rmw_qos_profile argument optional
This commit is contained in:
Esteve Fernandez 2015-10-19 14:37:20 -07:00
commit ad609d79d4
3 changed files with 7 additions and 6 deletions

View file

@ -112,13 +112,14 @@ public:
template<typename MessageT>
typename rclcpp::publisher::Publisher<MessageT>::SharedPtr
create_publisher(
const std::string & topic_name, const rmw_qos_profile_t & qos_profile);
const std::string & topic_name,
const rmw_qos_profile_t & qos_profile = rmw_qos_profile_default);
/// Create and return a Subscription.
/**
* \param[in] topic_name The topic to subscribe on.
* \param[in] qos_profile The quality of service profile to pass on to the rmw implementation.
* \param[in] callback The user-defined callback function.
* \param[in] qos_profile The quality of service profile to pass on to the rmw implementation.
* \param[in] group The callback group for this subscription. NULL for no callback group.
* \param[in] ignore_local_publications True to ignore local publications.
* \param[in] msg_mem_strat The message memory strategy to use for allocating messages.
@ -132,8 +133,8 @@ public:
typename rclcpp::subscription::Subscription<MessageT>::SharedPtr
create_subscription(
const std::string & topic_name,
const rmw_qos_profile_t & qos_profile,
CallbackT callback,
const rmw_qos_profile_t & qos_profile = rmw_qos_profile_default,
rclcpp::callback_group::CallbackGroup::SharedPtr group = nullptr,
bool ignore_local_publications = false,
typename rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT>::SharedPtr

View file

@ -209,8 +209,8 @@ template<typename MessageT, typename CallbackT>
typename rclcpp::subscription::Subscription<MessageT>::SharedPtr
Node::create_subscription(
const std::string & topic_name,
const rmw_qos_profile_t & qos_profile,
CallbackT callback,
const rmw_qos_profile_t & qos_profile,
rclcpp::callback_group::CallbackGroup::SharedPtr group,
bool ignore_local_publications,
typename rclcpp::message_memory_strategy::MessageMemoryStrategy<MessageT>::SharedPtr
@ -321,8 +321,8 @@ Node::create_subscription(
qos.depth = qos_history_depth;
return this->create_subscription<MessageT, CallbackT>(
topic_name,
qos,
callback,
qos,
group,
ignore_local_publications,
msg_mem_strat);

View file

@ -232,7 +232,7 @@ public:
on_parameter_event(FunctorT callback)
{
return node_->create_subscription<rcl_interfaces::msg::ParameterEvent>(
"parameter_events", rmw_qos_profile_parameter_events, callback);
"parameter_events", callback, rmw_qos_profile_parameter_events);
}
private: