ROS 2 rclcpp + rcl - humble  humble
ROS 2 C++ Client Library with ROS Client Library
parameter_map.hpp
1 // Copyright 2018 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_MAP_HPP_
16 #define RCLCPP__PARAMETER_MAP_HPP_
17 
18 #include <rcl_yaml_param_parser/parser.h>
19 #include <rcl_yaml_param_parser/types.h>
20 
21 #include <string>
22 #include <unordered_map>
23 #include <vector>
24 
25 #include "rclcpp/exceptions.hpp"
26 #include "rclcpp/parameter.hpp"
27 #include "rclcpp/parameter_value.hpp"
28 #include "rclcpp/visibility_control.hpp"
29 
30 namespace rclcpp
31 {
32 
34 using ParameterMap = std::unordered_map<std::string, std::vector<Parameter>>;
35 
40 RCLCPP_PUBLIC
42 parameter_map_from(const rcl_params_t * const c_params);
43 
50 RCLCPP_PUBLIC
52 parameter_map_from(const rcl_params_t * const c_params, const char * node_fqn);
53 
58 RCLCPP_PUBLIC
60 parameter_value_from(const rcl_variant_t * const c_value);
61 
66 RCLCPP_PUBLIC
68 parameter_map_from_yaml_file(const std::string & yaml_filename);
69 
70 } // namespace rclcpp
71 
72 #endif // RCLCPP__PARAMETER_MAP_HPP_
Store the type and value of a parameter.
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
RCLCPP_PUBLIC ParameterMap parameter_map_from_yaml_file(const std::string &yaml_filename)
RCLCPP_PUBLIC ParameterValue parameter_value_from(const rcl_variant_t *const c_value)
std::unordered_map< std::string, std::vector< Parameter > > ParameterMap
A map of fully qualified node names to a list of parameters.
RCLCPP_PUBLIC ParameterMap parameter_map_from(const rcl_params_t *const c_params)