[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Changing node transmit power Pt_



Hi all,
I am trying to change the transmit power periodically from tcl but
unfortunately it does'nt seem to work.  When I set the power level before
creating the nodes using "Phy/WirelessPhy set Pt_ 0.08" it works.

Now i try to access the same object Phy/WirelessPhy from a node's netif_
array and then try to change the power level while the simulation is still
running. It gives no error but the change in power level does not have any
effect, I mean the simulation results are unchanged.

Is the sort of think I am trying implemented in ns ???

I am simulating a simple adhoc wireless network using DSDV.

the script is something like this..

for {set l 0} {$l < $opt(nn) } {incr l} {
        set listPhy [$node_($l) array get netif_]
        set PhyObj [lindex $listPhy 1]
        $ns_ at  15.0 "$PhyObj set Pt_ 0.50"
}

-thanx
 ..vikas