[ns] serialization in ns-2
Sampath N Ranasinghe
sampath.ranasinghe at kcl.ac.uk
Wed Jul 25 03:55:11 PDT 2007
Hi,
I have actually dabbled with the concept of serializing objects for
transmission over network in ns2. In my experience serialization of
objects for transmission over a network is a complicated process. So
instead of actually serializing the object itself I create a serialized
version of it the form of a packet. The packet contains all the
information required to instantiate the object on the receiving end
without actually serializing and encapsulating the object itself.
Something similar to below :
Object a = new Object;
char * sObj = a->serialise();
..
..
Encapsulate sObj inside a packet
..
..
send(packet)
Hope this helps.
Kind Regards,
Sampath
Kwnstantina Palla wrote:
> Hello !
> i was searching through the mailing-list in order to find something similar
> but i didn't. So i would appreciate it if anyone gave me an answer.
> Is it possible to serialize an object (class instance) in order to send it
> through the network? (wireless).
> Has anyone tried something like that?
> I googled a lot, but it seems that serialization is pretty tough.
> I found that some libraries might be needed in order to extend c++ with such
> feature. (I found libraries like "boost" libraries).
> However i am afraid that then i would have to tackle with compatibility
> issues.
> I would really appreciate any help!
>
>
--
Sampath N. Ranasinghe
PhD Student
Centre for Telecommunications Research
Department of Electronic Engineering
King's College London
United Kingdom.
Email: sampath.ranasinghe at kcl.ac.uk
Tel : +44 (0) 20 7848 2889
More information about the Ns-users
mailing list