Class ParameterValue
Defined in File parameter_value.hpp
Class Documentation
-
class ParameterValue
Store the type and value of a parameter.
Public Functions
-
ParameterValue()
Construct a parameter value with type PARAMETER_NOT_SET.
-
explicit ParameterValue(const rcl_interfaces::msg::ParameterValue &value)
Construct a parameter value from a message.
-
explicit ParameterValue(const bool bool_value)
Construct a parameter value with type PARAMETER_BOOL.
-
explicit ParameterValue(const int int_value)
Construct a parameter value with type PARAMETER_INTEGER.
-
explicit ParameterValue(const int64_t int_value)
Construct a parameter value with type PARAMETER_INTEGER.
-
explicit ParameterValue(const float double_value)
Construct a parameter value with type PARAMETER_DOUBLE.
-
explicit ParameterValue(const double double_value)
Construct a parameter value with type PARAMETER_DOUBLE.
-
explicit ParameterValue(const std::string &string_value)
Construct a parameter value with type PARAMETER_STRING.
-
explicit ParameterValue(const char *string_value)
Construct a parameter value with type PARAMETER_STRING.
-
explicit ParameterValue(const std::vector<uint8_t> &byte_array_value)
Construct a parameter value with type PARAMETER_BYTE_ARRAY.
-
explicit ParameterValue(const std::vector<bool> &bool_array_value)
Construct a parameter value with type PARAMETER_BOOL_ARRAY.
-
explicit ParameterValue(const std::vector<int> &int_array_value)
Construct a parameter value with type PARAMETER_INTEGER_ARRAY.
-
explicit ParameterValue(const std::vector<int64_t> &int_array_value)
Construct a parameter value with type PARAMETER_INTEGER_ARRAY.
-
explicit ParameterValue(const std::vector<float> &double_array_value)
Construct a parameter value with type PARAMETER_DOUBLE_ARRAY.
-
explicit ParameterValue(const std::vector<double> &double_array_value)
Construct a parameter value with type PARAMETER_DOUBLE_ARRAY.
-
explicit ParameterValue(const std::vector<std::string> &string_array_value)
Construct a parameter value with type PARAMETER_STRING_ARRAY.
-
ParameterType get_type() const
Return an enum indicating the type of the set value.
-
rcl_interfaces::msg::ParameterValue to_value_msg() const
Return a message populated with the parameter value.
-
bool operator==(const ParameterValue &rhs) const
Equal operator.
-
bool operator!=(const ParameterValue &rhs) const
Not equal operator.
-
template<ParameterType type>
inline constexpr std::enable_if<type == ParameterType::PARAMETER_BOOL, constbool&>::type get() const
-
template<ParameterType type>
inline constexpr std::enable_if<type == ParameterType::PARAMETER_INTEGER, constint64_t&>::type get() const
-
template<ParameterType type>
inline constexpr std::enable_if<type == ParameterType::PARAMETER_DOUBLE, constdouble&>::type get() const
-
template<ParameterType type>
inline constexpr std::enable_if<type == ParameterType::PARAMETER_STRING, conststd::string&>::type get() const
-
template<ParameterType type>
inline constexpr std::enable_if<type == ParameterType::PARAMETER_BYTE_ARRAY, conststd::vector<uint8_t>&>::type get() const
-
template<ParameterType type>
inline constexpr std::enable_if<type == ParameterType::PARAMETER_BOOL_ARRAY, conststd::vector<bool>&>::type get() const
-
template<ParameterType type>
inline constexpr std::enable_if<type == ParameterType::PARAMETER_INTEGER_ARRAY, conststd::vector<int64_t>&>::type get() const
-
template<ParameterType type>
inline constexpr std::enable_if<type == ParameterType::PARAMETER_DOUBLE_ARRAY, conststd::vector<double>&>::type get() const
-
template<ParameterType type>
inline constexpr std::enable_if<type == ParameterType::PARAMETER_STRING_ARRAY, conststd::vector<std::string>&>::type get() const
-
template<typename type>
inline constexpr std::enable_if<std::is_same<type, bool>::value, constbool&>::type get() const
-
template<typename type>
inline constexpr std::enable_if<std::is_integral<type>::value && !std::is_same<type, bool>::value, constint64_t&>::type get() const
-
template<typename type>
inline constexpr std::enable_if<std::is_floating_point<type>::value, constdouble&>::type get() const
-
template<typename type>
inline constexpr std::enable_if<std::is_convertible<type, std::string>::value, conststd::string&>::type get() const
-
template<typename type>
inline constexpr std::enable_if<std::is_convertible<type, conststd::vector<uint8_t>&>::value, conststd::vector<uint8_t>&>::type get() const
-
template<typename type>
inline constexpr std::enable_if<std::is_convertible<type, conststd::vector<bool>&>::value, conststd::vector<bool>&>::type get() const
-
template<typename type>
inline constexpr std::enable_if<std::is_convertible<type, conststd::vector<int>&>::value, conststd::vector<int64_t>&>::type get() const
-
template<typename type>
inline constexpr std::enable_if<std::is_convertible<type, conststd::vector<int64_t>&>::value, conststd::vector<int64_t>&>::type get() const
-
template<typename type>
inline constexpr std::enable_if<std::is_convertible<type, conststd::vector<float>&>::value, conststd::vector<double>&>::type get() const
-
ParameterValue()