Viewing 0 reply threads
You must be logged in to reply to this topic.
Set the required error rate in a variable
set ErrorRate 0.15
write a procedure to set error rate
proc UniformErr {} {
global ErrorRate
set err [new ErrorModel]
$err unit packet
$err set rate_ $ErrorRate
$err drop-target [new Agent/Null]
return $err
}
Call the procedure while creating the MANET node.
ns node-config -adhocRouting $val(rp)
-llType $val(ll)
-macType $val(mac)
-ifqType $val(ifq)
-ifqLen $val(ifqlen)
-antType $val(ant)
-propType $val(prop)
-phyType $val(netif)
-topoInstance $topo
-agentTrace ON
-routerTrace ON
-macTrace ON
-movementTrace ON
-IncomingErrProc UniformErr
You must be logged in to reply to this topic.
Discuss Through WhatsApp