[ros-users] Message construction with memcpy
morris at ee.ccny.cuny.edu
Thu Jul 8 23:21:00 UTC 2010
I am wondering if there is a suggested method for constructing a message
directly from binary data stored in memory.
Right now I read in data from a serial port into a buffer and once I
have a complete chunk of data I memcpy it into a struct. I then copy
each item in the struct into the message, item by item. I would like to
avoid copying each item individually by name.
Are the following structs and messages laid out in memory the same way?
Are there byte order or alignment issues I should be aware of if i
attempt to create a message using memcpy?
Do I want to deserialize or serialize the message? Is there
documentation for this somewhere? Is there a better way to do this?
More information about the ros-users