rclcpp
master
C++ ROS Client Library API
|
Structure to store an arbitrary parameter with templated get/set methods. More...
#include <parameter.hpp>
Public Member Functions | |
Parameter () | |
Construct with an empty name and a parameter value of type rclcpp::PARAMETER_NOT_SET. More... | |
Parameter (const std::string &name) | |
Construct with given name and a parameter value of type rclcpp::PARAMETER_NOT_SET. More... | |
Parameter (const std::string &name, const ParameterValue &value) | |
Construct with given name and given parameter value. More... | |
template<typename ValueTypeT > | |
Parameter (const std::string &name, ValueTypeT value) | |
Construct with given name and given parameter value. More... | |
Parameter (const rclcpp::node_interfaces::ParameterInfo ¶meter_info) | |
bool | operator== (const Parameter &rhs) const |
Equal operator. More... | |
bool | operator!= (const Parameter &rhs) const |
Not equal operator. More... | |
ParameterType | get_type () const |
std::string | get_type_name () const |
const std::string & | get_name () const |
rcl_interfaces::msg::ParameterValue | get_value_message () const |
const rclcpp::ParameterValue & | get_parameter_value () const |
Get the internal storage for the parameter value. More... | |
template<ParameterType ParamT> | |
decltype(auto) | get_value () const |
Get value of parameter using rclcpp::ParameterType as template argument. More... | |
template<typename T > | |
decltype(auto) | get_value () const |
Get value of parameter using c++ types as template argument. More... | |
bool | as_bool () const |
int64_t | as_int () const |
double | as_double () const |
const std::string & | as_string () const |
const std::vector< uint8_t > & | as_byte_array () const |
const std::vector< bool > & | as_bool_array () const |
const std::vector< int64_t > & | as_integer_array () const |
const std::vector< double > & | as_double_array () const |
const std::vector< std::string > & | as_string_array () const |
rcl_interfaces::msg::Parameter | to_parameter_msg () const |
std::string | value_to_string () const |
Static Public Member Functions | |
static Parameter | from_parameter_msg (const rcl_interfaces::msg::Parameter ¶meter) |
Structure to store an arbitrary parameter with templated get/set methods.
rclcpp::Parameter::Parameter | ( | ) |
Construct with an empty name and a parameter value of type rclcpp::PARAMETER_NOT_SET.
|
explicit |
Construct with given name and a parameter value of type rclcpp::PARAMETER_NOT_SET.
rclcpp::Parameter::Parameter | ( | const std::string & | name, |
const ParameterValue & | value | ||
) |
Construct with given name and given parameter value.
|
inline |
Construct with given name and given parameter value.
|
explicit |
bool rclcpp::Parameter::operator== | ( | const Parameter & | rhs | ) | const |
Equal operator.
bool rclcpp::Parameter::operator!= | ( | const Parameter & | rhs | ) | const |
Not equal operator.
ParameterType rclcpp::Parameter::get_type | ( | ) | const |
std::string rclcpp::Parameter::get_type_name | ( | ) | const |
const std::string& rclcpp::Parameter::get_name | ( | ) | const |
rcl_interfaces::msg::ParameterValue rclcpp::Parameter::get_value_message | ( | ) | const |
const rclcpp::ParameterValue& rclcpp::Parameter::get_parameter_value | ( | ) | const |
Get the internal storage for the parameter value.
|
inline |
Get value of parameter using rclcpp::ParameterType as template argument.
decltype(auto) rclcpp::Parameter::get_value | ( | ) | const |
Get value of parameter using c++ types as template argument.
bool rclcpp::Parameter::as_bool | ( | ) | const |
int64_t rclcpp::Parameter::as_int | ( | ) | const |
double rclcpp::Parameter::as_double | ( | ) | const |
const std::string& rclcpp::Parameter::as_string | ( | ) | const |
const std::vector<uint8_t>& rclcpp::Parameter::as_byte_array | ( | ) | const |
const std::vector<bool>& rclcpp::Parameter::as_bool_array | ( | ) | const |
const std::vector<int64_t>& rclcpp::Parameter::as_integer_array | ( | ) | const |
const std::vector<double>& rclcpp::Parameter::as_double_array | ( | ) | const |
const std::vector<std::string>& rclcpp::Parameter::as_string_array | ( | ) | const |
|
static |
rcl_interfaces::msg::Parameter rclcpp::Parameter::to_parameter_msg | ( | ) | const |
std::string rclcpp::Parameter::value_to_string | ( | ) | const |