15 #ifndef RCLCPP__NODE_OPTIONS_HPP_
16 #define RCLCPP__NODE_OPTIONS_HPP_
23 #include "rclcpp/context.hpp"
24 #include "rclcpp/contexts/default_context.hpp"
25 #include "rclcpp/parameter.hpp"
26 #include "rclcpp/publisher_options.hpp"
27 #include "rclcpp/qos.hpp"
28 #include "rclcpp/visibility_control.hpp"
94 rclcpp::Context::SharedPtr
104 const std::vector<std::string> &
120 std::vector<rclcpp::Parameter> &
124 const std::vector<rclcpp::Parameter> &
138 template<
typename ParameterT>
385 rclcpp::Context::SharedPtr context_ {
386 rclcpp::contexts::get_global_default_context()};
388 std::vector<std::string> arguments_ {};
390 std::vector<rclcpp::Parameter> parameter_overrides_ {};
392 bool use_global_arguments_ {
true};
394 bool enable_rosout_ {
true};
396 bool use_intra_process_comms_ {
false};
398 bool enable_topic_statistics_ {
false};
400 bool start_parameter_services_ {
true};
402 bool start_parameter_event_publisher_ {
true};
406 bool use_clock_thread_ {
true};
416 bool allow_undeclared_parameters_ {
false};
418 bool automatically_declare_parameters_from_overrides_ {
false};
#define rcl_get_default_allocator
Return a properly initialized rcl_allocator_t with default values.
rcutils_allocator_t rcl_allocator_t
Encapsulation of an allocator.
Encapsulation of options for node initialization.
RCLCPP_PUBLIC bool start_parameter_event_publisher() const
Return the start_parameter_event_publisher flag.
RCLCPP_PUBLIC const std::vector< std::string > & arguments() const
Return a reference to the list of arguments for the node.
RCLCPP_PUBLIC bool use_clock_thread() const
Return the use_clock_thread flag.
RCLCPP_PUBLIC bool use_global_arguments() const
Return the use_global_arguments flag.
RCLCPP_PUBLIC const rclcpp::QoS & parameter_event_qos() const
Return a reference to the parameter_event_qos QoS.
RCLCPP_PUBLIC const rclcpp::QoS & rosout_qos() const
Return a reference to the rosout QoS.
NodeOptions & append_parameter_override(const std::string &name, const ParameterT &value)
Append a single parameter override, parameter idiom style.
RCLCPP_PUBLIC bool enable_rosout() const
Return the enable_rosout flag.
RCLCPP_PUBLIC const rclcpp::PublisherOptionsBase & parameter_event_publisher_options() const
Return a reference to the parameter_event_publisher_options.
RCLCPP_PUBLIC bool allow_undeclared_parameters() const
Return the allow_undeclared_parameters flag.
RCLCPP_PUBLIC bool automatically_declare_parameters_from_overrides() const
Return the automatically_declare_parameters_from_overrides flag.
virtual RCLCPP_PUBLIC ~NodeOptions()=default
Destructor.
RCLCPP_PUBLIC const rclcpp::QoS & clock_qos() const
Return a reference to the clock QoS.
RCLCPP_PUBLIC NodeOptions(rcl_allocator_t allocator=rcl_get_default_allocator())
Create NodeOptions with default values, optionally specifying the allocator to use.
RCLCPP_PUBLIC bool start_parameter_services() const
Return the start_parameter_services flag.
RCLCPP_PUBLIC bool use_intra_process_comms() const
Return the use_intra_process_comms flag.
RCLCPP_PUBLIC std::vector< rclcpp::Parameter > & parameter_overrides()
Return a reference to the list of parameter overrides.
RCLCPP_PUBLIC const rcl_allocator_t & allocator() const
Return the rcl_allocator_t to be used.
RCLCPP_PUBLIC rclcpp::Context::SharedPtr context() const
Return the context to be used by the node.
RCLCPP_PUBLIC bool enable_topic_statistics() const
Return the enable_topic_statistics flag.
RCLCPP_PUBLIC const rcl_node_options_t * get_rcl_node_options() const
Return the rcl_node_options used by the node.
RCLCPP_PUBLIC NodeOptions & operator=(const NodeOptions &other)
Assignment operator.
Store the type and value of a parameter.
Encapsulation of Quality of Service settings.
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
struct rcl_node_options_s rcl_node_options_t
Structure which encapsulates the options for creating a rcl_node_t.
Structure which encapsulates the options for creating a rcl_node_t.
Non-templated part of PublisherOptionsWithAllocator<Allocator>.
static QoSInitialization from_rmw(const rmw_qos_profile_t &rmw_qos)
Create a QoSInitialization from an existing rmw_qos_profile_t, using its history and depth.