[ns] How to compile and run tcl files?

2007-09-12 Thread Kavuluri, Mallesh (IE10)


Hai,

 I have written some .cc and .h files in a folder GPW. 
In the same folder I have written  gpw.tcl file. In makefile.vc 
and Makefile of higher directory I have included GPW folder in INCLUDES
list. And I have included  .o files at the end of OBJ_STL list.

I am typing make to compile. It is compiling. Then When I type
The command ns gpw.tcl, in the output I am not getting the changes that
have been made. Even if I remove all .cc, .h, .o files( all files except
gpw.tcl) in GPW  folder and type ns gpw.tcl, I am getting the same
output. The changes that I have made are not getting reflected.


In SUMMARY,
what is the normal way to compile .cc files that .tcl file
requires and run  the .tcl files? How shall we make necessary changes in

Makefile?

-Regards,
Mallesh



[ns] How to compile and run tcl files?

2007-09-12 Thread Kavuluri, Mallesh (IE10)


Hai,

 I have written some .cc and .h files in a folder GPW. 
In the same folder I have written  gpw.tcl file. In makefile.vc 
and Makefile of higher directory I have included GPW folder in INCLUDES
list. And I have included  .o files at the end of OBJ_STL list.

I am typing make to compile. It is compiling. Then When I type
The command ns gpw.tcl, in the output I am not getting the changes that
have been made. Even if I remove all .cc, .h, .o files( all files except
gpw.tcl) in GPW  folder and type ns gpw.tcl, I am getting the same
output. The changes that I have made are not getting reflected.


In SUMMARY,
what is the normal way to compile .cc files that .tcl file
requires and run  the .tcl files? How shall we make necessary changes in

Makefile?

-Regards,
Mallesh



[ns] segmentation fault

2007-09-12 Thread Elahe Alipour

Hello all,

 I wrote a new agent. this agent has a command{} which receives 6 arguments. I 
used the following line to pass the arguments to the command{}.
 $ns at $now $source-ad($j) ad-request $j $peak $error $standard-dev
 but when I ran tcl script, I received this error:
 segmentation fault.  i know segmentation fault usually stems from illegal 
access to the memory but i don't know how i should solve it.
can anybody help me about this error?any kind of help.
 Thanks in advance
 
 Regards
 Elahe

   
-
Need a vacation? Get great deals to amazing places on Yahoo! Travel. 


[ns] Bit error models for NS-2

2007-09-12 Thread Raghu-kisore Neelisetti

Hi,
  I would apprceiate if you could suggest references to implementations taht 
simulate wireless losses based on SNR. I mean an error model for Ns-2 that 
simulates BER Vs SNR graph.
Any hint or idea would help.

Thanks a lot,
Raghu.



[ns] Error while using Ricean propagation model!!

2007-09-12 Thread Ghada Al-Mashaqbeh

Dear all,
   
  When I am trying to test the Ricean propagation model (after I have added it 
to NS-2) using the following code I got the following error:
  can't read propInstance_: no such variable
  while executing
  .
  .
  .
  $ns_ set propInstance_ ... 
   
  Here is the code portion related to the error:
  /**
  set val(chan)   Channel/WirelessChannel;#Channel Type
set val(prop)   Propagation/Ricean ;# radio-propagation model
set val(netif)  Phy/WirelessPhy;# network interface type
set val(mac)Mac/802_11 ;# MAC type
set val(ifq)Queue/DropTail/PriQueue;# interface queue type
set val(ll) LL ;# link layer type
set val(ant)Antenna/OmniAntenna;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 2  ;# number of mobilenodes
set val(rp) DSDV   ;# routing protocol
#set val(rp) DSR   ;# routing protocol
set val(x)  500
set val(y)  500
  
# Initialize Global Variables
set ns_  [new Simulator]
set tracefd [open wireless_mitf.tr w]
$ns_ trace-all $tracefd
  set namtrace [open wireless_mitf.nam w]
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
  # set up topography object
set topo   [new Topography]
  $topo load_flatgrid $val(x) $val(y)
  #
set prop_inst [$ns_ set propInstance_]
$prop_inst MaxVelocity  2.5;
$prop_inst RiceanK6;
$prop_inst LoadRiceFile  rice_table.txt;
***/
   
  How can I solve such error? and why it has occurred?
   
  Thanx

   
