set ns_ [new Simulator] ;# Create a NS simulator object set n1 [ns_ node] ;# Create a WIRELESS node !!! |
set ns_ [new Simulator] ;# Create a NS simulator object $ns_ node-config \ -llType LL -ifqType "Queue/DropTail/PriQueue" -ifqLen 50 -macType Mac/802_11 -phyType "Phy/WirelessPhy" -addressingType flat or hierarchical or expanded -adhocRouting DSDV or DSR or TORA -propType "Propagation/TwoRayGround" -antType "Antenna/OmniAntenna" -channelType "Channel/WirelessChannel" -topoInstance $topo -energyModel "EnergyModel" -initialEnergy (in Joules) -rxPower (in W) -txPower (in W) -agentTrace ON or OFF -routerTrace ON or OFF -macTrace ON or OFF -movementTrace ON or OFF |
Example:
set topo [new Topography] ;# Create a Topography object $topo load_flatgrid 500 500 ;# Make a 500x500 grid topology |
set ns_ [new Simulator] ;# Create a NS simulator object $ns_ node-config -llType LL -ifqType "Queue/DropTail/PriQueue" -ifqLen 50 -macType Mac/802_11 -phyType "Phy/WirelessPhy" -addressingType flat -adhocRouting DSR or DSDV -propType "Propagation/TwoRayGround" -antType "Antenna/OmniAntenna" -channelType "Channel/WirelessChannel" -topoInstance $topo -agentTrace ON -routerTrace ON -macTrace OFF -movementTrace OFF |
"God (General Operations Director) is the object that is used to store global information about the state of the environment, network or nodes that an omniscent observer would have, but that should not be made known to any participant in the simulation." |
That is because calculating this on the fly during simulation runs can be quite time consuming.
So, we will not provide the God object with next hop information.
(This step will be included in the next example)