- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- Transmission Range
Hi all,
I would like to know how I can change the transmission range in NS2. Is it possible to adjust the transmission range for the node dynamicly?. Meant, to make every node has a specific transmission range.
Regards
Mustafa
Dear Mustafa,
I am facing same problem to calculate range of a node.
will u help me in this regard.
Umang
@Mustafa wrote:
Hi all,
I would like to know how I can change the transmission range in NS2. Is it possible to adjust the transmission range for the node dynamicly?. Meant, to make every node has a specific transmission range.
Regards
Mustafa
the command “$ns_ node-config” can be used to set the parameters of a node during node creation. (-txPower , -rxPower will decide the transmission range and coverage)
$ns_ node-config -adhocRouting $opt(adhocRouting)
-llType $opt(ll)
-macType $opt(mac)
-ifqType $opt(ifq)
-ifqLen $opt(ifqlen)
-antType $opt(ant)
-propType $opt(prop)
-phyType $opt(netif)
-channelType $opt(chan)
-topoInstance $topo
-wiredRouting OFF
-agentTrace ON
-routerTrace ON
-macTrace ON
-energyModel $val(engmodel)
-initialEnergy $val(initeng)
-txPower $val(txPower)
-rxPower $val(rxPower)
-idlePower $val(idlePower)
if you create a node after this configuration, then it will create the node with that default parameter.
set node_($i) [$ns_ node]
After creating a node, if you want to create another node or another set of nodes with different parameters, then again use the same command “$ns_ node-config” with different parameters and then use “set node_($i) [$ns_ node]”
($i will differ and denote a node)