Function dynmsg::c::message_to_yaml
Defined in File message_reading.hpp
Function Documentation
-
YAML::Node dynmsg::c::message_to_yaml(const RosMessage &message)
Parse a ROS message stored in a raw buffer into a YAML representation.
The “message” argument contains both a pointer to the raw buffer and a pointer to the ROS type’s introspection information as retrieved from an introspection type support library. (See the “get_type_info” function in typesupport_utils.hpp for loading introspection type support.)
This function will use the provided introspection information to read the binary data out of the ROS message-containing raw buffer and convert it into a YAML representation. The YAML representation is a tree structure, with each node in the tree being a field in the message. Each field is represented by two values: the ROS type of the field, in a textual representation, and the value. For an example of the YAML structure, run the CLI tool and echo a topic; the resulting YAML printed to the terminal is the structure used.