rclcpp  master
C++ ROS Client Library API
Public Member Functions | List of all members
rclcpp::SerializationBase Class Reference

Interface to (de)serialize a message. More...

#include <serialization.hpp>

Inheritance diagram for rclcpp::SerializationBase:
Inheritance graph
[legend]

Public Member Functions

 SerializationBase (const rosidl_message_type_support_t *type_support)
 Constructor of SerializationBase. More...
 
virtual ~SerializationBase ()=default
 Destructor of SerializationBase. More...
 
void serialize_message (const void *ros_message, SerializedMessage *serialized_message) const
 Serialize a ROS2 message to a serialized stream. More...
 
void deserialize_message (const SerializedMessage *serialized_message, void *ros_message) const
 Deserialize a serialized stream to a ROS message. More...
 

Detailed Description

Interface to (de)serialize a message.

Constructor & Destructor Documentation

◆ SerializationBase()

rclcpp::SerializationBase::SerializationBase ( const rosidl_message_type_support_t *  type_support)
explicit

Constructor of SerializationBase.

Parameters
[in]type_supporthandle for the message type support to be used for serialization and deserialization.

◆ ~SerializationBase()

virtual rclcpp::SerializationBase::~SerializationBase ( )
virtualdefault

Destructor of SerializationBase.

Member Function Documentation

◆ serialize_message()

void rclcpp::SerializationBase::serialize_message ( const void *  ros_message,
SerializedMessage serialized_message 
) const

Serialize a ROS2 message to a serialized stream.

Parameters
[in]ros_messageThe ROS2 message which is read and serialized by rmw.
[out]serialized_messageThe serialized message.

◆ deserialize_message()

void rclcpp::SerializationBase::deserialize_message ( const SerializedMessage serialized_message,
void *  ros_message 
) const

Deserialize a serialized stream to a ROS message.

Parameters
[in]serialized_messageThe serialized message to be converted to ROS2 by rmw.
[out]ros_messageThe deserialized ROS2 message.

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