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

[ns] dsr nodes



When i am using the dsr ad hoc protocol, can I just create nodes with:
#configure nodes
    $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 \
                     -channel $chan_1_ \
                     -agentTrace ON \
                     -routerTrace ON \
                     -macTrace OFF \
                     -movementTrace OFF \
                     -energyModel $val(energymodel) \
                     -rxPower 0.3\
                     -txPower 0.6 \
                     -initialEnergy $val(initialEnergy)


for {set i 0} {$i < $val(nn) } {incr i} {
        set node_($i) [$ns_ node ]
        $node_($i) random-motion 0  ;# disable random motion
}



or must i use something like:
for {set i 0} {$i < $opt(nn) } {incr i} {
                dsr-create-mobile-node $i
        }



thanks in advance!!
-rebecca

Department of Computer Science, Duke University, Durham, NC 27708-0129
Email:  [email protected]