rclcpp
master
C++ ROS Client Library API
|
Implementation of the NodeBase part of the Node API. More...
#include <node_base.hpp>
Public Member Functions | |
NodeBase (const std::string &node_name, const std::string &namespace_, rclcpp::context::Context::SharedPtr context) | |
virtual | ~NodeBase () |
virtual const char * | get_name () const |
Return the name of the node. More... | |
virtual const char * | get_namespace () const |
Return the namespace of the node. More... | |
virtual rclcpp::context::Context::SharedPtr | get_context () |
Return the context of the node. More... | |
virtual rcl_node_t * | get_rcl_node_handle () |
Return the rcl_node_t node handle (non-const version). More... | |
virtual const rcl_node_t * | get_rcl_node_handle () const |
Return the rcl_node_t node handle (const version). More... | |
virtual std::shared_ptr< rcl_node_t > | get_shared_rcl_node_handle () |
Return the rcl_node_t node handle in a std::shared_ptr. More... | |
virtual std::shared_ptr< const rcl_node_t > | get_shared_rcl_node_handle () const |
Return the rcl_node_t node handle in a std::shared_ptr. More... | |
virtual rclcpp::callback_group::CallbackGroup::SharedPtr | create_callback_group (rclcpp::callback_group::CallbackGroupType group_type) |
Create and return a callback group. More... | |
virtual rclcpp::callback_group::CallbackGroup::SharedPtr | get_default_callback_group () |
Return the default callback group. More... | |
virtual bool | callback_group_in_node (rclcpp::callback_group::CallbackGroup::SharedPtr group) |
Return true if the given callback group is associated with this node. More... | |
virtual const std::vector< rclcpp::callback_group::CallbackGroup::WeakPtr > & | get_callback_groups () const |
Return list of callback groups associated with this node. More... | |
virtual std::atomic_bool & | get_associated_with_executor_atomic () |
Return the atomic bool which is used to ensure only one executor is used. More... | |
virtual rcl_guard_condition_t * | get_notify_guard_condition () |
Return guard condition that should be notified when the internal node state changes. More... | |
virtual std::unique_lock< std::recursive_mutex > | acquire_notify_guard_condition_lock () const |
Acquire and return a scoped lock that protects the notify guard condition. More... | |
Implementation of the NodeBase part of the Node API.
rclcpp::node_interfaces::NodeBase::NodeBase | ( | const std::string & | node_name, |
const std::string & | namespace_, | ||
rclcpp::context::Context::SharedPtr | context | ||
) |
|
virtual |
|
virtual |
Return the name of the node.
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
virtual |
Return the namespace of the node.
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
virtual |
Return the context of the node.
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
virtual |
Return the rcl_node_t node handle (non-const version).
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
virtual |
Return the rcl_node_t node handle (const version).
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
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.
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
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.
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
virtual |
Create and return a callback group.
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
virtual |
Return the default callback group.
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
virtual |
Return true if the given callback group is associated with this node.
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
virtual |
Return list of callback groups associated with this node.
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
virtual |
Return the atomic bool which is used to ensure only one executor is used.
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
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.
Implements rclcpp::node_interfaces::NodeBaseInterface.
|
virtual |
Acquire and return a scoped lock that protects the notify guard condition.
This should be used when triggering the notify guard condition.
Implements rclcpp::node_interfaces::NodeBaseInterface.