LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-08-2014, 01:50 AM   #1
Mehedi Hasan
LQ Newbie
 
Registered: Aug 2014
Posts: 11

Rep: Reputation: Disabled
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.
 
Old 09-08-2014, 05:42 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,481

Rep: Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232Reputation: 3232
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'.

-
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a nam file to see the scenario of leach protocol in NS2 ? Mehedi Hasan Linux - Newbie 1 09-01-2014 09:44 AM
Differences between LEACH results on ns2.1b5 and ns2.35 deepa_2111 Linux - Software 15 05-16-2013 05:53 PM
how to generate nam file after installing leach in ns2.34 rakeshpanchiwala Linux - Software 0 01-13-2013 12:45 PM


All times are GMT -5. The time now is 05:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration