[ns] How to generate energy traces periodically

Mubashir Rehmani mshrehmani at gmail.com
Thu Jan 22 07:08:09 PST 2009


Hi Manish,

Yes, it is possible. What you have to do is that, in the cmu trace file,
where energy module is given, just write a condition that if simulator time
is 100 secs, then print the trace in the trace file or you can declare a
timer over there which will expire as per your desire. Each time when it
will expire, it will print the energy values in the trace file.

Hope it helps

Regards

Mubashir Husain Rehmani
Lip6, UPMC, Paris, France
www-npa.lip6.fr/~rehmani

2009/1/22 manish chaturvedi <msc.nit at gmail.com>

>
> Hi,
>
> I am using energy model in my NS simulation.
>
> When energy trace is ON, every time the node energy changes, the trace
> is generated. This makes trace file size larger. Is there any way to
> generate trace of energy status of all nodes at some fixed time or
> periodically?
>
> Please inform or point me to some source of information.
>
> Thanking you,
> Manish
>
>


-- 
Mubashir Husain Rehmani


More information about the Ns-users mailing list