ROS 2 rclcpp + rcl - jazzy  jazzy
ROS 2 C++ Client Library with ROS Client Library
parameter_service.hpp
1 // Copyright 2015 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef RCLCPP__PARAMETER_SERVICE_HPP_
16 #define RCLCPP__PARAMETER_SERVICE_HPP_
17 
18 #include <memory>
19 #include <string>
20 
21 #include "rcl_interfaces/srv/describe_parameters.hpp"
22 #include "rcl_interfaces/srv/get_parameter_types.hpp"
23 #include "rcl_interfaces/srv/get_parameters.hpp"
24 #include "rcl_interfaces/srv/list_parameters.hpp"
25 #include "rcl_interfaces/srv/set_parameters.hpp"
26 #include "rcl_interfaces/srv/set_parameters_atomically.hpp"
27 #include "rclcpp/executors.hpp"
28 #include "rclcpp/macros.hpp"
29 #include "rclcpp/node.hpp"
30 #include "rclcpp/parameter.hpp"
31 #include "rclcpp/qos.hpp"
32 #include "rclcpp/visibility_control.hpp"
33 #include "rmw/rmw.h"
34 
35 namespace rclcpp
36 {
37 
39 {
40 public:
41  RCLCPP_SMART_PTR_DEFINITIONS(ParameterService)
42 
43  [[deprecated("use rclcpp::QoS instead of rmw_qos_profile_t")]]
44  RCLCPP_PUBLIC
46  const std::shared_ptr<node_interfaces::NodeBaseInterface> node_base,
47  const std::shared_ptr<node_interfaces::NodeServicesInterface> node_services,
49  const rmw_qos_profile_t & qos_profile)
51  node_base,
52  node_services,
53  node_params,
55  {}
56 
57  RCLCPP_PUBLIC
59  const std::shared_ptr<node_interfaces::NodeBaseInterface> node_base,
60  const std::shared_ptr<node_interfaces::NodeServicesInterface> node_services,
62  const rclcpp::QoS & qos_profile = rclcpp::ParametersQoS());
63 
64 private:
67  get_parameter_types_service_;
70  set_parameters_atomically_service_;
72  describe_parameters_service_;
74 };
75 
76 } // namespace rclcpp
77 
78 #endif // RCLCPP__PARAMETER_SERVICE_HPP_
Encapsulation of Quality of Service settings.
Definition: qos.hpp:116
Pure virtual interface class for the NodeParameters part of the Node API.
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
static QoSInitialization from_rmw(const rmw_qos_profile_t &rmw_qos)
Create a QoSInitialization from an existing rmw_qos_profile_t, using its history and depth.
Definition: qos.cpp:63