# 原本的Bandiwidth

Mac/802_11 set dataRate_ 6Mb ;#Rate for Data Frames
Mac/802_11 set basicRate_ 1Mb ;#Rate for Control Frames

 

#3個node 

set n0_mac [$node_(0) set mac_(0)]

set n1_mac [$node_(1) set mac_(0)]

set n2_mac [$node_(2) set mac_(0)]

#變換3個node的Bandiwidth

$n0_mac set dataRate_ 11Mb

$n0_mac set basicRate_ 1Mb

$n1_mac set dataRate_ 11Mb

$n1_mac set basicRate_ 1Mb

$n2_mac set dataRate_ 1Mb

$n2_mac set basicRate_ 1Mb

 

#在指定時間變換Bandiwidth

$ns_ at 5.0 "$n0_mac set dataRate_ 11Mb"

$ns_ at 5.0 "$n0_mac set basicRate_ 1Mb"

 

#在5秒時 變換cbr的Rate

$ns_ at 5.0 "$cbr_(0) ser rate_ 36mb"

創作者介紹

椿哥-分享之部落格

椿哥 發表在 痞客邦 PIXNET 留言(0) 人氣()