-
Don't let your dream ride pass you by.Make it a reality with Yahoo! Autos. 


Re: [ns] How to add new C++ classes to NS-2 2.31?

2007-09-12 Thread Ghada Al-Mashaqbeh

OK, after that do I need to modify any files or classes in ns2, I have added 
the Ricean model classes to the mobile directory using this method, but when I 
try to use it in my Tcl test code using the follwing code :
  /
  /**
  set val(prop)   Propagation/Ricean  ;# radio-propagation model

set prop_inst [$ns_ set propInstance_]
$prop_inst MaxVelocity  2.5;
$prop_inst RiceanK6;
$prop_inst LoadRiceFile  rice_table.txt;
/
  ***/
   
  I got the follwing error:
  invalid command Propagation/Ricean
   
  What shall I do?
   
  Thanx 

Samer Bali [EMAIL PROTECTED] wrote:
  You should add it to Makefile.in under OBJ_CC (as I remember). Then you run
configure then make.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Ghada Al-Mashaqbeh
Sent: Dienstag, 11. September 2007 20:21
To: ns-users@ISI.EDU
Subject: Re: [ns] How to add new C++ classes to NS-2 2.31?



Do I must add the line mobile/Ricean.o to the Makefile or the Makefile.in
then run configure then make in the ns2 directory?

Is this method correct?

Thanx



Ye YiBin wrote:
 
 
 You may need this page:
 http://www.isi.edu/nsnam/ns/tutorial/nsnew.html
 
 Is that Ricean.h and Ricean.cc?
 Try to add mobile/Ricean.o around Line235 on Makefile in ns directory.
 Paste your error messages here if it doesn't work.
 
 On 9/11/07, Ghada Al-Mashaqbeh wrote:


 Dear all,

 I am new to NS-2, and frankly I am still in the learning phase to use it
 in
 my Master Thesis, I am trying to include the .cc and .h classes of the
 Ricean propagation model within the simulator. I am working under windows
 (using Cygwin), and I have no .o file of the classes, I have put the
 classes
 in the mobile directory in ns, but when I am trying to compile them, a
 list
 of errors appears since many of the included classes (such as
 wireless_phy.h) is not exist in mobile directory. Then how can I include
 this class with ns-2? I have tried ./install (reinstall ns-2), also I
 have
 tried to run configure then make, but nothing work, and still there is no
 .o
 file generated nor NS-2 has added the new class.

 Please can anybody help me and give me simple instruction to that under
 windows ASAP?

 Thanx

 --
 View this message in context:

http://www.nabble.com/How-to-add-new-C%2B%2B-classes-to-NS-2-2.31--tf4416581
.html#a12597152
 Sent from the ns-users mailing list archive at Nabble.com.


 
 
 -- 
 Regards
 -Ye
 
 
 

-- 
View this message in context:
http://www.nabble.com/How-to-add-new-C%2B%2B-classes-to-NS-2-2.31--tf4416581
.html#a12620738
Sent from the ns-users mailing list archive at Nabble.com.



   
-
Catch up on fall's hot new shows on Yahoo! TV.  Watch previews, get listings, 
and more!


Re: [ns] How to add new C++ classes to NS-2 2.31?

2007-09-12 Thread Samer Bali

You should make changes in some tcl files in the directory '.../tcl/lib/'.
See the following link:
http://icapeople.epfl.ch/widmer/uwb/ns-2/index.html
In this link many changes are made to install new changes in the physical
and mac layers of ns-2. Also a new propagation model (tarokh propagation) is
also added. See what are changed in the directory '.../tcl/lib/' regarding
tarokh propagation only (DO NOT MAKE the other changes of course). You will
find the changes in patch.tcl.lib file that you can download from the link
above.

I hope that this will help you.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Ghada Al-Mashaqbeh
Sent: Mittwoch, 12. September 2007 10:01
To: ns-users@ISI.EDU
Subject: Re: [ns] How to add new C++ classes to NS-2 2.31?


