Beruflich Dokumente
Kultur Dokumente
com
2. In the node configuration set the EnergyModel, Initial Energy value, power spent in
receiving mode,transmit mode,idle mode and sleep mode.
visit http://getch.wordpress.com
http://getch.wordpress.com
3. Now we will move to the backend code(c++). Our edits would be performed only in
aodv.cc and aodv.h.
4. In aodv.h,first include the following header file that contains the procedures/functions
needed to access node postion,energy and several other functions.
#include <mobilenode.h>
You will find class AODV, something like the one shown below.
visit http://getch.wordpress.com
http://getch.wordpress.com
With that, no more work to be done in aodv.h. What we have actually done here is to
declare the variables that we will using in aodv.cc to record a nodes position and energy.
6. In aodv.cc, we will initialize the variables that we have just declared in aodv.h. This
we do in the AODV “constructor“(invoked only once during node creation).
http://getch.wordpress.com
7. Next, we include the code to access the functions in mobilenode.h that fetch the
nodes position and energy.
I have included that code AODV::forward() function, so that the nodes position and
energy are printed each time it forwards a packet. Where and When you want them to be
printed is your choice. Alternatively, you may have the code include in the function of
your choice and have the output redirected to a file.
$ns simple-wireless.tcl
If you find any discrepancies in this post, please feel free to drop me a mail at
micman.manoj@hotmail.com . By doing so, You would be saving the
valuable time of many researchers.
visit http://getch.wordpress.com
ManojKumar.A
http://getch.wordpress.com