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

Namespaces

namespace  basic_outcomes
 Provides common outcome constants for ROS 2.
 

Classes

class  ActionState
 A state class for handling ROS 2 action client operations. More...
 
class  MonitorState
 Template class to monitor a ROS 2 topic and process incoming messages. More...
 
class  ServiceState
 A state class that interacts with a ROS 2 service. More...
 
class  YasminNode
 A ROS 2 node for managing and handling YASMIN-based applications. More...
 

Functions

void set_ros_loggers (rclcpp::Node::SharedPtr node=nullptr)
 Sets the logging functions for ROS, linking ROS 2 log levels to YASMIN loggers.
 
void ros_log_message (yasmin::LogLevel level, const char *file, const char *function, int line, const char *text)
 Generalized logging function.
 

Variables

rclcpp::Node * logger_node = nullptr
 Node used in the YASMIN ROS 2 logs.
 

Function Documentation

◆ ros_log_message()

void yasmin_ros::ros_log_message ( yasmin::LogLevel level,
const char * file,
const char * function,
int line,
const char * text )

Generalized logging function.

Parameters
levelThe log level as a yasmin::LogLevel (e.g., "ERROR", "WARN", "INFO", "DEBUG").
fileThe source file where the log function is called.
functionThe function where the log function is called.
lineThe line number in the source file.
textThe format string for the log message.
argsAdditional arguments for the format string.

◆ set_ros_loggers()

void yasmin_ros::set_ros_loggers ( rclcpp::Node::SharedPtr node = nullptr)

Sets the logging functions for ROS, linking ROS 2 log levels to YASMIN loggers.

This function configures YASMIN to use ROS 2 logging mechanisms for error, warning, info, and debug levels, ensuring messages from YASMIN are routed through ROS 2 loggers.

Parameters
nodeROS 2 node to use as logger node. If null, use YasminNode.
Note
This function should be called once to set up the loggers before any logging occurs within YASMIN components.

Variable Documentation

◆ logger_node

rclcpp::Node * yasmin_ros::logger_node = nullptr

Node used in the YASMIN ROS 2 logs.