OK, after that do I need to modify any files or classes in ns2, I have added
the Ricean model classes to the mobile directory using this method, but when
I try to use it in my Tcl test code using the follwing code :
  /
  /**
  set val(prop)   Propagation/Ricean  ;# radio-propagation
model

set prop_inst [$ns_ set propInstance_]
$prop_inst MaxVelocity  2.5;
$prop_inst RiceanK6;
$prop_inst LoadRiceFile  rice_table.txt;
/
  ***/
   
  I got the follwing error:
  invalid command Propagation/Ricean
   
  What shall I do?
   
  Thanx 

Samer Bali [EMAIL PROTECTED] wrote:
  You should add it to Makefile.in under OBJ_CC (as I remember). Then you
run
configure then make.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Ghada Al-Mashaqbeh
Sent: Dienstag, 11. September 2007 20:21
To: ns-users@ISI.EDU
Subject: Re: [ns] How to add new C++ classes to NS-2 2.31?



Do I must add the line mobile/Ricean.o to the Makefile or the Makefile.in
then run configure then make in the ns2 directory?

Is this method correct?

Thanx



Ye YiBin wrote:
 
 
 You may need this page:
 http://www.isi.edu/nsnam/ns/tutorial/nsnew.html
 
 Is that Ricean.h and Ricean.cc?
 Try to add mobile/Ricean.o around Line235 on Makefile in ns directory.
 Paste your error messages here if it doesn't work.
 
 On 9/11/07, Ghada Al-Mashaqbeh wrote:


 Dear all,

 I am new to NS-2, and frankly I am still in the learning phase to use it
 in
 my Master Thesis, I am trying to include the .cc and .h classes of the
 Ricean propagation model within the simulator. I am working under windows
 (using Cygwin), and I have no .o file of the classes, I have put the
 classes
 in the mobile directory in ns, but when I am trying to compile them, a
 list
 of errors appears since many of the included classes (such as
 wireless_phy.h) is not exist in mobile directory. Then how can I include
 this class with ns-2? I have tried ./install (reinstall ns-2), also I
 have
 tried to run configure then make, but nothing work, and still there is no
 .o
 file generated nor NS-2 has added the new class.

 Please can anybody help me and give me simple instruction to that under
 windows ASAP?

 Thanx

 --
 View this message in context:

http://www.nabble.com/How-to-add-new-C%2B%2B-classes-to-NS-2-2.31--tf4416581
.html#a12597152
 Sent from the ns-users mailing list archive at Nabble.com.


 
 
 -- 
 Regards
 -Ye
 
 
 

-- 
View this message in context:
http://www.nabble.com/How-to-add-new-C%2B%2B-classes-to-NS-2-2.31--tf4416581
.html#a12620738
Sent from the ns-users mailing list archive at Nabble.com.



   
-
Catch up on fall's hot new shows on Yahoo! TV.  Watch previews, get
listings, and more!



[ns] TCP Transmission between 3 mobile nodes?

2007-09-12 Thread Bahman Kalantari Sabet

Dear all,
 
I have three 802.11b mobile nodes (A.B.C), where A and C are hidden 
from each other.
 
A sends TCP packets to B (start time = 1 sec)
C sends TCP packets to B (start time = 1.5 sec)
(end time for both transmissions = 10 sec)
 
