15 #ifndef RCLCPP__NODE_INTERFACES__NODE_BASE_INTERFACE_HPP_
16 #define RCLCPP__NODE_INTERFACES__NODE_BASE_INTERFACE_HPP_
25 #include "rclcpp/callback_group.hpp"
26 #include "rclcpp/context.hpp"
27 #include "rclcpp/guard_condition.hpp"
28 #include "rclcpp/macros.hpp"
29 #include "rclcpp/node_interfaces/detail/node_interfaces_helpers.hpp"
30 #include "rclcpp/visibility_control.hpp"
34 namespace node_interfaces
72 rclcpp::Context::SharedPtr
94 std::shared_ptr<rcl_node_t>
104 std::shared_ptr<const rcl_node_t>
110 rclcpp::CallbackGroup::SharedPtr
112 rclcpp::CallbackGroupType group_type,
113 bool automatically_add_to_executor_with_node =
true) = 0;
118 rclcpp::CallbackGroup::SharedPtr
127 using CallbackGroupFunction = std::function<void (rclcpp::CallbackGroup::SharedPtr)>;
166 rclcpp::GuardCondition::SharedPtr
195 const std::string & name,
bool is_service,
bool only_expand =
false)
const = 0;
A condition that can be waited on in a single wait set and asynchronously triggered.
Pure virtual interface class for the NodeBase part of the Node API.
virtual RCLCPP_PUBLIC std::shared_ptr< const rcl_node_t > get_shared_rcl_node_handle() const =0
Return the rcl_node_t node handle in a std::shared_ptr.
virtual RCLCPP_PUBLIC bool get_enable_topic_statistics_default() const =0
Return the default preference for enabling topic statistics collection.
virtual RCLCPP_PUBLIC void trigger_notify_guard_condition()=0
Trigger the guard condition that notifies of internal node state changes.
virtual RCLCPP_PUBLIC bool callback_group_in_node(rclcpp::CallbackGroup::SharedPtr group)=0
Return true if the given callback group is associated with this node.
virtual RCLCPP_PUBLIC const char * get_namespace() const =0
Return the namespace of the node.
virtual RCLCPP_PUBLIC rclcpp::CallbackGroup::SharedPtr create_callback_group(rclcpp::CallbackGroupType group_type, bool automatically_add_to_executor_with_node=true)=0
Create and return a callback group.
virtual RCLCPP_PUBLIC rclcpp::CallbackGroup::SharedPtr get_default_callback_group()=0
Return the default callback group.
virtual RCLCPP_PUBLIC std::atomic_bool & get_associated_with_executor_atomic()=0
Return the atomic bool which is used to ensure only one executor is used.
virtual RCLCPP_PUBLIC std::string resolve_topic_or_service_name(const std::string &name, bool is_service, bool only_expand=false) const =0
Expand and remap a given topic or service name.
virtual RCLCPP_PUBLIC bool get_use_intra_process_default() const =0
Return the default preference for using intra process communication.
virtual RCLCPP_PUBLIC void for_each_callback_group(const CallbackGroupFunction &func)=0
Iterate over the stored callback groups, calling the given function on each valid one.
virtual RCLCPP_PUBLIC rcl_node_t * get_rcl_node_handle()=0
Return the rcl_node_t node handle (non-const version).
virtual RCLCPP_PUBLIC const char * get_fully_qualified_name() const =0
Return the fully qualified name of the node.
virtual RCLCPP_PUBLIC const char * get_name() const =0
Return the name of the node.
virtual RCLCPP_PUBLIC rclcpp::Context::SharedPtr get_context()=0
Return the context of the node.
virtual RCLCPP_PUBLIC std::shared_ptr< rcl_node_t > get_shared_rcl_node_handle()=0
Return the rcl_node_t node handle in a std::shared_ptr.
virtual RCLCPP_PUBLIC const rcl_node_t * get_rcl_node_handle() const =0
Return the rcl_node_t node handle (const version).
virtual RCLCPP_PUBLIC rclcpp::GuardCondition & get_notify_guard_condition()=0
Return a guard condition that should be notified when the internal node state changes.
virtual RCLCPP_PUBLIC rclcpp::GuardCondition::SharedPtr get_shared_notify_guard_condition()=0
Return a guard condition that should be notified when the internal node state changes.
Versions of rosidl_typesupport_cpp::get_message_type_support_handle that handle adapted types.
Structure which encapsulates a ROS Node.