ROS 2 rclcpp + rcl - humble  humble
ROS 2 C++ Client Library with ROS Client Library
Public Types | Public Member Functions | List of all members
rclcpp::node_interfaces::NodeParametersInterface Class Referenceabstract

Pure virtual interface class for the NodeParameters part of the Node API. More...

#include <rclcpp/node_interfaces/node_parameters_interface.hpp>

Inheritance diagram for rclcpp::node_interfaces::NodeParametersInterface:
Inheritance graph
[legend]

Public Types

using OnParametersSetCallbackType = OnSetParametersCallbackHandle::OnParametersSetCallbackType
 

Public Member Functions

virtual RCLCPP_PUBLIC const rclcpp::ParameterValuedeclare_parameter (const std::string &name, const rclcpp::ParameterValue &default_value, const rcl_interfaces::msg::ParameterDescriptor &parameter_descriptor=rcl_interfaces::msg::ParameterDescriptor(), bool ignore_override=false)=0
 Declare and initialize a parameter. More...
 
virtual RCLCPP_PUBLIC const rclcpp::ParameterValuedeclare_parameter (const std::string &name, rclcpp::ParameterType type, const rcl_interfaces::msg::ParameterDescriptor &parameter_descriptor=rcl_interfaces::msg::ParameterDescriptor(), bool ignore_override=false)=0
 Declare a parameter. More...
 
virtual RCLCPP_PUBLIC void undeclare_parameter (const std::string &name)=0
 Undeclare a parameter. More...
 
virtual RCLCPP_PUBLIC bool has_parameter (const std::string &name) const =0
 Return true if the parameter has been declared, otherwise false. More...
 
virtual RCLCPP_PUBLIC std::vector< rcl_interfaces::msg::SetParametersResult > set_parameters (const std::vector< rclcpp::Parameter > &parameters)=0
 Set one or more parameters, one at a time. More...
 
virtual RCLCPP_PUBLIC rcl_interfaces::msg::SetParametersResult set_parameters_atomically (const std::vector< rclcpp::Parameter > &parameters)=0
 Set one or more parameters, all at once. More...
 
virtual RCLCPP_PUBLIC std::vector< rclcpp::Parameterget_parameters (const std::vector< std::string > &names) const =0
 Get descriptions of parameters given their names.
 
virtual RCLCPP_PUBLIC rclcpp::Parameter get_parameter (const std::string &name) const =0
 Get the description of one parameter given a name.
 
virtual RCLCPP_PUBLIC bool get_parameter (const std::string &name, rclcpp::Parameter &parameter) const =0
 Get the description of one parameter given a name.
 
virtual RCLCPP_PUBLIC bool get_parameters_by_prefix (const std::string &prefix, std::map< std::string, rclcpp::Parameter > &parameters) const =0
 Get all parameters that have the specified prefix into the parameters map.
 
virtual RCLCPP_PUBLIC std::vector< rcl_interfaces::msg::ParameterDescriptor > describe_parameters (const std::vector< std::string > &names) const =0
 
virtual RCLCPP_PUBLIC std::vector< uint8_t > get_parameter_types (const std::vector< std::string > &names) const =0
 
virtual RCLCPP_PUBLIC rcl_interfaces::msg::ListParametersResult list_parameters (const std::vector< std::string > &prefixes, uint64_t depth) const =0
 
virtual RCLCPP_PUBLIC OnSetParametersCallbackHandle::SharedPtr add_on_set_parameters_callback (OnParametersSetCallbackType callback)=0
 Add a callback for when parameters are being set. More...
 
virtual RCLCPP_PUBLIC void remove_on_set_parameters_callback (const OnSetParametersCallbackHandle *const handler)=0
 Remove a callback registered with add_on_set_parameters_callback. More...
 
virtual RCLCPP_PUBLIC const std::map< std::string, rclcpp::ParameterValue > & get_parameter_overrides () const =0
 Return the initial parameter values used by the NodeParameters to override default values.
 

Detailed Description

Pure virtual interface class for the NodeParameters part of the Node API.

Definition at line 49 of file node_parameters_interface.hpp.

Member Function Documentation

◆ add_on_set_parameters_callback()

virtual RCLCPP_PUBLIC OnSetParametersCallbackHandle::SharedPtr rclcpp::node_interfaces::NodeParametersInterface::add_on_set_parameters_callback ( OnParametersSetCallbackType  callback)
pure virtual

Add a callback for when parameters are being set.

See also
rclcpp::Node::add_on_set_parameters_callback

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ declare_parameter() [1/2]

virtual RCLCPP_PUBLIC const rclcpp::ParameterValue& rclcpp::node_interfaces::NodeParametersInterface::declare_parameter ( const std::string &  name,
const rclcpp::ParameterValue default_value,
const rcl_interfaces::msg::ParameterDescriptor &  parameter_descriptor = rcl_interfaces::msg::ParameterDescriptor(),
bool  ignore_override = false 
)
pure virtual

Declare and initialize a parameter.

See also
rclcpp::Node::declare_parameter

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ declare_parameter() [2/2]

virtual RCLCPP_PUBLIC const rclcpp::ParameterValue& rclcpp::node_interfaces::NodeParametersInterface::declare_parameter ( const std::string &  name,
rclcpp::ParameterType  type,
const rcl_interfaces::msg::ParameterDescriptor &  parameter_descriptor = rcl_interfaces::msg::ParameterDescriptor(),
bool  ignore_override = false 
)
pure virtual

Declare a parameter.

See also
rclcpp::Node::declare_parameter

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ has_parameter()

virtual RCLCPP_PUBLIC bool rclcpp::node_interfaces::NodeParametersInterface::has_parameter ( const std::string &  name) const
pure virtual

Return true if the parameter has been declared, otherwise false.

See also
rclcpp::Node::has_parameter

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ remove_on_set_parameters_callback()

virtual RCLCPP_PUBLIC void rclcpp::node_interfaces::NodeParametersInterface::remove_on_set_parameters_callback ( const OnSetParametersCallbackHandle *const  handler)
pure virtual

Remove a callback registered with add_on_set_parameters_callback.

See also
rclcpp::Node::remove_on_set_parameters_callback

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ set_parameters()

virtual RCLCPP_PUBLIC std::vector<rcl_interfaces::msg::SetParametersResult> rclcpp::node_interfaces::NodeParametersInterface::set_parameters ( const std::vector< rclcpp::Parameter > &  parameters)
pure virtual

Set one or more parameters, one at a time.

See also
rclcpp::Node::set_parameters

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ set_parameters_atomically()

virtual RCLCPP_PUBLIC rcl_interfaces::msg::SetParametersResult rclcpp::node_interfaces::NodeParametersInterface::set_parameters_atomically ( const std::vector< rclcpp::Parameter > &  parameters)
pure virtual

Set one or more parameters, all at once.

See also
rclcpp::Node::set_parameters_atomically

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ undeclare_parameter()

virtual RCLCPP_PUBLIC void rclcpp::node_interfaces::NodeParametersInterface::undeclare_parameter ( const std::string &  name)
pure virtual

Undeclare a parameter.

See also
rclcpp::Node::undeclare_parameter

Implemented in rclcpp::node_interfaces::NodeParameters.


The documentation for this class was generated from the following file: