Created
April 30, 2013 19:39
-
-
Save abrahamjso/5491324 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set INCREMENT 0.2 | |
set PacketSize_ 1024 | |
proc check {} { | |
global cbr1 cbr0 ns nf | |
global INCREMENT | |
set cbrBW1 [$cbr0 set ack_] | |
set cbrBW0 [$cbr1 set ack_] | |
set now [$ns now] | |
set d [expr $now - 0.1] | |
set resultado [expr $cbrBW1/$d * 8 * [$tcp1 set packetSize_]/1024] | |
set r2 [expr $cbrBW0/$d * 8 * [$tcp3 set packetSize_]/1024] | |
puts "$now $resultado $r2" | |
puts $nf "$now $resultado $r2" | |
$ns at [expr $now + $INCREMENT] "check" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment