Hi, all.
I noticed that there is a "getMac" function while creating and
initializing wireless node, like the following code block:
for {set i 0} {$i < $opt(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;# disable
random motion
set mac_($i) [$node_($i) getMac 0]
$mac_($i) set dataRate_ 54Mb
$mac_($i) set basicRate_ 24Mb
$mac_($i) set RTSThreshold_ 3000
$node_($i) set X_ 0.0
$node_($i) set Y_ 0.0
$node_($i) set Z_ 0.0
}
and I looked up the function definition in ns-mobilenode.tcl file:
Node/MobileNode instproc getMac {param0} {
$self instvar mac_
return $mac_($param0)
}
This seems nothing strange, so I want to know what's the purpose of command
"set mac_($i) [$node_($i) getMac 0]", I think that we should not set all
nodes mac address to be zero.
Thanks, any suggestions will be appreciated.
--
Su Jinzhao(苏金钊)