Struct ParameterArray

Inheritance Relationships

Base Type

  • public tuw_std_msgs::msg::ParameterArray

Struct Documentation

struct ParameterArray : public tuw_std_msgs::msg::ParameterArray

Public Functions

inline ParameterArray()
template<typename T>
inline ParameterArray(const std::vector<std::string> &names, const std::vector<T> &values)
template<typename T>
inline bool add(const std::string &name, const T &data)

searches in the array for a parameter name

Parameters:
  • name – name of the parameter

  • data – value to add

Returns:

false if it exited and it was set, true if was newly added

template<typename T>
inline bool add(const std::string &name, const T &data, int precision)

searches in the array for a parameter name

Parameters:
  • name – name of the parameter

  • data – value to add

  • precision – precision used

Returns:

false if it exited and it was set, true if was newly added

inline const Parameter *get(const std::string &name) const

searches in the array for a parameter name

See also

Parameters:

name – name of the parameter

Returns:

pointer to the parameter or null if it does not exist

inline Parameter *get(const std::string &name)
inline const Parameter &operator[](const std::string &name) const
inline Parameter &operator[](const std::string &name)
template<typename T>
inline T value(const std::string &name) const
template<typename T>
inline T value(const std::string &name)
template<typename T>
inline bool get(const std::string &name, T &des) const

used to read a parameter

Parameters:
  • name – name of the parameter

  • des – varaible to filled with the parameter if exists

Returns:

true if the parameter exists