How to create a .txt file in bsagent.cc to see the results of leach simulaion in ns2?
Hello,
i want to see the average energy in a text file like avg_energy.txt in each round. I have set file functions to write on that file but it doesn't work. can any one help me, plz? It's urgent... I am in ending position.. thanks in advance. |
One thing is sure :
Just adding a text won't do, as no files.cc are used after creating the executable 'ns'. All functions in files.cc are compiled into that one file : ns. ( And after doing the build command, files.cc could actually be deleted.) If you want a new behavior from bsagent.cc, the edited file must be compiled into a new executable 'ns'. - |
All times are GMT -5. The time now is 03:47 AM. |