15 #ifndef RCLCPP__PARAMETER_VALUE_HPP_ 16 #define RCLCPP__PARAMETER_VALUE_HPP_ 25 #include "rcl_interfaces/msg/parameter_type.hpp" 26 #include "rcl_interfaces/msg/parameter_value.hpp" 79 explicit ParameterValue(
const rcl_interfaces::msg::ParameterValue & value);
82 explicit ParameterValue(
const bool bool_value);
85 explicit ParameterValue(
const int int_value);
88 explicit ParameterValue(
const int64_t int_value);
91 explicit ParameterValue(
const float double_value);
94 explicit ParameterValue(
const double double_value);
97 explicit ParameterValue(
const std::string & string_value);
100 explicit ParameterValue(
const char * string_value);
130 rcl_interfaces::msg::ParameterValue
131 to_value_msg()
const;
136 operator==(
const ParameterValue & rhs)
const;
141 operator!=(
const ParameterValue & rhs)
const;
145 template<ParameterType type>
153 return value_.bool_value;
156 template<ParameterType type>
164 return value_.integer_value;
167 template<ParameterType type>
175 return value_.double_value;
178 template<ParameterType type>
186 return value_.string_value;
189 template<ParameterType type>
198 return value_.byte_array_value;
201 template<ParameterType type>
210 return value_.bool_array_value;
213 template<ParameterType type>
222 return value_.integer_array_value;
225 template<ParameterType type>
234 return value_.double_array_value;
237 template<ParameterType type>
246 return value_.string_array_value;
251 template<
typename type>
256 return get<ParameterType::PARAMETER_BOOL>();
259 template<
typename type>
265 return get<ParameterType::PARAMETER_INTEGER>();
268 template<
typename type>
273 return get<ParameterType::PARAMETER_DOUBLE>();
276 template<
typename type>
281 return get<ParameterType::PARAMETER_STRING>();
284 template<
typename type>
291 return get<ParameterType::PARAMETER_BYTE_ARRAY>();
294 template<
typename type>
301 return get<ParameterType::PARAMETER_BOOL_ARRAY>();
304 template<
typename type>
311 return get<ParameterType::PARAMETER_INTEGER_ARRAY>();
314 template<
typename type>
321 return get<ParameterType::PARAMETER_DOUBLE_ARRAY>();
324 template<
typename type>
331 return get<ParameterType::PARAMETER_STRING_ARRAY>();
335 rcl_interfaces::msg::ParameterValue value_;
345 #endif // RCLCPP__PARAMETER_VALUE_HPP_ Definition: parameter_value.hpp:34
Definition: parameter_value.hpp:41
Definition: parameter_value.hpp:43
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
Definition: parameter_value.hpp:42
Definition: parameter_value.hpp:36
std::string to_string(ParameterType type)
Return the name of a parameter type.
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
ParameterTypeException(ParameterType expected, ParameterType actual)
Construct an instance.
Definition: parameter_value.hpp:65
ParameterType
Definition: parameter_value.hpp:32
Definition: parameter_value.hpp:40
Indicate the parameter type does not match the expected type.
Definition: parameter_value.hpp:56
Store the type and value of a parameter.
Definition: parameter_value.hpp:71
std::ostream & operator<<(std::ostream &os, const rclcpp::Parameter &pv)
Definition: parameter_value.hpp:37
Definition: parameter_value.hpp:35
Definition: parameter_value.hpp:38
Definition: parameter_value.hpp:39