Class SerializationBase

Inheritance Relationships

Derived Type

Class Documentation

class SerializationBase

Interface to (de)serialize a message.

Subclassed by rclcpp::Serialization< MessageT >

Public Functions

explicit SerializationBase(const rosidl_message_type_support_t *type_support)

Constructor of SerializationBase.

Parameters:

type_support – handle for the message type support to be used for serialization and deserialization.

virtual ~SerializationBase() = default

Destructor of SerializationBase.

void serialize_message(const void *ros_message, SerializedMessage *serialized_message) const

Serialize a ROS2 message to a serialized stream.

Parameters:
  • ros_message[in] The ROS2 message which is read and serialized by rmw.

  • serialized_message[out] The serialized message.

void deserialize_message(const SerializedMessage *serialized_message, void *ros_message) const

Deserialize a serialized stream to a ROS message.

Parameters:
  • serialized_message[in] The serialized message to be converted to ROS2 by rmw.

  • ros_message[out] The deserialized ROS2 message.