rclcpp  master
C++ ROS Client Library API
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 <node_parameters_interface.hpp>

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

Public Types

using OnParametersSetCallbackType = std::function< rcl_interfaces::msg::SetParametersResult(const std::vector< rclcpp::Parameter > &) >
 
using instead = OnParametersSetCallbackType
 

Public Member Functions

virtual ~NodeParametersInterface ()=default
 
virtual const rclcpp::ParameterValuedeclare_parameter (const std::string &name, const rclcpp::ParameterValue &default_value, const rcl_interfaces::msg::ParameterDescriptor &parameter_descriptor)=0
 Declare and initialize a parameter. More...
 
virtual void undeclare_parameter (const std::string &name)=0
 Undeclare a parameter. More...
 
virtual bool has_parameter (const std::string &name) const =0
 Return true if the parameter has been declared, otherwise false. More...
 
virtual 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 rcl_interfaces::msg::SetParametersResult set_parameters_atomically (const std::vector< rclcpp::Parameter > &parameters)=0
 Set and initialize a parameter, all at once. More...
 
virtual std::vector< rclcpp::Parameterget_parameters (const std::vector< std::string > &names) const =0
 Get descriptions of parameters given their names. More...
 
virtual rclcpp::Parameter get_parameter (const std::string &name) const =0
 Get the description of one parameter given a name. More...
 
virtual bool get_parameter (const std::string &name, rclcpp::Parameter &parameter) const =0
 Get the description of one parameter given a name. More...
 
virtual 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. More...
 
virtual std::vector< rcl_interfaces::msg::ParameterDescriptor > describe_parameters (const std::vector< std::string > &names) const =0
 
virtual std::vector< uint8_t > get_parameter_types (const std::vector< std::string > &names) const =0
 
virtual rcl_interfaces::msg::ListParametersResult list_parameters (const std::vector< std::string > &prefixes, uint64_t depth) const =0
 
virtual OnParametersSetCallbackType set_on_parameters_set_callback (OnParametersSetCallbackType callback)=0
 Register a callback for when parameters are being set, return an existing one. More...
 
virtual void register_param_change_callback (OnParametersSetCallbackType callback)=0
 
virtual 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. More...
 

Detailed Description

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

Member Typedef Documentation

◆ OnParametersSetCallbackType

◆ instead

Constructor & Destructor Documentation

◆ ~NodeParametersInterface()

virtual rclcpp::node_interfaces::NodeParametersInterface::~NodeParametersInterface ( )
virtualdefault

Member Function Documentation

◆ declare_parameter()

virtual 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 
)
pure virtual

Declare and initialize a parameter.

See also
rclcpp::Node::declare_parameter

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ undeclare_parameter()

virtual 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.

◆ has_parameter()

virtual 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.

◆ set_parameters()

virtual 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 rcl_interfaces::msg::SetParametersResult rclcpp::node_interfaces::NodeParametersInterface::set_parameters_atomically ( const std::vector< rclcpp::Parameter > &  parameters)
pure virtual

Set and initialize a parameter, all at once.

See also
rclcpp::Node::set_parameters_atomically

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ get_parameters()

virtual std::vector<rclcpp::Parameter> rclcpp::node_interfaces::NodeParametersInterface::get_parameters ( const std::vector< std::string > &  names) const
pure virtual

Get descriptions of parameters given their names.

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ get_parameter() [1/2]

virtual rclcpp::Parameter rclcpp::node_interfaces::NodeParametersInterface::get_parameter ( const std::string name) const
pure virtual

Get the description of one parameter given a name.

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ get_parameter() [2/2]

virtual bool rclcpp::node_interfaces::NodeParametersInterface::get_parameter ( const std::string name,
rclcpp::Parameter parameter 
) const
pure virtual

Get the description of one parameter given a name.

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ get_parameters_by_prefix()

virtual bool rclcpp::node_interfaces::NodeParametersInterface::get_parameters_by_prefix ( const std::string prefix,
std::map< std::string, rclcpp::Parameter > &  parameters 
) const
pure virtual

Get all parameters that have the specified prefix into the parameters map.

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ describe_parameters()

virtual std::vector<rcl_interfaces::msg::ParameterDescriptor> rclcpp::node_interfaces::NodeParametersInterface::describe_parameters ( const std::vector< std::string > &  names) const
pure virtual

◆ get_parameter_types()

virtual std::vector<uint8_t> rclcpp::node_interfaces::NodeParametersInterface::get_parameter_types ( const std::vector< std::string > &  names) const
pure virtual

◆ list_parameters()

virtual rcl_interfaces::msg::ListParametersResult rclcpp::node_interfaces::NodeParametersInterface::list_parameters ( const std::vector< std::string > &  prefixes,
uint64_t  depth 
) const
pure virtual

◆ set_on_parameters_set_callback()

virtual OnParametersSetCallbackType rclcpp::node_interfaces::NodeParametersInterface::set_on_parameters_set_callback ( OnParametersSetCallbackType  callback)
pure virtual

Register a callback for when parameters are being set, return an existing one.

See also
rclcpp::Node::set_on_parameters_set_callback

Implemented in rclcpp::node_interfaces::NodeParameters.

◆ register_param_change_callback()

virtual void rclcpp::node_interfaces::NodeParametersInterface::register_param_change_callback ( OnParametersSetCallbackType  callback)
pure virtual

◆ get_parameter_overrides()

virtual const std::map<std::string, rclcpp::ParameterValue>& rclcpp::node_interfaces::NodeParametersInterface::get_parameter_overrides ( ) const
pure virtual

Return the initial parameter values used by the NodeParameters to override default values.

Implemented in rclcpp::node_interfaces::NodeParameters.


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