15 #ifndef RCLCPP__NODE_INTERFACES__NODE_PARAMETERS_HPP_ 16 #define RCLCPP__NODE_INTERFACES__NODE_PARAMETERS_HPP_ 24 #include "rcl_interfaces/msg/list_parameters_result.hpp" 25 #include "rcl_interfaces/msg/parameter_descriptor.hpp" 26 #include "rcl_interfaces/msg/parameter_event.hpp" 27 #include "rcl_interfaces/msg/set_parameters_result.hpp" 41 namespace node_interfaces
59 : allow_modification_(allow_mod)
61 if (!allow_modification_) {
63 "cannot set or declare a parameter, or change the callback from within set callback");
66 allow_modification_ =
false;
71 allow_modification_ =
true;
75 bool & allow_modification_;
86 const node_interfaces::NodeBaseInterface::SharedPtr node_base,
87 const node_interfaces::NodeLoggingInterface::SharedPtr node_logging,
88 const node_interfaces::NodeTopicsInterface::SharedPtr node_topics,
89 const node_interfaces::NodeServicesInterface::SharedPtr node_services,
90 const node_interfaces::NodeClockInterface::SharedPtr node_clock,
92 bool start_parameter_services,
93 bool start_parameter_event_publisher,
96 bool allow_undeclared_parameters,
97 bool automatically_declare_parameters_from_overrides);
108 const rcl_interfaces::msg::ParameterDescriptor & parameter_descriptor,
109 bool ignore_override)
override;
113 undeclare_parameter(
const std::string & name)
override;
117 has_parameter(
const std::string & name)
const override;
125 rcl_interfaces::msg::SetParametersResult
126 set_parameters_atomically(
135 get_parameter(
const std::string & name)
const override;
145 get_parameters_by_prefix(
158 rcl_interfaces::msg::ListParametersResult
175 get_parameter_overrides()
const override;
187 bool parameter_modification_enabled_{
true};
197 bool allow_undeclared_ =
false;
205 node_interfaces::NodeLoggingInterface::SharedPtr node_logging_;
206 node_interfaces::NodeClockInterface::SharedPtr node_clock_;
212 #endif // RCLCPP__NODE_INTERFACES__NODE_PARAMETERS_HPP_ Definition: node_parameters.hpp:55
#define RCLCPP_DISABLE_COPY(...)
Definition: macros.hpp:26
Non-templated part of PublisherOptionsWithAllocator<Allocator>.
Definition: publisher_options.hpp:39
rcl_interfaces::msg::ParameterDescriptor descriptor
A description of the parameter.
Definition: node_parameters.hpp:51
Encapsulation of Quality of Service settings.
Definition: qos.hpp:55
Structure to store an arbitrary parameter with templated get/set methods.
Definition: parameter.hpp:51
#define RCLCPP_SMART_PTR_ALIASES_ONLY(...)
Definition: macros.hpp:66
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
ParameterMutationRecursionGuard(bool &allow_mod)
Definition: node_parameters.hpp:58
rclcpp::ParameterValue value
Current value of the parameter.
Definition: node_parameters.hpp:48
A publisher publishes messages of any type to a topic.
Definition: publisher.hpp:51
Definition: node_parameters.hpp:45
Definition: node_parameters_interface.hpp:36
Implementation of the NodeParameters part of the Node API.
Definition: node_parameters.hpp:79
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
Set the data type used in the intra-process buffer as std::shared_ptr<MessageT>
~ParameterMutationRecursionGuard()
Definition: node_parameters.hpp:69
Store the type and value of a parameter.
Definition: parameter_value.hpp:71
Pure virtual interface class for the NodeParameters part of the Node API.
Definition: node_parameters_interface.hpp:49
Thrown if parameter is modified while in a set callback.
Definition: exceptions.hpp:251