http://old.nabble.com/file/p34275794/mytopo1.png
My tcl script gets compiled,but the trace and nam files are empty.i get the following message.. --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o20: no target for slot 3 _o20 type: Classifier/Addr content dump: classifier _o20 0 offset 22 shift 511 mask 1 slots slot 0: _o21 (Classifier/Addr) ---------- Finished standard no-slot{} default handler ---------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #Mytclscript # # w(0)==BS(0)--N0--N1--BS(1)==W(1) # # simulation of a wired-cum-wireless scenario # ====================================================================== # Define options # ====================================================================== set opt(chan) Channel/WirelessChannel ;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy ;# network interface type set opt(mac) Mac/802_11 ;# MAC type set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type set opt(ll) LL ;# link layer type set opt(ant) Antenna/OmniAntenna ;# antenna model set opt(ifqlen) 50 ;# max packet in ifq set opt(nn) 2 ;# number of wirelessnodes set opt(adhocRouting) DSDV ;# routing protocol set opt(x) 1000 ;# x coordinate of topology set opt(y) 700 ;# y coordinate of topology set opt(stop) 250 ;# time to stop simulation set opt(ftp1-start) 160.0 set num_wired_nodes 2 set num_bs_nodes 2 # ============================================================================ # create simulator instance set ns_ [new Simulator] # set up for hierarchical routing $ns_ node-config -addressType hierarchical AddrParams set domain_num_ 4 ;# number of domains lappend cluster_num 1 1 1 1 ;# number of clusters in each domain AddrParams set cluster_num_ $cluster_num lappend no_of_nodes 1 2 2 1 ;# number of nodes in each domain AddrParams set nodes_num_ $no_of_nodes ; set tracefd [open mine.tr w] set namtrace [open mine.nam w] $ns_ trace-all $tracefd $ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y) # Create topography object set topo [new Topography] # define topology $topo load_flatgrid $opt(x) $opt(y) # create God create-god [expr $opt(nn) + $num_bs_nodes] #create wired nodes set temp {0.0.0 3.0.0} ;# hierarchical addresses for wired domain for {set i 0} {$i < $num_wired_nodes} {incr i} { set W($i) [$ns_ node [lindex $temp $i]] } # configure for base-station node $ns_ node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channelType $opt(chan) \ -topoInstance $topo \ -wiredRouting ON \ -agentTrace ON \ -routerTrace OFF \ -macTrace OFF #create base-station node set temp1 {1.0.0 1.0.1 } ;# hier address to be used for wireless domain set BS(0) [$ns_ node [lindex $temp1 0]] $BS(0) random-motion 0 ;# disable random motion #provide some co-ord (fixed) to base station node $BS(0) set X_ 100.0 $BS(0) set Y_ 100.0 $BS(0) set Z_ 0.0 set temp2 {2.0.0 2.0.1 } ; set BS(1) [$ns_ node [lindex $temp2 0]] $BS(1) random-motion 0 ;# disable random motion #provide some co-ord (fixed) to base station node $BS(1) set X_ 150.0 $BS(1) set Y_ 100.0 $BS(1) set Z_ 0.0 # create mobilenodes in the same domain as BS(0) #configure for mobilenodes $ns_ node-config -wiredRouting OFF set n0 [ $ns_ node [lindex $temp1 1]] $n0 random-motion 0 $n0 base-station [AddrParams addr2id [$BS(0) node-addr]] set n1 [ $ns_ node [lindex $temp2 1]] $n1 random-motion 0 $n1 base-station [AddrParams addr2id [$BS(1) node-addr]] #create links between wired and BS nodes $ns_ duplex-link $W(0) $BS(0) 5Mb 2ms DropTail $ns_ duplex-link $W(1) $BS(1) 5Mb 2ms DropTail $ns_ duplex-link-op $W(0) $BS(0) orient right $ns_ duplex-link-op $W(1) $BS(1) orient right # setup TCP connections set tcp1 [new Agent/TCP] $tcp1 set class_ 2 set sink1 [new Agent/TCPSink] $ns_ attach-agent $W(0) $tcp1 $ns_ attach-agent $W(1) $sink1 $ns_ connect $tcp1 $sink1 set ftp1 [new Application/FTP] $ftp1 attach-agent $tcp1 $ns_ at $opt(ftp1-start) "$ftp1 start" # Define initial node position in nam $ns_ initial_node_pos $n0 10 $ns_ initial_node_pos $n1 10 $ns_ at $opt(stop).0002 "puts \"NS EXITING...\" ; $ns_ halt" $ns_ at $opt(stop).0001 "stop" proc stop {} { global ns_ tracefd namtrace $ns_ flush-trace close $tracefd close $namtrace exec nam wireless2-out.nam & exit 0 } puts "Starting Simulation..." $ns_ run -- View this message in context: http://old.nabble.com/-ns--Classfier%3A%3Ano-slot%7B%7D-default-handler-%28tcl-lib-ns-lib.tcl%29-tp34275794p34275794.html Sent from the ns-users mailing list archive at Nabble.com.