[ns] Transmission range of a wireless node?
Hi ns2 users, I am trying to get the transmission range of a node and put it in my customized trace file. But when I access the variable radius_ in mobilenode.cc, the value is always zero. In my intuition, when I use: Phy/WirelessPhy set RXThresh_ 1.20174e-07 the value 1.20174e-07 should be convert correspondingly to meter and store in radius_, but it seems not happen like that. So my question is how to get the range of node, by meter, to put it in my trace file (or simply print it on the screen)? Thank you, Hieu Nguyen
[ns] Node radius in Wireless Simulation
Hello, I created a sample script to test wireless network in ns2. As I know, to set the radius of node, I set it in the Phy/WirelessPhy agent by using the two following scripts in tcl: Phy/WirelessPhy set CSThresh_ 1.20174e-07 Phy/WirelessPhy set RXThresh_ 1.20174e-07 When I tried to print out the radius of a wireless node by using node-radius(), I just got the result 0. How can I modify to have the radius of node by using function radius()?
[ns] wireless trace ns2
I created a sample simulation script for wireless node and run in ns2. The trace file result I do not see any forward event (f), just send (s) and receive (r) and drop (D). In addition, the next hop traced in each line always has address -1, as the example below. s 0.176746677 _2_ RTR --- 4 message 32 [0 0 0 0] --- [2:255 -1:255 32 0] r 0.177766702 _37_ RTR --- 4 message 32 [0 2 800] --- [2:255 -1:255 32 0] r 0.177766737 _36_ RTR --- 4 message 32 [0 2 800] --- [2:255 -1:255 32 0] r 0.177766747 _34_ RTR --- 4 message 32 [0 2 800] --- [2:255 -1:255 32 0] r 0.177766747 _19_ RTR --- 4 message 32 [0 2 800] --- [2:255 -1:255 32 0] r 0.177766757 _20_ RTR --- 4 message 32 [0 2 800] --- [2:255 -1:255 32 0] r 0.177766803 _17_ RTR --- 4 message 32 [0 2 800] --- [2:255 -1:255 32 0] r 0.177766807 _28_ RTR --- 4 message 32 [0 2 800] --- [2:255 -1:255 32 0] s 0.192489910 _18_ RTR --- 5 message 32 [0 0 0 0] --- [18:255 -1:255 32 0] r 0.193509954 _21_ RTR --- 5 message 32 [0 12 800] --- [18:255 -1:255 32 0] r 0.193510003 _26_ RTR --- 5 message 32 [0 12 800] --- [18:255 -1:255 32 0] r 0.193510009 _41_ RTR --- 5 message 32 [0 12 800] --- [18:255 -1:255 32 0] r 0.193510021 _42_ RTR --- 5 message 32 [0 12 800] --- [18:255 -1:255 32 0] r 0.193510023 _4_ RTR --- 5 message 32 [0 12 800] --- [18:255 -1:255 32 0] r 0.193510027 _30_ RTR --- 5 message 32 [0 12 800] --- [18:255 -1:255 32 0] s 0.225677362 _35_ RTR --- 6 message 32 [0 0 0 0] --- [35:255 -1:255 32 0] r 0.227077469 _5_ RTR --- 6 message 32 [0 23 800] --- [35:255 -1:255 32 0] Can anyone explain me why or show me the way to customize ns2 for better wireless trace file?
[ns] How CMUTrace works?
Hello, Can anyone explain how CMUTrace works? (when an object of CMUTrace is initialized? where in ns2 code?) I searched for one day but could not figure out :-( Hieu Nguyen
Re: [ns] How CMUTrace works?
I read the code and found a global instproc cmu-trace used to create a cmu object: set sndT [cmu-trace Send RTR $self] but I can not find out where the instproc cmu-trace is implemented. From: Vagelis Chatzistavros ec3...@ee.duth.gr To: 'nguyen hieu' heave...@yahoo.com; 'ns-users@isi.edu' ns-users@ISI.EDU Sent: Tuesday, December 25, 2012 3:36 PM Subject: RE: [ns] How CMUTrace works? Hi, check this out, it should help: http://www.winlab.rutgers.edu/~zhibinwu/html/ns_trace.html -Original Message- From: ns-users-boun...@isi.edu [mailto:ns-users-boun...@isi.edu] On Behalf Of nguyen hieu Sent: Tuesday, December 25, 2012 10:25 AM To: ns-users@isi.edu Subject: [ns] How CMUTrace works? Hello, Can anyone explain how CMUTrace works? (when an object of CMUTrace is initialized? where in ns2 code?) I searched for one day but could not figure out :-( Hieu Nguyen
Re: [ns] How CMUTrace works?
I found it. the intsproc cmu-trace is defined at /ns/tcl/mobility/com.tcl :-) From: nguyen hieu heave...@yahoo.com To: Vagelis Chatzistavros ec3...@ee.duth.gr; 'ns-users@isi.edu' ns-users@ISI.EDU Sent: Tuesday, December 25, 2012 3:48 PM Subject: Re: [ns] How CMUTrace works? I read the code and found a global instproc cmu-trace used to create a cmu object: set sndT [cmu-trace Send RTR $self] but I can not find out where the instproc cmu-trace is implemented. From: Vagelis Chatzistavros ec3...@ee.duth.gr To: 'nguyen hieu' heave...@yahoo.com; 'ns-users@isi.edu' ns-users@ISI.EDU Sent: Tuesday, December 25, 2012 3:36 PM Subject: RE: [ns] How CMUTrace works? Hi, check this out, it should help: http://www.winlab.rutgers.edu/~zhibinwu/html/ns_trace.html -Original Message- From: ns-users-boun...@isi.edu [mailto:ns-users-boun...@isi.edu] On Behalf Of nguyen hieu Sent: Tuesday, December 25, 2012 10:25 AM To: ns-users@isi.edu Subject: [ns] How CMUTrace works? Hello, Can anyone explain how CMUTrace works? (when an object of CMUTrace is initialized? where in ns2 code?) I searched for one day but could not figure out :-( Hieu Nguyen
[ns] What is the purpose of InstVar?
Dear friends, I am reading chapter 13 of the book Introduction to ns2 about trace in ns2. As I know, the TclObject class keeps a variable of type InstVar* to a list of InstVar objects in order to trace. The InstVar has three variables tracedvar_, name_ and next_. name_ and next_ are clear in purpose, tracedvar_ acts as a pointer to a TracedVar object. So I understand that the purpose of InstVar is to trace variables of TclObject. If tracedvar_ can be null, what is the purpose of InstVar now? Hieu Nguyen
[ns] tracing in ns2
Hello, I am designing a new trace file for ns2, which is suitable for my work. I read the trace tutorial in nsdoc and the book Introduction to ns2 but there are something unclear to me. First, as in the book mentioned, the Trace class was designed for packet tracing, so what is the really role of a BaseTrace object (the variable of type BaseTrace in the Trace class was commented for packing tracing). CMUTrace class was designed to trace in wireless network. As far as I understand, it supports tracing everything (not packets only) because it has no implementation of the variable src_ and dst_ of the Trace class, although it derives from it. My tracing file I want to design is something like the nam trace. It is designed exclusively for wireless network. First, it should have overall network information (xSize, ySize), node information (id, x, y, z, energy), events tracing (send, receive, forwarding, drop of packets, and sleep and wake of nodes). What is the best implementation for my design? Hope to have some suggestions. Thank you, Hieu Nguyen