r2r_spl.serialization module
- class r2r_spl.serialization.Serialization(msg_class, player_num=None)
Bases:
object
- deserialize(serialized)
Deserialize a byte array to a ROS message.
Returns None, if message received was one sent from ourself. Raises construct.core.StreamError if deserialization fails.
- serialize(msg_instance)
Serialize a message to a byte array.
- r2r_spl.serialization.to_container(msg_instance) construct.Container
- r2r_spl.serialization.to_msg(container, msg_class)
- r2r_spl.serialization.to_struct(msg_class) construct.Struct
Convert a message to a construct struct.