12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

This comm<strong>and</strong> is used to cre<strong>at</strong>e a God i<strong>ns</strong>tance. <strong>The</strong> number of mobilenodes is passed as argument which is used by God tocre<strong>at</strong>e a m<strong>at</strong>rix to store connectivity inform<strong>at</strong>ion of the topology.$topo load_fl<strong>at</strong>grid This initializes the grid for the topography object. <strong>and</strong> are the x-y co-ordin<strong>at</strong>es for the topology <strong>and</strong> are used forsizing the grid. <strong>The</strong> grid resolution may be passed as . A default value of 1 is normally used.$topo load_demfile For loading DEMFile objects into topography. See <strong>ns</strong>/dem.cc,.h for details on DEMFiles.$<strong>ns</strong>_ namtrace-all-wireless This comm<strong>and</strong> is used to initialize a namtrace file for logging node movements to be viewed in nam. <strong>The</strong> namtrace filedescriptor, the X <strong>and</strong> Y co-ordin<strong>at</strong>es of the wireless topology is passed as parameters with this comm<strong>and</strong>.$<strong>ns</strong>_ nam-end-wireless This comm<strong>and</strong> is used to tell nam the simul<strong>at</strong>ion stop time given by .$<strong>ns</strong>_ initial_node_pos This comm<strong>and</strong> defines the node initial position in nam. denotes the size of node in nam. This function must be calledafter mobility model has been defined.$mobilenode r<strong>and</strong>om-motion R<strong>and</strong>om-motion is used to turn on r<strong>and</strong>om movements for the mobilenode, in which case r<strong>and</strong>om destin<strong>at</strong>io<strong>ns</strong> are assignedto the node. 0 disables <strong>and</strong> 1 enables r<strong>and</strong>om-motion.$mobilenode setdest This comm<strong>and</strong> is used to setup a destin<strong>at</strong>ion for the mobilenode. <strong>The</strong> mobile node starts moving towards destin<strong>at</strong>ion givenby <strong>and</strong> <strong>at</strong> a speed of m/s.$mobilenode resetThis comm<strong>and</strong> is used to reset all the objects in the nodes (network components like LL, MAC, phy etc).Internal proceduresFollowing is a list of internal procedures used in wireless networking:$mobilenode base-st<strong>at</strong>ion This is used for wired-cum-wireless scenarios. Here the mobilenode is provided with the base-st<strong>at</strong>ionnode info for itsdomain. <strong>The</strong> address is hierarchical since wired-cum-wireless scenarios typically use hierarchical addressing.$mobilenode log-target <strong>The</strong> , which is normally a trace object, is used to log mobilenode movements <strong>and</strong> their energy usage, ifenergy model is provided.$mobilenode topography This comm<strong>and</strong> is used to provide the node with a h<strong>and</strong>le to the topography object.$mobilenode addifA mobilenode may have more than one network interface. This comm<strong>and</strong> is used to pass h<strong>and</strong>le for a network interface tothe node.$mobilenode nam<strong>at</strong>tach This comm<strong>and</strong> is used to <strong>at</strong>tach the namtrace file descriptor to the mobilenode. All nam traces for the nodeare then written into this namtrace file.168

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!