rclcpp  master
C++ ROS Client Library API
Public Member Functions | List of all members
rclcpp::node_interfaces::NodeBaseInterface Class Referenceabstract

Pure virtual interface class for the NodeBase part of the Node API. More...

#include <node_base_interface.hpp>

Inheritance diagram for rclcpp::node_interfaces::NodeBaseInterface:
Inheritance graph
[legend]

Public Member Functions

virtual ~NodeBaseInterface ()=default
 
virtual const char * get_name () const =0
 Return the name of the node. More...
 
virtual const char * get_namespace () const =0
 Return the namespace of the node. More...
 
virtual const char * get_fully_qualified_name () const =0
 Return the fully qualified name of the node. More...
 
virtual rclcpp::Context::SharedPtr get_context ()=0
 Return the context of the node. More...
 
virtual rcl_node_tget_rcl_node_handle ()=0
 Return the rcl_node_t node handle (non-const version). More...
 
virtual const rcl_node_tget_rcl_node_handle () const =0
 Return the rcl_node_t node handle (const version). More...
 
virtual std::shared_ptr< rcl_node_tget_shared_rcl_node_handle ()=0
 Return the rcl_node_t node handle in a std::shared_ptr. More...
 
virtual std::shared_ptr< const rcl_node_tget_shared_rcl_node_handle () const =0
 Return the rcl_node_t node handle in a std::shared_ptr. More...
 
virtual rclcpp::CallbackGroup::SharedPtr create_callback_group (rclcpp::CallbackGroupType group_type)=0
 Create and return a callback group. More...
 
virtual rclcpp::CallbackGroup::SharedPtr get_default_callback_group ()=0
 Return the default callback group. More...
 
virtual bool callback_group_in_node (rclcpp::CallbackGroup::SharedPtr group)=0
 Return true if the given callback group is associated with this node. More...
 
virtual const std::vector< rclcpp::CallbackGroup::WeakPtr > & get_callback_groups () const =0
 Return list of callback groups associated with this node. More...
 
virtual std::atomic_bool & get_associated_with_executor_atomic ()=0
 Return the atomic bool which is used to ensure only one executor is used. More...
 
virtual rcl_guard_condition_tget_notify_guard_condition ()=0
 Return guard condition that should be notified when the internal node state changes. More...
 
virtual std::unique_lock< std::recursive_mutexacquire_notify_guard_condition_lock () const =0
 Acquire and return a scoped lock that protects the notify guard condition. More...
 
virtual bool get_use_intra_process_default () const =0
 Return the default preference for using intra process communication. More...
 
virtual bool get_enable_topic_statistics_default () const =0
 Return the default preference for enabling topic statistics collection. More...
 

Detailed Description

Pure virtual interface class for the NodeBase part of the Node API.

Constructor & Destructor Documentation

◆ ~NodeBaseInterface()

virtual rclcpp::node_interfaces::NodeBaseInterface::~NodeBaseInterface ( )
virtualdefault

Member Function Documentation

◆ get_name()

virtual const char* rclcpp::node_interfaces::NodeBaseInterface::get_name ( ) const
pure virtual

Return the name of the node.

Returns
The name of the node.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_namespace()

virtual const char* rclcpp::node_interfaces::NodeBaseInterface::get_namespace ( ) const
pure virtual

Return the namespace of the node.

Returns
The namespace of the node.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_fully_qualified_name()

virtual const char* rclcpp::node_interfaces::NodeBaseInterface::get_fully_qualified_name ( ) const
pure virtual

Return the fully qualified name of the node.

Returns
The fully qualified name of the node.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_context()

virtual rclcpp::Context::SharedPtr rclcpp::node_interfaces::NodeBaseInterface::get_context ( )
pure virtual

Return the context of the node.

Returns
SharedPtr to the node's context.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_rcl_node_handle() [1/2]

virtual rcl_node_t* rclcpp::node_interfaces::NodeBaseInterface::get_rcl_node_handle ( )
pure virtual

Return the rcl_node_t node handle (non-const version).

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_rcl_node_handle() [2/2]

virtual const rcl_node_t* rclcpp::node_interfaces::NodeBaseInterface::get_rcl_node_handle ( ) const
pure virtual

Return the rcl_node_t node handle (const version).

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_shared_rcl_node_handle() [1/2]

virtual std::shared_ptr<rcl_node_t> rclcpp::node_interfaces::NodeBaseInterface::get_shared_rcl_node_handle ( )
pure virtual

Return the rcl_node_t node handle in a std::shared_ptr.

This handle remains valid after the Node is destroyed. The actual rcl node is not finalized until it is out of scope everywhere.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_shared_rcl_node_handle() [2/2]

virtual std::shared_ptr<const rcl_node_t> rclcpp::node_interfaces::NodeBaseInterface::get_shared_rcl_node_handle ( ) const
pure virtual

Return the rcl_node_t node handle in a std::shared_ptr.

This handle remains valid after the Node is destroyed. The actual rcl node is not finalized until it is out of scope everywhere.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ create_callback_group()

virtual rclcpp::CallbackGroup::SharedPtr rclcpp::node_interfaces::NodeBaseInterface::create_callback_group ( rclcpp::CallbackGroupType  group_type)
pure virtual

Create and return a callback group.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_default_callback_group()

virtual rclcpp::CallbackGroup::SharedPtr rclcpp::node_interfaces::NodeBaseInterface::get_default_callback_group ( )
pure virtual

Return the default callback group.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ callback_group_in_node()

virtual bool rclcpp::node_interfaces::NodeBaseInterface::callback_group_in_node ( rclcpp::CallbackGroup::SharedPtr  group)
pure virtual

Return true if the given callback group is associated with this node.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_callback_groups()

virtual const std::vector<rclcpp::CallbackGroup::WeakPtr>& rclcpp::node_interfaces::NodeBaseInterface::get_callback_groups ( ) const
pure virtual

Return list of callback groups associated with this node.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_associated_with_executor_atomic()

virtual std::atomic_bool& rclcpp::node_interfaces::NodeBaseInterface::get_associated_with_executor_atomic ( )
pure virtual

Return the atomic bool which is used to ensure only one executor is used.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_notify_guard_condition()

virtual rcl_guard_condition_t* rclcpp::node_interfaces::NodeBaseInterface::get_notify_guard_condition ( )
pure virtual

Return guard condition that should be notified when the internal node state changes.

For example, this should be notified when a publisher is added or removed.

Returns
the rcl_guard_condition_t if it is valid, else nullptr

Implemented in rclcpp::node_interfaces::NodeBase.

◆ acquire_notify_guard_condition_lock()

virtual std::unique_lock<std::recursive_mutex> rclcpp::node_interfaces::NodeBaseInterface::acquire_notify_guard_condition_lock ( ) const
pure virtual

Acquire and return a scoped lock that protects the notify guard condition.

This should be used when triggering the notify guard condition.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_use_intra_process_default()

virtual bool rclcpp::node_interfaces::NodeBaseInterface::get_use_intra_process_default ( ) const
pure virtual

Return the default preference for using intra process communication.

Implemented in rclcpp::node_interfaces::NodeBase.

◆ get_enable_topic_statistics_default()

virtual bool rclcpp::node_interfaces::NodeBaseInterface::get_enable_topic_statistics_default ( ) const
pure virtual

Return the default preference for enabling topic statistics collection.

Implemented in rclcpp::node_interfaces::NodeBase.


The documentation for this class was generated from the following file: