Jordan Mihaylov
unread,Sep 20, 2012, 5:14:21 PM9/20/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ns-3-...@googlegroups.com
Hi,
You have the Buffer::Iterator i ...
so try the following:
// for Serialization
i.Write((uint8_t*) &velocity, sizeof(velocity));
// for Deserialization
i.Read((uint8_t*) &velocity, sizeof(velocity));
I'm not sure if std::vector has some storage overhead, e.g. if it's size > 3x sizeof(double), so let's suppose that "velocity" in my example represents a simple struct like:
struct vel3d{
double x;
double y;
double z;
} velocity;