文件名称:2
- 所属分类:
- Linux/Unix编程
- 资源属性:
- [Text]
- 上传时间:
- 2008-10-13
- 文件大小:
- 3.37kb
- 下载次数:
- 0次
- 提 供 者:
- shi***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
看n2实例 #Create a simulator object
set ns [new Simulator]
#Define different colors for data flows
#$ns color 1 Blue
#$ns color 2 Red
#Open the nam trace file
set nf [open out-1.nam w]
$ns namtrace-all $nf
set f0 [open out0.tr w]
set f1 [open out1.tr w]
#Define a finish procedure
proc finish {} {
global ns nf
$ns flush-trace
#Close the trace file
close $nf
#Execute nam on the trace file
exit 0
}
#Create four nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
#Create links between the nodes
$ns duplex-link $n0 $n2 1Mb 10ms
set ns [new Simulator]
#Define different colors for data flows
#$ns color 1 Blue
#$ns color 2 Red
#Open the nam trace file
set nf [open out-1.nam w]
$ns namtrace-all $nf
set f0 [open out0.tr w]
set f1 [open out1.tr w]
#Define a finish procedure
proc finish {} {
global ns nf
$ns flush-trace
#Close the trace file
close $nf
#Execute nam on the trace file
exit 0
}
#Create four nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
#Create links between the nodes
$ns duplex-link $n0 $n2 1Mb 10ms
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 357386142.rar 列表 第六章\nam-example.tcl 第六章\xgraph-example.tcl 第六章\gawk\BBS-list.txt 第六章\gawk\shipped.txt 第六章\gnuplot\gnuplot-data.txt 第六章\gnuplot\test.data 第六章\gawk 第六章\gnuplot 第六章