Miguel Sepulcre Ribes wrote:

> Hi,
> How do you know that they are not taking effect? They seem correctly 
> written...
> Regards
> Miguel
>
>
>
> */Sandeep <[EMAIL PROTECTED]>/* escribió:
>
>
>     Hi
>     I am attaching a wireless script that I have written for ns-2.27, In
>     the script I set Mac/802_11 parameters such as datarate as u can
>     see in
>     below script, but they are not taking effect. What could
>     be the problem. Somebody please help me.
>     Thank you.
>     regards
>     Sandeep
>     1 #source /work/sandeepl/ns-allinone-2.27/ns-2.27/tcl/lan/ns-mac.tcl
>     2
>     3 set val(chan) Channel/WirelessChannel ;# channel type
>     4 set val(prop) Propagation/TwoRayGround ;#
>     radio-propagation
>     model
>     5 set val(netif) Phy/WirelessPhy ;# network
>     interface
>     type
>     6 set val(mac) Mac/802_11 ;# MAC type
>     7 set val(ifq) Queue/DropTail/PriQueue ;# interface
>     queue ty
>     pe
>     8 set val(ll) LL ;# link layer
>     type
>     9 set val(ant) Antenna/OmniAntenna ;# antenna model
>     10 set val(ifqlen) 50 ;# max packet
>     in ifq
>     11 set val(nn) 2 ;# number of
>     mobileno
>     des
>     12 set val(rp) DSDV ;# routing
>     protocol
>     13 set val(x) 800
>     14 set val(y) 800
>     15
>     16 Mac/802_11 set SlotTime_ 0.000020 ;# 20us
>     17 Mac/802_11 set SIFS_ 0.000010 ;# 10us
>     18 Mac/802_11 set PreambleLength_ 144 ;# 144 bit
>     19 Mac/802_11 set PLCPHeaderLength_ 48 ;# 48 bits
>     20 Mac/802_11 set PLCPDataRate_ 1.0e6 ;# 1Mbps
>     21 Mac/802_11 set dataRate_ 11.0e6 ;# 11Mbps
>     22 Mac/802_11 set basicRate_ 1.0e6 ;# 1Mbps
>     23
>     24
>     25 set ns [new Simulator]
>     26 set tr [open trace.tr w]
>     27 #$ns use-newtrace
>     28 $ns trace-all $tr
>     29 set na [open trace.nam w]
>     30 $ns namtrace-all-wireless $na $val(x) $val(y)
>     31 set chan1 [new $val(chan)]
>     32 set topo [new Topography]
>     33 $topo load_flatgrid 800 800
>     34 create-god 2
>     35
>     36 proc finish {} {
>     37 global ns tr na
>     38 $ns flush-trace
>     39 $ns nam-end-wireless [$ns now]
>     40 close $tr
>     41 close $na
>     42 exec nam trace.nam &
>     43 exit 0;
>     44 }
>     45
>     46 $ns node-config -adhocRouting $val(rp)\
>     47 -llType $val(ll) \
>     48 -macType $val(mac) \
>     49 -antType $val(ant) \
>     50 -propType $val(prop) \
>     51 -phyType $val(netif) \
>     52 -channel $chan1 \
>     53 -topoInstance $topo \
>     54 -agentTrace ON \
>     54 -agentTrace ON \
>     55 -routerTrace ON \
>     56 -macTrace ON \
>     57 -movementTrace OFF\
>     58 -ifqType $val(ifq) \
>     59 -ifqLen $val(ifqlen)
>     60
>     61 for {set i 0} {$i < 2} {incr i} {
>     62 set node_($i) [$ns node]
>     63 #$ns initial_node_pos $node_($i) 30+i*100
>     64 }
>     65
>     66 $node_(0) set X_ 30
>     67 $node_(0) set Y_ 30
>     68 $node_(0) set Z_ 0
>     69 $node_(1) set X_ 400
>     70 $node_(1) set Y_ 420
>     71 $node_(1) set Z_ 0
>     72
>     73 $node_(0) color green
>     74 $node_(1) color green #from line 74 to 90
>     there are comments and also somewhere below
>     90 set udp [new Agent/UDP]
>     91 set des [new Agent/Null]
>     92 $ns attach-agent $node_(0) $udp
>     93 $ns attach-agent $node_(1) $des
>     94 $ns connect $udp $des
>     95
>     96 set udapp [new Application/Traffic/CBR]
>     97 $udapp attach-agent $udp
>     98 $udapp set fid_ 1
>     99 $udapp set packetSize_ 400
>     102 $ns at 1.0 "$udapp start"
>     105 $ns at 30.0 "$udapp stop"
>     106 $ns at 30.0 "$ns halt"
>     107 ns at 30.0 "finish"
>     108 $ns run
>
>
>
> ------------------------------------------------------------------------
>
> LLama Gratis a cualquier PC del Mundo.
> Llamadas a fijos y móviles desde 1 céntimo por minuto.
> http://es.voice.yahoo.com 
> <http://us.rd.yahoo.com/mail/es/tagline/messenger/*http://es.voice.yahoo.com/>
>  


I am calculating throughput, there is no difference in throught even if 
I change dataRate_  or any other Mac/802_11 parameter.

Reply via email to