[ns] debugging in NS
Hi, I am using ns for the first time , I have a program that was implemented and tested by a researcher in ns-2.26, my first question : should it work on ns-2.29.3, I have trouble in excuting it , the make command works but when I launch the ns command no thing happens, any one available to execute it on its machine? what do you use for debugging: messages with put?? Thanks for help Nabila from Montreal From: Mohammad Nassiri <[EMAIL PROTECTED]> To: ns-users@ISI.EDU Subject: [ns] Busy tone in NS2 or DBTMA code Date: Tue, 27 Feb 2007 18:02:43 +0100 Hi all I want to implement a MAC protocol based on 802.11. In this MAC mechanism, each emitter emits a busy tone during transmission. Would you please tell me how I can implement "busy tone" in NS2. All comments and any source code appreciated. Also I looked for DBTMA code in NS2 but I could not find it. Thanks in advance, Mohammad NASSIRI _ Find what you need at prices youll love. Compare products and save at MSN® Shopping. http://shopping.msn.com/default/shp/?ptnrid=37,ptnrdata=24102&tcode=T001MSN20A0701
[ns] C++ variables to TCL
Hi,I would like to know if there is a possibility to see variables values from a c++ program by a TCL script, the variables are continously modified during the simulation and I want to use their values by a routing TCL program , Thanks for help Nabila _ Kick back and relax with hot games and cool activities at the Messenger Café. http://www.cafemessenger.com?ocid=TXT_TAGLM_SeptWLtagline
Re: [ns] C++ variables to TCL
Hi every body, As I am a beginner in using Ns, I would like to know the more efficient way to use TCL and C++, for example for a routing function , is C++ more useful than TCL or the inverse? Thanks for help nabila > From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]; ns-users@isi.edu> Subject: > RE: [ns] C++ variables to TCL> Date: Mon, 24 Sep 2007 09:15:30 +0300> > > > Nabila,> > If u want to have a contact with C++, i recommend to read > carefully ns2 manual, as it has alot of options and detailed infor regarding > contact between Otcl code and C++.> > Regards,> Ahmad Osman> > > > From: [EMAIL PROTECTED]> To: > ns-users@ISI.EDU> Date: Fri, 21 Sep 2007 18:50:09 +> Subject: [ns] C++ > variables to TCL Hi,I would like to know if there is a possibility to see > variables values from a c++ program by a TCL script, the variables are > continously modified during the simulation and I want to use their values by > a routing TCL program ,>> Thanks for help>> Nabila>> > _> Kick back > and relax with hot games and cool activities at the Messenger Café.> > http://www.cafemessenger.com?ocid=TXT_TAGLM_SeptWLtagline> > > _> Connect to > the next generation of MSN Messenger > > http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline _ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx
[ns] error about Agent.h
Hi, I tried to compile a programm in c++ that include Agent.h , I got an error , it doe not find Agent.h although every thing was working perfectly 3 months ago, soe thing has changed, how to establish the paths to files .h Thanks for help Nabila _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
[ns] access to TCL instance variables
Hi,How do we access instance variables of a c++ class in tcl code I tried thefolowing: set myagent [new Agent/MyAgentOtcl]# Set configurable parameters of MyAgent$myagent set my_var1_otcl 4$myagent set my_var2_otcl 3.14$myagent call-my-priv-funcset intvar 0set intvar [Agent/MyAgentOtcl my_var1_otcl] puts "my_var1_otcl = $intvar" I have had this:my_var1_otcl= my_var1_otclthe name instead of th value, what's the problem, neither set intvar $myagent my_var1_otcl works Thanks for helpnabila _ Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033
Re: [ns] access to TCL instance variables
This is what I did, we can set a value to the variable like you did but how to get its value, for printing for example > To: [EMAIL PROTECTED]; ns-users@ISI.EDU> Subject: Re: [ns] access to TCL > instance variables> From: [EMAIL PROTECTED]> Date: Tue, 6 Nov 2007 08:13:30 > -0800> > > Hi Nabila,> > First of all, you need to bind your OTcl class > Agent/MyAgentOtcl to, for> example, MyAgent. Secondly, suppose you need to > access variable my_var_> of class MyAgent. You need to bind this variable to > the OTcl domain.> This can be done in the constructor:> > MyAgent:MyAgent()> > {> bind("my_var_", &my_var_);> }> > Then you will be able to access varaible > my_var_ from the OTcl domain:> > set myagent [new Agent/MyAgentOtcl]> > $myagent set my_var_ 10> > Good Luck> Teerawat> > On 11/6/2007, "Nabila > khedimi" <[EMAIL PROTECTED]> wrote:> > >> >> >Hi,How do we access instance > variables of a c++ class in tcl code I tried thefolowing: set myagent [new > Agent/MyAgentOtcl]# Set configurable parameters of MyAgent$myagent set > my_var1_otcl 4$myagent set my_var2_otcl 3.14$myagent call-my-priv-funcset > intvar 0set intvar [Agent/MyAgentOtcl my_var1_otcl] puts "my_var1_otcl = > $intvar" I have had this:my_var1_otcl= my_var1_otclthe name instead of th > value, what's the problem, neither set intvar $myagent my_var1_otcl works > Thanks for helpnabila> > >_> >Windows > Live Hotmail and Microsoft Office Outlook – together at last. Get it now.> > >http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033> > > _ Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
[ns] a loop or a start and stop methods
Hi, I want to execute a ping agent continuously during the simulation, regarding the schedular object in NS, is there any the difference between making a infinite loop inside the tcl code or define a start and a stop method inside the ping agent code(which is a c++ program) Thanks for help Nabila > To: [EMAIL PROTECTED]; ns-users@isi.edu> Subject: RE: [ns] access to TCL > instance variables> From: [EMAIL PROTECTED]> Date: Tue, 6 Nov 2007 10:05:46 > -0800> > > Nabila,> > To print the value, you may do something like> > puts > [$myagent set myvar_]> > Cheers,> Teerawat> > On 11/6/2007, "Nabila khedimi" > <[EMAIL PROTECTED]> wrote:> > >> >This is what I did, we can set a value to > the variable like you did but how to get its value, for printing for example> > > > >> To: [EMAIL PROTECTED]; ns-users@ISI.EDU> Subject: Re: [ns] access to > TCL instance variables> From: [EMAIL PROTECTED]> Date: Tue, 6 Nov 2007 > 08:13:30 -0800> > > Hi Nabila,> > First of all, you need to bind your OTcl > class Agent/MyAgentOtcl to, for> example, MyAgent. Secondly, suppose you need > to access variable my_var_> of class MyAgent. You need to bind this variable > to the OTcl domain.> This can be done in the constructor:> > > MyAgent:MyAgent()> {> bind("my_var_", &my_var_);> }> > Then you will be able > to access varaible my_var_ from the OTcl domain:> > set myagent [new > Agent/MyAgentOtcl]> $myagent set my_var_ 10> > Good Luck> Teerawat> > On > 11/6/2007, "Nabila khedimi" <[EMAIL PROTECTED]> wrote:> > >> >> >Hi,How do we > access instance variables of a c++ class in tcl code I tried thefolowing: set > myagent [new Agent/MyAgentOtcl]# Set configurable parameters of > MyAgent$myagent set my_var1_otcl 4$myagent set my_var2_otcl 3.14$myagent > call-my-priv-funcset intvar 0set intvar [Agent/MyAgentOtcl my_var1_otcl] puts > "my_var1_otcl = $intvar" I have had this:my_var1_otcl= my_var1_otclthe name > instead of th value, what's the problem, neither set intvar $myagent > my_var1_otcl works Thanks for helpnabila> > >_> >Windows > Live Hotmail and Microsoft Office Outlook – together at last. Get it now.> > >http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033> > >> >_> >Boo! > Scare away worms, viruses and so much more! Try Windows Live OneCare!> > >http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews _ Help yourself to FREE treats served up daily at the Messenger Café. Stop by today. http://www.cafemessenger.com/info/info_sweetstuff2.html?ocid=TXT_TAGLM_OctWLtagline
[ns] Traffic generation in a proc
Hi every one, I wrote a tcl proc for the generation of a cbr trafic : proc generate_cbr_traffic {agent_src size rate start_time end_time} { global ns puts "In generate cbr: $agent_src $size $rate $start_time $end_time" set cbr_ [new Application/Traffic/CBR] $cbr_ set type_ CBR $cbr_ set packetsize_ $size $cbr_ set rate_ $rate $cbr_ attach-agent $agent_src $ns at $start_time "$cbr_ start" $ns at $end_time "$cbr_ stop"} I made the connection of the udp agents outside the procedure , when I call the procedure, in the NAM environment no traffic was generated , Thanks for your help nabila _ Your smile counts. The more smiles you share, the more we donate. Join in. www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline
[ns] Traffic generation in a proc
Hi every one, I wrote a tcl proc for the generation of a cbr trafic : proc generate_cbr_traffic {agent_src size rate start_time end_time} { global ns puts "In generate cbr: $agent_src $size $rate $start_time $end_time" set cbr_ [new Application/Traffic/CBR] $cbr_ set type_ CBR $cbr_ set packetsize_ $size $cbr_ set rate_ $rate $cbr_ attach-agent $agent_src $ns at $start_time "$cbr_ start" $ns at $end_time "$cbr_ stop"} I made the connection of the udp agents outside the procedure , when I call the procedure, in the NAM environment no traffic was generated , Thanks for your help nabila _ Put your friends on the big screen with Windows Vista® + Windows Live™. http://www.microsoft.com/windows/shop/specialoffers.mspx?ocid=TXT_TAGLM_CPC_MediaCtr_bigscreen_102007
Re: [ns] Traffic generation in a proc
it works without procedure but as I want the code to be in a procedure in order to call it several times so I don't have to repeat writing it in different parts of the program thanks for help nabila Date: Mon, 19 Nov 2007 10:46:30 -0800From: [EMAIL PROTECTED]: Re: [ns] Traffic generation in a procTo: [EMAIL PROTECTED]: ns-users@isi.edu Hi ns user, Try to wirte the cbr traffic without procedure to show it is correct or not. Like # Traffic Source 1: Mobile node1->node3, flowid=1set udp1 [new Agent/UDP]$ns_ attach-agent $node_(1) $udp1$udp1 set class_ 1$udp1 set fid_ 1set cbr1 [new Application/Traffic/CBR]$cbr1 attach-agent $udp1$cbr1 set rate_ 20kb$cbr1 set packetSize_ 512#$cbr1 set interval_ 0.2 # Set loss monitor (to count bytes) at node 3set null1 [new Agent/Null]$ns_ attach-agent $node_(8) $null1 # Connect the CBR generator to the loss monitor$ns_ connect $udp1 $null1 Cheers, Mohammed AbuHajar - Original Message ----From: Nabila khedimi <[EMAIL PROTECTED]>To: [EMAIL PROTECTED]: Monday, November 19, 2007 7:27:35 PMSubject: [ns] Traffic generation in a procHi every one,I wrote a tcl proc for the generation of a cbr trafic :proc generate_cbr_traffic {agent_src size rate start_time end_time} { global ns puts "In generate cbr: $agent_src $size $rate $start_time $end_time" set cbr_ [new Application/Traffic/CBR] $cbr_ set type_ CBR $cbr_ set packetsize_ $size $cbr_ set rate_ $rate $cbr_ attach-agent $agent_src $ns at $start_time "$cbr_ start" $ns at $end_time "$cbr_ stop"}I made the connection of the udp agents outside the procedure , when I call the procedure, in the NAM environment no traffic was generated , Thanks for your helpnabila_Your smile counts. The more smiles you share, the more we donate. Join in.www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. _ Connect and share in new ways with Windows Live. http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007
Re: [ns] Traffic generation in a proc
Hi, I am still wondering about the no generation of a trafic when it is done by a procedure although the same code made outside works, but when I put it in a procedure it does not!!! anyone has an idea nabila Date: Mon, 19 Nov 2007 10:46:30 -0800From: [EMAIL PROTECTED]: Re: [ns] Traffic generation in a procTo: [EMAIL PROTECTED]: ns-users@isi.edu Hi ns user, Try to wirte the cbr traffic without procedure to show it is correct or not. Like # Traffic Source 1: Mobile node1->node3, flowid=1set udp1 [new Agent/UDP]$ns_ attach-agent $node_(1) $udp1$udp1 set class_ 1$udp1 set fid_ 1set cbr1 [new Application/Traffic/CBR]$cbr1 attach-agent $udp1$cbr1 set rate_ 20kb$cbr1 set packetSize_ 512#$cbr1 set interval_ 0.2 # Set loss monitor (to count bytes) at node 3set null1 [new Agent/Null]$ns_ attach-agent $node_(8) $null1 # Connect the CBR generator to the loss monitor$ns_ connect $udp1 $null1 Cheers, Mohammed AbuHajar - Original Message From: Nabila khedimi <[EMAIL PROTECTED]>To: [EMAIL PROTECTED]: Monday, November 19, 2007 7:27:35 PMSubject: [ns] Traffic generation in a procHi every one,I wrote a tcl proc for the generation of a cbr trafic :proc generate_cbr_traffic {agent_src size rate start_time end_time} { global ns puts "In generate cbr: $agent_src $size $rate $start_time $end_time" set cbr_ [new Application/Traffic/CBR] $cbr_ set type_ CBR $cbr_ set packetsize_ $size $cbr_ set rate_ $rate $cbr_ attach-agent $agent_src $ns at $start_time "$cbr_ start" $ns at $end_time "$cbr_ stop"}I made the connection of the udp agents outside the procedure , when I call the procedure, in the NAM environment no traffic was generated , Thanks for your helpnabila_Your smile counts. The more smiles you share, the more we donate. Join in.www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. _ Have fun while connecting on Messenger! Click here to learn more. http://entertainment.sympatico.msn.ca/WindowsLiveMessenger
Re: [ns] OK
just to your knowledge, no problem arises for the exponnential traffic, the procedure works perfectly, can a cbr traffic simulated by a an exponential with 0 for idle time? Thanks for help > Date: Tue, 20 Nov 2007 10:08:51 -0800 > From: [EMAIL PROTECTED] > Subject: OK > To: [EMAIL PROTECTED] > > Dear Mis,Nabila > I will review this point and will return to you as sooner as possible,don't > worry about that. > > Regards > Mohammed AbuHajar > > - Original Message > From: Nabila khedimi > To: Mohammed Abu Hajar > Cc: NS_2 Mailing List > Sent: Tuesday, November 20, 2007 4:38:48 PM > Subject: RE: [ns] Traffic generation in a proc > > Hi, > I am still wondering about the no generation of a trafic when it is done by a > procedure although the same code made outside works, but when I put it in a > procedure it does not!!! anyone has an idea > nabila > > > Date: Mon, 19 Nov 2007 10:46:30 -0800 > From: [EMAIL PROTECTED] > Subject: Re: [ns] Traffic generation in a proc > To: [EMAIL PROTECTED] > CC: ns-users@isi.edu > > Hi ns user, > Try to wirte the cbr traffic without procedure to show it is correct or not. > Like > > # Traffic Source 1: Mobile node1->node3, flowid=1 > set udp1 [new Agent/UDP] > $ns_ attach-agent $node_(1) $udp1 > $udp1 set class_ 1 > $udp1 set fid_ 1 > set cbr1 [new Application/Traffic/CBR] > $cbr1 attach-agent $udp1 > $cbr1 set rate_ 20kb > $cbr1 set packetSize_ 512 > #$cbr1 set interval_ 0.2 > # Set loss monitor (to count bytes) at node 3 > set null1 [new Agent/Null] > $ns_ attach-agent $node_(8) $null1 > # Connect the CBR generator to the loss monitor > $ns_ connect $udp1 $null1 > > > Cheers, > Mohammed AbuHajar > > - Original Message > From: Nabila khedimi > To: ns-users@ISI.EDU > Sent: Monday, November 19, 2007 7:27:35 PM > Subject: [ns] Traffic generation in a proc > > > > Hi every one, > I wrote a tcl proc for the generation of a cbr trafic : > > proc generate_cbr_traffic {agent_src size rate start_time end_time} { > global ns puts "In generate cbr: $agent_src $size $rate $start_time > $end_time" set cbr_ [new Application/Traffic/CBR] $cbr_ set type_ CBR $cbr_ > set packetsize_ $size $cbr_ set rate_ $rate $cbr_ attach-agent $agent_src $ns > at $start_time "$cbr_ start" $ns at $end_time "$cbr_ stop"} > > I made the connection of the udp agents outside the procedure , when I call > the procedure, in the NAM environment no traffic was generated , > > > Thanks for your help > nabila > _ > Your smile counts. The more smiles you share, the more we donate. Join in. > www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline > > > > Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. > > Have fun while connecting on Messenger! Click here to learn more. > > > > Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it > now. _ R U Ready for Windows Live Messenger Beta 8.5? Try it today! http://entertainment.sympatico.msn.ca/WindowsLiveMessenger
[ns] rtmodel-at down seems to do nothing
Hi micah and all, did you resolve the problem, I have the same one; it is about the use of rtmodel-at in a procedure, it does not work in real time details below thanmks for help Nabila micah said: Hello, The Link Failure code from Marc Greis' Tutorial works fine for me. However, when I use almost the exact same code from my app, the code doesn't seem to do anything. There are no corresponding entries in the network trace or nam files, despite the fact that the code executes. I'm calling the code from C++ via: Tcl &tcl = Tcl::instance(); tcl.evalf( "$ns rtmodel-at %f down $n(%d) $n(%d)", Scheduler::instance().clock() + 0.0001, ip1, ip2 ); I know the code is executing, but nothing seems to happen. There are a few posts on the ns2 listserv archive (e.g., "rtmodel-at doesn't work inside a procedure"), but unfortunately these posts don't have replies. Also, I'm not really running rtmodel-at from within a procedure, unless tcl.evalf counts. A few other helpful notes: I'm not using "$ns rtproto DV" because I don't want dynamic routing. I don't call "$ns rtproto" at all. Links are created using "$ns duplex-link". Any help would be gratefully appreciated! _ Read what Santa`s been up to! For all the latest, visit asksantaclaus.spaces.live.com! http://asksantaclaus.spaces.live.com/