15 #ifndef RCLCPP__PARAMETER_HPP_ 16 #define RCLCPP__PARAMETER_HPP_ 24 #include "rcl_interfaces/msg/parameter.hpp" 33 namespace node_interfaces
67 template<
typename ValueTypeT>
78 operator==(
const Parameter & rhs)
const;
83 operator!=(
const Parameter & rhs)
const;
91 get_type_name()
const;
98 rcl_interfaces::msg::ParameterValue
99 get_value_message()
const;
104 get_parameter_value()
const;
107 template<ParameterType ParamT>
111 return value_.get<ParamT>();
137 as_byte_array()
const;
141 as_bool_array()
const;
145 as_integer_array()
const;
149 as_double_array()
const;
153 as_string_array()
const;
157 from_parameter_msg(
const rcl_interfaces::msg::Parameter & parameter);
160 rcl_interfaces::msg::Parameter
161 to_parameter_msg()
const;
165 value_to_string()
const;
183 operator<<(std::ostream & os, const std::vector<Parameter> & parameters);
201 return parameter->get_parameter_value();
211 auto type_enforcing_lambda =
215 return type_enforcing_lambda();
225 return detail::get_value_helper<T>(
this);
245 #endif // RCLCPP__PARAMETER_HPP_ auto get_value_helper(const rclcpp::Parameter *parameter)
Definition: parameter.hpp:190
Structure to store an arbitrary parameter with templated get/set methods.
Definition: parameter.hpp:51
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
decltype(auto) get_value() const
Get value of parameter using rclcpp::ParameterType as template argument.
Definition: parameter.hpp:109
Definition: node_parameters.hpp:45
std::string to_string(ParameterType type)
Return the name of a parameter type.
Parameter(const std::string &name, ValueTypeT value)
Construct with given name and given parameter value.
Definition: parameter.hpp:68
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
ParameterType
Definition: parameter_value.hpp:32
const rclcpp::ParameterValue & get_parameter_value() const
Get the internal storage for the parameter value.
constexpr std::enable_if< type==ParameterType::PARAMETER_BOOL, const bool & >::type get() const
Definition: parameter_value.hpp:148
Store the type and value of a parameter.
Definition: parameter_value.hpp:71
std::ostream & operator<<(std::ostream &os, const rclcpp::Parameter &pv)
std::string _to_json_dict_entry(const Parameter ¶m)
Return a json encoded version of the parameter intended for a dict.