ÈÀÏÀ̸§ : send_data.tcl
set ns [new Simulator]
set nf [open out.nam w]
$ns namtrace-all $nf
proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec nam out.nam &
exit 0
}
set n0 [$ns node]
set n1 [$ns node]
set cbr0 [new Agent/CBR]
set null0 [new Agent/Null]
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.005
$ns attach-agent $n0 $cbr0
$ns attach-agent $n1 $null0
$ns connect $cbr0 $null0
$ns at 0.5 "$cbr0 start"
$ns at 4.5 "$cbr0 stop"
$ns at 5.0 "finish"
$ns run
½ÇÇà : ns send_data.tcl
| |
µÎ ³ëµå(n0,n1)¿¡ °¢°¢ ¿¡ÀÌÁ¯Æ®(cbr0,null0) ¼³Á¤
Packet Size : 500 byte , Interval : 0.005(s) °£°Ý
µ¥ÀÌÅÍ Àü¼Û
|