Judging by the trace file, I see that only A transmits to B all the way through 
the simulation (at the beginning C sends some Boradcast packets to B as well, 
but only 3 or 4 packets, and then it doesn't access the channel afterwards).
 
Does anyone know why this happens?  Why there isn't any collisions?
 
This situation doesn't happen in UDP Transmission. I observed there are 
collisions between packets of stations A and C, (specially, using the Basic 
Method) which reduces the overall performance. So, UDP works well.
 
Any ideas about the TCP transmission?
 
Thanks,
 
Bahman
 
 
 
 
 
_
100’s of Music vouchers to be won with MSN Music
https://www.musicmashup.co.uk


[ns] About dei80211mr library

2007-09-12 Thread Ghada Al-Mashaqbeh

Dear all,
   
  I am using ns2 under windows xP SP2 using cygwin, when I have tried to 
install dei80211mr using the same steps on its website and after installing the 
dynamic library batch, I have faced the error that no dynamic libraries is 
supported on this system (when I have tested some examples).
   
  How can I make windows support such dynamic libraries? if there is no method 
can you help me to find other libararies that run under windows to make NS-2 
support interference modeling and multirate capability which exist in 
dei80211mr?
   
  Thanx

   
-
Tonight's top picks. What will you watch tonight? Preview the hottest shows on 
Yahoo! TV.


[ns] Questions about patches added to ns-2.

2007-09-12 Thread Ghada Al-Mashaqbeh

Dear all,
   
  I have two questions related to the patch installations on ns-2:
  -- If I have more than one patch to install, must I install all of them at 
the same time or I can do that serially at different times?
  -- Can I have a confliction between batches that support common 
functionality? e.g. two batched supports multi interface capability, can I use 
any one of them or I mus have only one patch for this purpose?
  -- If I have a patch deisgned for a spcified version of ns-2 can I use it for 
another version? e.g. the MW-node patch for ns-2 2.30 can be used for ns-2 
2.31? is thier any modification needed for this purpose?
   
  Thanx
   
  Ghada

   
-
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.


[ns] Archives .tr and .nam 802_15_4

2007-09-12 Thread Cristiane Amaral




Dear all,

 I have a problem referring to this script, when I type ns wpan_demo1 it I 
generate the archives .tr and .nam but this archives  .tr this total blank 
and the archives .nam it appears a one line.
Necessary to see the results for it compares them.

Does anybody knows the command line that I insert for script below to 
generate the archives .tr and .nam?

 Script tcl: wpan_demo1.tcl (AODV over 802.15.4)
 ==
 # Define options
 # ==
 set val(chan)   Channel/WirelessChannel;# Channel Type
 set val(prop)   Propagation/TwoRayGround   ;# radio-propagation 
 model
 set val(netif)  Phy/WirelessPhy/802_15_4
 set val(mac)Mac/802_15_4
 set val(ifq)Queue/DropTail/PriQueue;# interface queue type
 set val(ll) LL ;# link layer type
 set val(ant)Antenna/OmniAntenna;# antenna model
 set val(ifqlen) 50   ;# 
 max packet in ifq
 set val(nn) 25 ;# 
 number of mobilenodes
 set val(rp) AODV  ;# 
 routing protocol
 set val(x)  50
 set val(y)  50

 set val(nam)  wpan_demo1.nam
 set val(traffic) ftp;# cbr/poisson/ftp

 #read command line arguments
 proc getCmdArgu {argc argv} {
global val
for {set i 0} {$i  $argc} {incr i} {
set arg [lindex $argv $i]
if {[string range $arg 0 0] != -} continue
set name [string range $arg 1 end]
set val($name) [lindex $argv [expr $i+1]]
}
 }
 getCmdArgu $argc $argv

 set appTime10.0 ;# in seconds
 set appTime20.3 ;# in seconds
 set appTime30.7 ;# in seconds
 set stopTime100 ;# in seconds

 # Initialize Global Variables
 set ns_  [new Simulator]
 set tracefd [open ./wpan_demo1.tr w]
 $ns_ trace-all $tracefd
 if { $val(nam) == wpan_demo1.nam } {
set namtrace [open ./$val(nam) w]
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
 }

 $ns_ puts-nam-traceall {# nam4wpan #}  ;# inform nam that this is a trace 
 file for wpan (special handling needed)

 Mac/802_15_4 wpanNam namStatus on  ;# default = off (should be turned on 
 before other 'wpanNam' commands can work)
 #Mac/802_15_4 wpanNam ColFlashClr gold  ;# default = gold
 #Mac/802_15_4 wpanNam NodeFailClr grey  ;# default = grey


 # For model 'TwoRayGround'
 set dist(5m)  7.69113e-06
 set dist(9m)  2.37381e-06
 set dist(10m) 1.92278e-06
 set dist(11m) 1.58908e-06
 set dist(12m) 1.33527e-06
 set dist(13m) 1.13774e-06
 set dist(14m) 9.81011e-07
 set dist(15m) 8.54570e-07
 set dist(16m) 7.51087e-07
 set dist(20m) 4.80696e-07
 set dist(25m) 3.07645e-07
 set dist(30m) 2.13643e-07
 set dist(35m) 1.56962e-07
 set dist(40m) 1.20174e-07
 Phy/WirelessPhy set CSThresh_ $dist(15m)
 Phy/WirelessPhy set RXThresh_ $dist(15m)

 # set up topography object
 set topo   [new Topography]
 $topo load_flatgrid $val(x) $val(y)

 # Create God
 set god_ [create-god $val(nn)]

 set chan_1_ [new $val(chan)]

 # configure node

 $ns_ node-config -adhocRouting $val(rp) \
  -llType $val(ll) \
  -macType $val(mac) \
  -ifqType $val(ifq) \
  -ifqLen $val(ifqlen) \
  -antType $val(ant) \
  -propType $val(prop) \
  -phyType $val(netif) \
  -topoInstance $topo \
  -agentTrace OFF \
  -routerTrace OFF \
  -macTrace ON \
  -movementTrace OFF \
#-energyModel EnergyModel \
#-initialEnergy 1 \
#-rxPower 0.3 \
#-txPower 0.3 \
  -channel $chan_1_

 for {set i 0} {$i  $val(nn) } {incr i} {
 set node_($i) [$ns_ node]
 $node_($i) random-motion 0  ;# disable random motion
 }

 source ./wpan_demo1.scn

 # Setup traffic flow between nodes

 proc cbrtraffic { src dst interval starttime } {
   global ns_ node_
   set udp($src) [new Agent/UDP]
   eval $ns_ attach-agent \$node_($src) \$udp($src)
   set null($dst) [new Agent/Null]
   eval $ns_ attach-agent \$node_($dst) \$null($dst)
   set cbr($src) [new Application/Traffic/CBR]
   eval \$cbr($src) set packetSize_ 70
   eval \$cbr($src) set interval_ $interval
   eval \$cbr($src) set random_ 0
   #eval \$cbr($src) set maxpkts_ 1
   eval \$cbr($src) attach-agent \$udp($src)
   eval $ns_ connect \$udp($src) \$null($dst)
   $ns_ at $starttime $cbr($src) start
 }

 proc poissontraffic { src dst interval starttime } {
   global ns_ node_
   set udp($src) [new Agent/UDP]
   eval $ns_ attach-agent \$node_($src) \$udp($src)
   set null($dst) [new Agent/Null]
   eval $ns_ attach-agent \$node_($dst) \$null($dst)
   set expl($src) [new Application/Traffic/Exponential]
   eval \$expl($src) set packetSize_ 70
   eval \$expl($src) set burst_time_ 0
   eval \$expl($src) set idle_time_ [expr $interval*1000.0-70.0*8/250]ms ;# 
 

[ns] Expponential traffic over SCTP

2007-09-12 Thread Elisabete Reis

Hi,

 

I´m working with SCTP in ns-2 and I have done some tests with Exponential
Traffic over SCTP.

 

I observed two things:

 

 1 - Considering all Exponential parameters as default, it doesn´t work
(segmentation fault caused by burtlen_setavg(ontime/interval_) instruction).
I had need to change the interval_ parameter to 1 (default value is 0). But
is it correct? Can it change the natural behaviour of Exponential traffic?

 

2 - The SCTP consider the Exponential traffic as a SCTP-aware
application and not a legacy application. Is it correct? 

 

 

Has somebody any example that runs well?

 

Some help or comments are appreciated.

 

Tanks

 

Elisabete Reis

 

 



[ns] How to recompile and run tcl files?

2007-09-12 Thread Kavuluri, Mallesh (IE10)



In SUMMARY,
what is the normal way to recompile .cc files that .tcl file
requires and run  the .tcl files? How shall we make necessary changes in
Makefile?

 I have tried make clean, make depend, ./configure, make.
Even I tried ./install in ns-allinone-2.28 folder and then tried the
above Make clean, ./configure, make clean, make depend and make
commands.
But still, I am getting the same old output. The changes that I have
made are not getting reflected in output.

 When I keep some error in .cc file, when using make, it is giving me
error.
When I correct it, make is  compiling successfully.

Any help or suggestion is greatly appreciated.

-Thanks and regards,
Mallesh