|
C++ YASMIN (Yet Another State MachINe)
|
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 | GetParametersState |
| State that retrieves parameters from the ROS 2 parameter server. More... | |
| class | MonitorState |
| Template class to monitor a ROS 2 topic and process incoming messages. More... | |
| class | PublisherState |
| Template class to publish ROS 2 messages. More... | |
| class | ROSClientsCache |
| Centralized cache for managing ROS 2 client objects. More... | |
| class | RosDeserializeCppState |
| A state for deserializing ROS 2 messages into C++ objects. More... | |
| class | RosSerializeCppState |
| A state for serializing C++ objects into ROS 2 messages. More... | |
| class | ServiceState |
| A state class that interacts with a ROS 2 service. More... | |
| struct | InterfaceSerializationHandler |
| A structure to hold the serialization handlers for a specific interface type. More... | |
| class | TfBufferState |
| State that creates a tf2 buffer and transform listener. More... | |
| class | YasminNode |
| A ROS 2 node for managing and handling YASMIN-based applications. More... | |
Functions | |
| template<typename InterfaceT> | |
| std::vector< uint8_t > | serialize_interface (const InterfaceT &interface_value) |
| Serialize a ROS 2 interface instance to a byte array. | |
| template<typename InterfaceT> | |
| InterfaceT | deserialize_interface (const std::vector< uint8_t > &serialized_data) |
| Deserialize a ROS 2 interface instance from a byte array. | |
| void | set_ros_loggers (rclcpp::Node::SharedPtr node=nullptr) |
| Sets the logging functions for ROS, linking ROS 2 log levels to YASMIN loggers. | |
| const std::unordered_map< std::string, InterfaceSerializationHandler > & | get_supported_interface_serialization_handlers () |
| Get the map of supported interface serialization handlers. | |
| bool | is_supported_interface_type (const std::string &interface_type) |
| Check if a given interface type is supported for serialization. | |
| const InterfaceSerializationHandler & | get_interface_serialization_handler (const std::string &interface_type) |
| Get the serialization handler for a specific interface type. | |
| std::vector< std::string > | get_supported_interface_types () |
| Get a list of supported interface types for serialization. | |
| 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. | |
| InterfaceT yasmin_ros::deserialize_interface | ( | const std::vector< uint8_t > & | serialized_data | ) |
Deserialize a ROS 2 interface instance from a byte array.
| InterfaceT | ROS 2 message, service request/response, or action goal/result/feedback type. |
| serialized_data | Serialized byte array. |
| const InterfaceSerializationHandler & yasmin_ros::get_interface_serialization_handler | ( | const std::string & | interface_type | ) |
Get the serialization handler for a specific interface type.
| interface_type | The type of the interface to get the handler for. |
| std::invalid_argument | if the interface type is not supported. |
| const std::unordered_map< std::string, InterfaceSerializationHandler > & yasmin_ros::get_supported_interface_serialization_handlers | ( | ) |
Get the map of supported interface serialization handlers.
| std::vector< std::string > yasmin_ros::get_supported_interface_types | ( | ) |
Get a list of supported interface types for serialization.
| bool yasmin_ros::is_supported_interface_type | ( | const std::string & | interface_type | ) |
Check if a given interface type is supported for serialization.
| interface_type | The type of the interface to check. |
| void yasmin_ros::ros_log_message | ( | yasmin::LogLevel | level, |
| const char * | file, | ||
| const char * | function, | ||
| int | line, | ||
| const char * | text ) |
Generalized logging function.
| level | The log level as a yasmin::LogLevel (e.g., "ERROR", "WARN", "INFO", "DEBUG"). |
| file | The source file where the log function is called. |
| function | The function where the log function is called. |
| line | The line number in the source file. |
| text | The format string for the log message. |
| args | Additional arguments for the format string. |
| std::vector< uint8_t > yasmin_ros::serialize_interface | ( | const InterfaceT & | interface_value | ) |
Serialize a ROS 2 interface instance to a byte array.
| InterfaceT | ROS 2 message, service request/response, or action goal/result/feedback type. |
| interface_value | The interface instance to serialize. |
| 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.
| node | ROS 2 node to use as logger node. If null, use YasminNode. |
| rclcpp::Node * yasmin_ros::logger_node = nullptr |
Node used in the YASMIN ROS 2 logs.