http://140.116.72.80/~smallko/ns2/gdb_season.pdf
Sadless is a good man, but you can not see it through.
2008年2月24日 星期日
2008年2月15日 星期五
在wireless node 的 tcl中使用 queue中的變數
在 queue.cc 的command 中新增
bind("num_node", &num_node_);
在XXX.tcl 的 $ns_ node-config 結束後,加上
Queue/DropTail set num_node $val(nn)
必須在 set node_(0) [$ns_ node] 之前
bind("num_node", &num_node_);
在XXX.tcl 的 $ns_ node-config 結束後,加上
Queue/DropTail set num_node $val(nn)
必須在 set node_(0) [$ns_ node] 之前
2008年2月14日 星期四
NS2 的MAC 怎麼拿到 queue (ifq) 的資訊?
在 MAC.h 裡新增
Queue * ifq;
在 MAC.cc裡的 command 裡面的} else if (argc == 3) { 中新增
else if (strcmp(argv[1], "ifq") == 0) {
ifq_ = (Queue*) TclObject::lookup(argv[2]);
return (TCL_OK);
}
在ns-mobilenode.tcl 裡面 的 Node/MobileNode instproc add-interface { 中
在# Mac Layer 下面新增
$mac ifq $ifq
Queue * ifq;
在 MAC.cc裡的 command 裡面的} else if (argc == 3) { 中新增
else if (strcmp(argv[1], "ifq") == 0) {
ifq_ = (Queue*) TclObject::lookup(argv[2]);
return (TCL_OK);
}
在ns-mobilenode.tcl 裡面 的 Node/MobileNode instproc add-interface { 中
在# Mac Layer 下面新增
$mac ifq $ifq
訂閱:
文章 (Atom)