Hello All,

Related to my question about creating a clone routing
protocol, and 
according to Mr.Estrella's suggestion I included the
ns-lib.tcl to the 
beginning of my simulation script as below. I got the
errors that I 
attached.

I also run ns in tcl/lib, and wrote "source
ns-lib.tcl" and I got 

can't set "defaultRNG": invalid command name "abort"

error line. I have no clue what is wrong... Any
suggestions?

Best regards
Cenker


# 
======================================================================
# Define options
# 
======================================================================

source ns-lib.tcl

set val(chan)       Channel/WirelessChannel
set val(prop)       Propagation/TwoRayGround
set val(netif)      Phy/WirelessPhy
set val(mac)        Mac/802_11
set val(ifq)        Queue/DropTail/PriQueue
set val(ll)         LL
set val(ant)        Antenna/OmniAntenna
set val(x)              670   ;# X dimension of the
topography
set val(y)              670   ;# Y dimension of the
topography
set val(ifqlen)         50            ;# max packet in
if      
set val(seed)           12120.0
set val(adhocRouting)   AUCTION 
set val(nn)             50             ;# how many
nodes are simulated
set val(cp)             "mytcp50" 
set val(sc)             "myscen50" 
set val(stop)           150.0           ;# simulation
time

#
=====================================================================
# Main Program
# 
======================================================================

puts "$val(adhocRouting)"

#
# Initialize Global Variables
#

# create simulator instance

set ns_         [new Simulator]

# setup topography object

set topo        [new Topography]

# create trace object for ns and nam

set tracefd     [open out50.tr w]
set namtrace    [open out50.nam w]

$ns_ trace-all $tracefd
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)

# define topology
$topo load_flatgrid $val(x) $val(y)

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

#create channel #1
set chan_1_ [new $val(chan)]

#
# define how node should be created
#

#global node setting

$ns_ node-config -adhocRouting $val(adhocRouting) \
                 -llType $val(ll) \
                 -macType $val(mac) \
                 -ifqType $val(ifq) \
                 -ifqLen $val(ifqlen) \
                 -antType $val(ant) \
                 -propType $val(prop) \
                 -phyType $val(netif) \
                 -channel $chan_1_ \
                 -topoInstance $topo \
                 -agentTrace ON \
                 -routerTrace ON \
                 -macTrace ON 

#
#  Create the specified number of nodes [$val(nn)] and
"attach" them
#  to the channel. 

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

Reply via email to