TopdlLibrary: ten.tcl
File ten.tcl, 412 bytes (added by , 12 years ago) |
---|
Line | |
---|---|
1 | source tb_compat.tcl |
2 | set ns [new Simulator] |
3 | |
4 | # Create the center node (named by its variable name) |
5 | set center [$ns node] |
6 | |
7 | # Connect 10 satellites |
8 | for { set i 0} { $i < 10 } { incr i} { |
9 | # Create node n-1 (tcl n($i) becomes n-$i in the experiment) |
10 | set n($i) [$ns node] |
11 | # Connect center to $n($i) |
12 | ns duplex-link $center $n($i) 100Mb 0ms DropTail |
13 | } |
14 | |
15 | # Creation boilerplate |
16 | $ns rtptoto Static |
17 | $ns run |