rclcpp
master
C++ ROS Client Library API
|
Go to the documentation of this file.
15 #ifndef RCLCPP__NODE_INTERFACES__NODE_BASE_HPP_
16 #define RCLCPP__NODE_INTERFACES__NODE_BASE_HPP_
30 namespace node_interfaces
43 rclcpp::Context::SharedPtr context,
45 bool use_intra_process_default,
46 bool enable_topic_statistics_default);
65 rclcpp::Context::SharedPtr
85 rclcpp::CallbackGroup::SharedPtr
88 bool automatically_add_to_executor_with_node =
true)
override;
91 rclcpp::CallbackGroup::SharedPtr
123 const std::string & name,
bool is_service,
bool only_expand =
false)
const override;
128 rclcpp::Context::SharedPtr context_;
129 bool use_intra_process_default_;
130 bool enable_topic_statistics_default_;
134 rclcpp::CallbackGroup::SharedPtr default_callback_group_;
137 std::atomic_bool associated_with_executor_;
142 bool notify_guard_condition_is_valid_;
148 #endif // RCLCPP__NODE_INTERFACES__NODE_BASE_HPP_
bool callback_group_in_node(rclcpp::CallbackGroup::SharedPtr group) override
Return true if the given callback group is associated with this node.
Implementation of the NodeBase part of the Node API.
Definition: node_base.hpp:34
#define RCLCPP_DISABLE_COPY(...)
Definition: macros.hpp:26
bool get_use_intra_process_default() const override
Return the default preference for using intra process communication.
#define RCLCPP_SMART_PTR_ALIASES_ONLY(...)
Definition: macros.hpp:66
CallbackGroupType
Definition: callback_group.hpp:43
rcl_node_t * get_rcl_node_handle() override
Return the rcl_node_t node handle (non-const version).
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
Pure virtual interface class for the NodeBase part of the Node API.
Definition: node_base_interface.hpp:36
bool get_enable_topic_statistics_default() const override
Return the default preference for enabling topic statistics collection.
std::atomic_bool & get_associated_with_executor_atomic() override
Return the atomic bool which is used to ensure only one executor is used.
rcl_guard_condition_t * get_notify_guard_condition() override
Return guard condition that should be notified when the internal node state changes.
rcl_guard_condition_t rcl_get_zero_initialized_guard_condition(void)
std::unique_lock< std::recursive_mutex > acquire_notify_guard_condition_lock() const override
Acquire and return a scoped lock that protects the notify guard condition.
const char * get_fully_qualified_name() const override
Return the fully qualified name of the node.
std::shared_ptr< rcl_node_t > get_shared_rcl_node_handle() override
Return the rcl_node_t node handle in a std::shared_ptr.
rclcpp::CallbackGroup::SharedPtr get_default_callback_group() override
Return the default callback group.
std::string resolve_topic_or_service_name(const std::string &name, bool is_service, bool only_expand=false) const override
Expand and remap a given topic or service name.
const std::vector< rclcpp::CallbackGroup::WeakPtr > & get_callback_groups() const override
Return list of callback groups associated with this node.
const char * get_name() const override
Return the name of the node.
NodeBase(const std::string &node_name, const std::string &namespace_, rclcpp::Context::SharedPtr context, const rcl_node_options_t &rcl_node_options, bool use_intra_process_default, bool enable_topic_statistics_default)
rclcpp::Context::SharedPtr get_context() override
Return the context of the node.
const char * get_namespace() const override
Return the namespace of the node.
rclcpp::CallbackGroup::SharedPtr create_callback_group(rclcpp::CallbackGroupType group_type, bool automatically_add_to_executor_with_node=true) override
Create and return a callback group.