ROS v0.1.0 ROS.Message View Source
Functions for serializing and deserializing ROS Messages sent over the wire.
Link to this section Summary
Functions
Deserialize a binary message from a publisher into an Elixir struct
Serialize an Elixir struct to a binary transmittable over the wire
Link to this section Functions
Deserialize a binary message from a publisher into an Elixir struct.
Examples
iex> data = <<0, 0, 176, 65, 0, 0, 4, 66, 0, 0, 48, 66, 0, 0, 0, 0>>
iex> ROS.Message.deserialize(data, "std_msgs/ColorRGBA")
%StdMsgs.ColorRGBA{r: 22.0, g: 33.0, b: 44.0, a: 0.0}
iex> ROS.Message.deserialize(data, StdMsgs.ColorRGBA)
%StdMsgs.ColorRGBA{r: 22.0, g: 33.0, b: 44.0, a: 0.0}