C++ YASMIN (Yet Another State MachINe)
Loading...
Searching...
No Matches
yasmin_ros::YasminNode Class Reference

A ROS 2 node for managing and handling YASMIN-based applications. More...

#include <yasmin_node.hpp>

Inheritance diagram for yasmin_ros::YasminNode:
Collaboration diagram for yasmin_ros::YasminNode:

Public Member Functions

 YasminNode ()
 Default constructor. Initializes the node with a unique name.
 
 YasminNode (YasminNode &other)=delete
 Deleted copy constructor to prevent copying of the singleton instance.
 
void operator= (const YasminNode &)=delete
 Deleted assignment operator to enforce singleton pattern.
 
 ~YasminNode ()
 Destructor. Cleans up resources.
 

Static Public Member Functions

static std::shared_ptr< YasminNodeget_instance ()
 Provides access to the singleton instance of YasminNode.
 

Private Attributes

rclcpp::executors::MultiThreadedExecutor executor
 Executor for managing multiple threads.
 
std::unique_ptr< std::thread > spin_thread
 Thread for spinning the node.
 

Detailed Description

A ROS 2 node for managing and handling YASMIN-based applications.

YasminNode is a singleton class derived from rclcpp::Node and integrates custom functionalities for executing specific tasks in a ROS 2 environment.

Constructor & Destructor Documentation

◆ YasminNode() [1/2]

YasminNode::YasminNode ( )
explicit

Default constructor. Initializes the node with a unique name.

◆ YasminNode() [2/2]

yasmin_ros::YasminNode::YasminNode ( YasminNode & other)
delete

Deleted copy constructor to prevent copying of the singleton instance.

Parameters
otherAnother instance of YasminNode (unused).

◆ ~YasminNode()

yasmin_ros::YasminNode::~YasminNode ( )
inline

Destructor. Cleans up resources.

Member Function Documentation

◆ get_instance()

static std::shared_ptr< YasminNode > yasmin_ros::YasminNode::get_instance ( )
inlinestatic

Provides access to the singleton instance of YasminNode.

This method ensures there is only one instance of YasminNode running.

Returns
A shared pointer to the singleton instance of YasminNode.

◆ operator=()

void yasmin_ros::YasminNode::operator= ( const YasminNode & )
delete

Deleted assignment operator to enforce singleton pattern.

Parameters
otherAnother instance of YasminNode (unused).

Member Data Documentation

◆ executor

rclcpp::executors::MultiThreadedExecutor yasmin_ros::YasminNode::executor
private

Executor for managing multiple threads.

◆ spin_thread

std::unique_ptr<std::thread> yasmin_ros::YasminNode::spin_thread
private

Thread for spinning the node.


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