Class NodeParametersInterface
Defined in File node_parameters_interface.hpp
Inheritance Relationships
Derived Type
public rclcpp::node_interfaces::NodeParameters
(Class NodeParameters)
Class Documentation
-
class NodeParametersInterface
Pure virtual interface class for the NodeParameters part of the Node API.
Subclassed by rclcpp::node_interfaces::NodeParameters
Public Types
-
using OnSetParametersCallbackType = OnSetParametersCallbackHandle::OnSetParametersCallbackType
-
using PostSetParametersCallbackType = PostSetParametersCallbackHandle::PostSetParametersCallbackType
-
using PreSetParametersCallbackType = PreSetParametersCallbackHandle::PreSetParametersCallbackType
Public Functions
-
virtual ~NodeParametersInterface() = default
-
virtual const rclcpp::ParameterValue &declare_parameter(const std::string &name, const rclcpp::ParameterValue &default_value, const rcl_interfaces::msg::ParameterDescriptor ¶meter_descriptor = rcl_interfaces::msg::ParameterDescriptor(), bool ignore_override = false) = 0
Declare and initialize a parameter.
See also
-
virtual const rclcpp::ParameterValue &declare_parameter(const std::string &name, rclcpp::ParameterType type, const rcl_interfaces::msg::ParameterDescriptor ¶meter_descriptor = rcl_interfaces::msg::ParameterDescriptor(), bool ignore_override = false) = 0
Declare a parameter.
See also
-
virtual void undeclare_parameter(const std::string &name) = 0
Undeclare a parameter.
See also
-
virtual bool has_parameter(const std::string &name) const = 0
Return true if the parameter has been declared, otherwise false.
See also
-
virtual std::vector<rcl_interfaces::msg::SetParametersResult> set_parameters(const std::vector<rclcpp::Parameter> ¶meters) = 0
Set one or more parameters, one at a time.
See also
-
virtual rcl_interfaces::msg::SetParametersResult set_parameters_atomically(const std::vector<rclcpp::Parameter> ¶meters) = 0
Set one or more parameters, all at once.
-
virtual std::vector<rclcpp::Parameter> get_parameters(const std::vector<std::string> &names) const = 0
Get descriptions of parameters given their names.
-
virtual rclcpp::Parameter get_parameter(const std::string &name) const = 0
Get the description of one parameter given a name.
-
virtual bool get_parameter(const std::string &name, rclcpp::Parameter ¶meter) const = 0
Get the description of one parameter given a name.
-
virtual bool get_parameters_by_prefix(const std::string &prefix, std::map<std::string, rclcpp::Parameter> ¶meters) const = 0
Get all parameters that have the specified prefix into the parameters map.
-
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 PreSetParametersCallbackHandle::SharedPtr add_pre_set_parameters_callback(PreSetParametersCallbackType callback) = 0
Add a callback that gets triggered before parameters are validated.
-
virtual OnSetParametersCallbackHandle::SharedPtr add_on_set_parameters_callback(OnSetParametersCallbackType callback) = 0
Add a callback to validate parameters before they are set.
-
virtual PostSetParametersCallbackHandle::SharedPtr add_post_set_parameters_callback(PostSetParametersCallbackType callback) = 0
Add a callback that gets triggered after parameters are set successfully.
-
virtual void remove_pre_set_parameters_callback(const PreSetParametersCallbackHandle *const handler) = 0
Remove a callback registered with
add_pre_set_parameters_callback
.
-
virtual void remove_on_set_parameters_callback(const OnSetParametersCallbackHandle *const handler) = 0
Remove a callback registered with
add_on_set_parameters_callback
.
-
virtual void remove_post_set_parameters_callback(const PostSetParametersCallbackHandle *const handler) = 0
Remove a callback registered with
add_post_set_parameters_callback
.
-
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.
-
using OnSetParametersCallbackType = OnSetParametersCallbackHandle::OnSetParametersCallbackType