<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="generator" content="pdf2htmlEX">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css">
<link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css">
<link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/6251676d6caf596192405fa2/raw.css">
<script src="https://static.pudn.com/base/js/compatibility.min.js"></script>
<script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script>
<script>
try{
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar" style="display: none">
<div id="outline">
</div>
</div>
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6251676d6caf596192405fa2/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">Writing and Exec<span class="_ _0"></span>uting a TCL Script with<span class="_ _0"></span> NS-2<span class="_ _0"></span> </div><div class="t m0 x2 h3 y2 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x2 h4 y3 ff1 fs1 fc0 sc0 ls0 ws0">TEL-WIMAX-NS2 project documentation [www.TEL.unl.edu] <span class="_ _1"> </span>Page 1 </div><div class="t m0 x2 h3 y4 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x2 h5 y5 ff3 fs0 fc0 sc0 ls1 ws0">1.<span class="ff4 ls0"> <span class="_ _2"> </span><span class="ff3">W<span class="fs2">RITING </span>A<span class="fs2"> </span>TCL<span class="fs2"> <span class="_ _0"></span></span>S<span class="fs2">CRIPT</span> </span></span></div><div class="t m0 x2 h3 y6 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x2 h3 y7 ff2 fs1 fc0 sc0 ls0 ws0">As <span class="_ _3"> </span>shown <span class="_ _3"> </span>in <span class="_ _3"> </span>Figure <span class="_ _3"> </span>1, <span class="_ _3"> </span>we <span class="_ _3"> </span>desire <span class="_ _3"> </span>to <span class="_ _3"> </span>simulate <span class="_ _3"> </span>a <span class="_ _3"> </span>simple <span class="_ _3"> </span>network <span class="_ _3"> </span>in <span class="_ _3"> </span>which <span class="_ _3"> </span>the <span class="_"> </span>source <span class="_ _3"> </span>node </div><div class="t m0 x2 h3 y8 ff2 fs1 fc0 sc0 ls0 ws0">(stationary <span class="_ _4"></span>source <span class="_ _4"></span>wired <span class="_ _4"></span>to <span class="_ _4"></span>the <span class="_ _4"></span>AP) <span class="_ _4"></span>is <span class="_ _5"></span>generating <span class="_ _4"></span>data <span class="_ _4"></span>with <span class="_ _4"></span><span class="ls2">a <span class="_ _4"></span></span>Mobile <span class="_ _4"></span>WiMAX <span class="_ _4"></span>sub<span class="_ _0"></span>scriber <span class="_ _4"></span>node </div><div class="t m0 x2 h3 y9 ff2 fs1 fc0 sc0 ls0 ws0">as the destination. </div><div class="c x3 ya w2 h6"><div class="t m1 x4 h7 yb ff5 fs3 fc0 sc0 ls0 ws0">Wired Link</div><div class="t m1 x5 h7 yc ff5 fs3 fc0 sc0 ls0 ws0">Wireless Link to </div><div class="t m1 x5 h7 yd ff5 fs3 fc0 sc0 ls0 ws0">Neighboring AP</div><div class="t m1 x6 h7 ye ff5 fs3 fc0 sc0 ls0 ws0">Source Node</div><div class="t m1 x7 h7 yf ff5 fs3 fc0 sc0 ls0 ws0">Subscriber Node</div><div class="t m1 x8 h7 y10 ff5 fs3 fc0 sc0 ls0 ws0">Wireless Link to </div><div class="t m1 x9 h7 y11 ff5 fs3 fc0 sc0 ls0 ws0">Subscribers/ </div><div class="t m1 x8 h7 y12 ff5 fs3 fc0 sc0 ls0 ws0">Access Network </div><div class="t m1 xa h7 y13 ff5 fs3 fc0 sc0 ls0 ws0">Link</div><div class="t m1 xb h7 yc ff5 fs3 fc0 sc0 ls0 ws0">Wireless Link to </div><div class="t m1 xb h7 yd ff5 fs3 fc0 sc0 ls0 ws0">Neighboring AP</div><div class="t m1 xc h7 y14 ff5 fs3 fc0 sc0 ls0 ws0">Node Moving </div><div class="t m1 xd h7 y15 ff5 fs3 fc0 sc0 ls0 ws0">Away from AP1</div><div class="t m1 xe h7 y16 ff5 fs3 fc0 sc0 ls0 ws0">AP1</div></div><div class="t m0 xf h3 y17 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x10 h8 y18 ff4 fs4 fc0 sc0 ls0 ws0">Figure 1<span class="ls3">: </span>The simulation <span class="_ _0"></span>scenario we w<span class="_ _0"></span>ill build </div><div class="t m0 x11 h3 y19 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x2 h3 y1a ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x2 h3 y1b ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x2 h3 y1c ff2 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="pi" data-data='{"ctm":[1.568627,0.000000,0.000000,1.568627,0.000000,0.000000]}'></div></div>
</body>
</html>
<div id="pf2" class="pf w0 h0" data-page-no="2"><div class="pc pc2 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6251676d6caf596192405fa2/bg2.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">Writing and Exec<span class="_ _0"></span>uting a TCL Script with<span class="_ _0"></span> NS-2<span class="_ _0"></span> </div><div class="t m0 x2 h3 y2 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x2 h4 y3 ff1 fs1 fc0 sc0 ls0 ws0">TEL-WIMAX-NS2 project documentation [www.TEL.unl.edu] <span class="_ _1"> </span>Page 2 </div><div class="t m0 x2 h3 y4 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x2 h3 y1d ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x2 h3 y1e ff2 fs1 fc0 sc0 ls0 ws0">W<span class="_ _0"></span>riting t<span class="_ _6"></span>he tcl script for this scenario include the follow<span class="_ _6"></span>ing steps<span class="_ _0"></span> </div><div class="t m0 x12 h3 y1f ff2 fs1 fc0 sc0 ls4 ws0">i)<span class="ls0"> <span class="_ _7"> </span>Define simulator. </span></div><div class="t m0 x13 h3 y20 ff2 fs1 fc0 sc0 ls0 ws0">Creating <span class="_"> </span>a <span class="_"> </span>simulator <span class="_"> </span>is <span class="_"> </span>essentia<span class="_ _0"></span>l <span class="_"> </span>for <span class="_"> </span>any <span class="_"> </span>NS<span class="_ _0"></span>-2 <span class="_"> </span>simulation. <span class="_"> </span>It <span class="_ _8"> </span>is <span class="_"> </span>done <span class="_"> </span>using <span class="_"> </span>the </div><div class="t m0 x13 h3 y21 ff2 fs1 fc0 sc0 ls0 ws0">following simple codes. </div><div class="t m0 x13 h9 y22 ff4 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y23 w3 ha"><div class="t m0 x15 h9 y24 ff4 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y23 w4 ha"><div class="t m0 x15 h9 y25 ff4 fs1 fc0 sc0 ls2 ws0">set<span class="ff2 ls0"> <span class="ff6">simulator_name</span> <span class="ff4">[new Simulator] </span></span></div></div><div class="t m0 x13 h3 y26 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x12 h3 y27 ff2 fs1 fc0 sc0 ls4 ws0">ii)<span class="ls0"> <span class="_ _9"> </span>Define topology. </span></div><div class="t m0 x13 h3 y28 ff2 fs1 fc0 sc0 ls0 ws0">In <span class="_ _0"></span>this step, <span class="_ _0"></span>define the <span class="_ _0"></span>area<span class="_ _0"></span> (in <span class="_ _0"></span>terms <span class="_ _0"></span>of size) <span class="_ _0"></span>under which <span class="_ _0"></span>the <span class="_ _0"></span>simulation occurs. W<span class="_ _0"></span>E </div><div class="t m0 x13 h3 y29 ff2 fs1 fc0 sc0 ls0 ws0">must define it keeping in view<span class="_ _6"></span> the possible<span class="_ _0"></span> locations of our nodes. </div><div class="t m0 x13 h3 y2a ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y2b w3 hb"><div class="t m0 x15 h9 y2c ff4 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y2b w4 hb"><div class="t m0 x15 h9 y2d ff4 fs1 fc0 sc0 ls2 ws0">set<span class="ff2 ls0"> <span class="ff6">topography_name</span> <span class="ff4">[new Topography]</span> </span></div><div class="t m0 x15 h9 y25 ff4 fs1 fc0 sc0 ls0 ws0">$<span class="ff6">topography_name<span class="ff2"> </span></span>load_flatgrid<span class="ff2"> <span class="ff6">size_x size_y</span></span> </div></div><div class="t m0 x13 h3 y2e ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x12 h3 y2f ff2 fs1 fc0 sc0 ls4 ws0">iii)<span class="ls0"> <span class="_ _a"> </span>Define output trace files. </span></div><div class="t m0 x13 h3 y30 ff2 fs1 fc0 sc0 ls0 ws0">Trace <span class="_ _b"> </span>files <span class="_ _b"> </span>record <span class="_ _b"> </span>events <span class="_ _b"> </span>that <span class="_ _b"> </span>occur <span class="_ _b"> </span>during <span class="_ _b"> </span>any <span class="_ _b"> </span>simulation <span class="_ _b"> </span>like <span class="_ _b"> </span>node <span class="_ _b"> </span>creation <span class="_ _b"> </span>and </div><div class="t m0 x13 h3 y31 ff2 fs1 fc0 sc0 ls0 ws0">data <span class="_ _3"> </span>transfer, <span class="_ _3"> </span>among <span class="_ _3"> </span>oth<span class="_ _0"></span>ers. <span class="_ _3"> </span>The<span class="_ _0"></span>re <span class="_ _3"> </span>are <span class="_ _3"> </span>several <span class="_ _3"> </span>trace <span class="_ _3"> </span>formats <span class="_ _c"> </span>and <span class="_ _3"> </span>choosing <span class="_ _3"> </span>one </div><div class="t m0 x13 h3 y32 ff2 fs1 fc0 sc0 ls0 ws0">among them would depend on<span class="_ _0"></span> the results we are looking for and wh<span class="_ _0"></span>at the files log. A </div><div class="t m0 x13 h3 y33 ff2 fs1 fc0 sc0 ls0 ws0">trace file is defined as follows. </div><div class="t m0 x13 h3 y34 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y35 w3 hc"><div class="t m0 x15 h9 y36 ff4 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y35 w4 hc"><div class="t m0 x15 h9 y37 ff4 fs1 fc0 sc0 ls2 ws0">set<span class="ff2 ls0"> <span class="ff6">handler</span> <span class="ff4">[open</span> <span class="ff6">filename</span> <span class="_ _6"></span><span class="ff4 ls5">w]<span class="_ _6"></span><span class="ff2 ls0"> </span></span></span></div><div class="t m0 x15 h9 y25 ff4 fs1 fc0 sc0 ls0 ws0">$<span class="ff6">simulator_name<span class="ff2"> </span>trace_type<span class="ff2"> </span></span>$<span class="ff6">handler</span> </div></div><div class="t m0 x13 h3 y38 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x13 h3 y39 ff2 fs1 fc0 sc0 ls0 ws0">Please <span class="_ _d"> </span>see <span class="_ _d"> </span><span class="fc1">http://nsnam.isi.edu/nsnam/index.php/NS-2_Trace_Formats<span class="_ _0"></span></span> <span class="_ _d"> </span>for<span class="_ _6"></span> </div><div class="t m0 x13 h3 y3a ff2 fs1 fc0 sc0 ls0 ws0">information on information logged in trace files. </div><div class="t m0 x13 h3 y3b ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x12 h3 y3c ff2 fs1 fc0 sc0 ls0 ws0">iv) <span class="_ _e"> </span>Define the General Operations Director (<span class="ff7">“GOD”</span>). </div><div class="t m0 x13 h3 y3d ff2 fs1 fc0 sc0 ls0 ws0">Quoted <span class="_ _f"></span>from <span class="_ _f"></span>CMU <span class="_ _0"></span>d<span class="_ _0"></span>ocument, <span class="_ _f"></span>"GOD <span class="_ _f"></span>(General <span class="_ _f"></span>Operations <span class="_ _f"></span>Director) <span class="_ _f"></span>is <span class="_ _0"></span>th<span class="_ _0"></span>e <span class="_ _0"></span>object <span class="_ _f"></span>that </div><div class="t m0 x13 h3 y3e ff2 fs1 fc0 sc0 ls0 ws0">is <span class="_ _5"></span>used<span class="_ _0"></span> <span class="_ _5"></span>to <span class="_ _b"> </span>st<span class="_ _6"></span>ore <span class="_ _5"></span>global <span class="_ _5"></span>inf<span class="_ _0"></span>ormation <span class="_ _5"></span>about <span class="_ _b"> </span>th<span class="_ _6"></span>e <span class="_ _5"></span>sta<span class="_ _0"></span>te <span class="_ _5"></span>of <span class="_ _10"></span>the <span class="_ _5"></span>e<span class="_ _f"></span>nvironment, <span class="_ _5"></span>n<span class="_ _0"></span>etwork <span class="_ _5"></span>or </div><div class="t m0 x13 h3 y3f ff2 fs1 fc0 sc0 ls0 ws0">nodes <span class="_ _f"></span>that <span class="_ _11"></span>an <span class="_ _f"></span>omniscient <span class="_ _f"></span>observer <span class="_ _11"></span>would <span class="_ _f"></span>have, <span class="_ _f"></span>but <span class="_ _f"></span>th<span class="_ _0"></span>at <span class="_ _f"></span>should <span class="_ _f"></span>not <span class="_ _f"></span>b<span class="_ _0"></span>e <span class="_ _f"></span>made <span class="_ _f"></span>known </div><div class="t m0 x13 h3 y40 ff2 fs1 fc0 sc0 ls0 ws0">to <span class="_ _f"></span>any <span class="_ _f"></span>participant <span class="_ _f"></span>in <span class="_ _f"></span>the <span class="_ _f"></span>simulation." <span class="_ _f"></span>In <span class="_ _f"></span>simple <span class="_ _f"></span>words, <span class="_ _f"></span>we <span class="_ _0"></span>ne<span class="_ _0"></span>ed <span class="_ _f"></span>to <span class="_ _f"></span>define <span class="_ _11"></span>th<span class="_ _0"></span>e <span class="_ _0"></span>GO<span class="_ _0"></span>D <span class="_ _f"></span>to </div><div class="t m0 x13 h3 y41 ff2 fs1 fc0 sc0 ls0 ws0">manage <span class="_ _4"></span>the <span class="_ _4"></span>details <span class="_ _4"></span>of <span class="_ _4"></span>o<span class="_ _0"></span>perations <span class="_ _4"></span>we <span class="_ _4"></span>sup<span class="_ _0"></span>ply <span class="_ _4"></span>such <span class="_ _4"></span>as <span class="_ _4"></span>th<span class="_ _0"></span>e <span class="_ _4"></span>movement <span class="_ _11"></span>p<span class="_ _0"></span>atterns <span class="_ _4"></span>in <span class="_ _4"></span>our </div><div class="t m0 x13 h3 y42 ff2 fs1 fc0 sc0 ls0 ws0">simulations. </div><div class="t m0 x13 h3 y43 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y44 w3 ha"><div class="t m0 x15 h9 y24 ff4 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y44 w4 ha"><div class="t m0 x15 h9 y25 ff4 fs1 fc0 sc0 ls0 ws0">create-<span class="ls6">god</span><span class="ff2"> <span class="ff6">number_of_nodes</span></span> </div></div><div class="t m0 x13 h3 y45 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x12 h3 y46 ff2 fs1 fc0 sc0 ls7 ws0">v)<span class="ls0"> <span class="_ _12"> </span>Define access point/base station and configure the AP/BS. </span></div><div class="t m0 x13 h3 y47 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x13 h3 y48 ff2 fs1 fc0 sc0 ls0 ws0">To <span class="_ _0"></span>create <span class="_ _0"></span>and <span class="_ _0"></span>configure <span class="_ _0"></span>a <span class="_ _0"></span>ba<span class="_ _0"></span>se <span class="_ _0"></span>station <span class="_ _0"></span>or <span class="_ _0"></span>an <span class="_ _0"></span>access <span class="_ _0"></span>point <span class="_ _0"></span>in <span class="_ _0"></span>NS<span class="_ _f"></span>-2, <span class="_ _0"></span>it <span class="_ _0"></span>is <span class="_ _0"></span>pref<span class="_ _0"></span>erable to </div><div class="t m0 x13 h3 y49 ff2 fs1 fc0 sc0 ls0 ws0">define the options<span class="_ _0"></span> we want to conf<span class="_ _0"></span>igure the AP/BS with. The conf<span class="_ _0"></span>ig<span class="_ _6"></span>uration is han<span class="_ _0"></span>dled </div><div class="t m0 x13 h3 y4a ff2 fs1 fc0 sc0 ls0 ws0">as follows. </div><div class="t m0 x13 h3 y4b ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y4c w3 hd"><div class="t m0 x15 h9 y4d ff4 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y4c w4 hd"><div class="t m0 x15 h9 y4e ff4 fs1 fc0 sc0 ls0 ws0">$<span class="ff6">simulator_name</span> <span class="ls2">ap</span>-config <span class="_ _13"> </span><span class="ff8">–<span class="ff6">option_1 value_1</span></span> \ </div><div class="t m0 x15 h9 y4f ff4 fs1 fc0 sc0 ls0 ws0"> <span class="_ _14"> </span><span class="ff8">–<span class="ff6">option_2 value_2</span></span> \ </div><div class="t m0 x15 h9 y50 ff4 fs1 fc0 sc0 ls0 ws0"> <span class="_ _14"> </span><span class="ff9">…………………...<span class="ff6">..... </span></span></div></div><a class="l" rel='nofollow' onclick='return false;'><div class="d m2"></div></a></div><div class="pi" data-data='{"ctm":[1.568627,0.000000,0.000000,1.568627,0.000000,0.000000]}'></div></div>
<div id="pf3" class="pf w0 h0" data-page-no="3"><div class="pc pc3 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/6251676d6caf596192405fa2/bg3.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">Writing and Exec<span class="_ _0"></span>uting a TCL Script with<span class="_ _0"></span> NS-2<span class="_ _0"></span> </div><div class="t m0 x2 h3 y2 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x2 h4 y3 ff1 fs1 fc0 sc0 ls0 ws0">TEL-WIMAX-NS2 project documentation [www.TEL.unl.edu] <span class="_ _1"> </span>Page 3 </div><div class="t m0 x2 h3 y4 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x16 y51 w4 he"><div class="t m0 x15 h9 y52 ff4 fs1 fc0 sc0 ls0 ws0"> <span class="_ _14"> </span><span class="ff8">–<span class="ff6">option_n value_n</span></span> </div></div><div class="t m0 x13 h9 y53 ff4 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x13 h3 y54 ff2 fs1 fc0 sc0 ls0 ws0">Please refer to documents provided for options and their possible <span class="_ _0"></span>values. </div><div class="t m0 x13 h3 y55 ff2 fs1 fc0 sc0 ls0 ws0">To create an AP/BS with the set configuration, we can now define it as follows. </div><div class="t m0 x13 h3 y56 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y57 w3 ha"><div class="t m0 x15 h9 y24 ff4 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y57 w4 ha"><div class="t m0 x15 h9 y25 ff4 fs1 fc0 sc0 ls0 ws0">set <span class="ff6">ap_name</span> <span class="ls8">[$</span><span class="ff6">simulator_name</span> a<span class="_ _0"></span>p] </div></div><div class="t m0 x13 h3 y58 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x13 h3 y59 ff2 fs1 fc0 sc0 ls0 ws0">Then we need to disable random motion for the <span class="_ _0"></span>AP and giv<span class="_ _6"></span>e it a location. </div><div class="t m0 x13 h3 y5a ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y5b w3 hf"><div class="t m0 x15 h9 y5c ff4 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y5b w4 hf"><div class="t m0 x15 h9 y5d ff4 fs1 fc0 sc0 ls0 ws0">$<span class="ff6">ap_name</span> random-motion 0 </div><div class="t m0 x15 h9 y5e ff4 fs1 fc0 sc0 ls0 ws0">$<span class="ff6">ap_name</span> set X_ <span class="ff6">x_location</span> </div><div class="t m0 x15 h9 y37 ff4 fs1 fc0 sc0 ls0 ws0">$<span class="ff6">ap_name</span> set Y_ <span class="ff6">y_location</span> </div><div class="t m0 x15 h9 y25 ff4 fs1 fc0 sc0 ls0 ws0">$<span class="ff6">ap_name</span> set Z_ 0 </div></div><div class="t m0 x13 h9 y5f ff4 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x13 h3 y60 ff2 fs1 fc0 sc0 ls0 ws0">After you are done with creating the AP, switch off the configuration mode. </div><div class="t m0 x13 h9 y61 ff4 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y62 w3 h10"><div class="t m0 x15 h9 y24 ff4 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y62 w4 h10"><div class="t m0 x15 h9 y25 ff4 fs1 fc0 sc0 ls0 ws0">$<span class="ff6">simulator_name</span> apConfig OFF </div></div><div class="t m0 x13 h3 y63 ff2 fs1 fc0 sc0 ls0 ws0"> <span class="_ _15"> </span> <span class="_ _16"> </span> <span class="_ _16"> </span> <span class="_ _16"> </span> <span class="_ _16"> </span> <span class="_ _16"> </span> <span class="_ _16"> </span> </div><div class="t m0 x12 h3 y64 ff2 fs1 fc0 sc0 ls0 ws0">vi) <span class="_ _e"> </span>Define wireless node, configure it and attach to AP/BS. </div><div class="t m0 x13 h3 y65 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x13 h3 y66 ff2 fs1 fc0 sc0 ls0 ws0">Creating <span class="_ _5"></span>and <span class="_ _5"></span>configuring <span class="_ _5"></span>a <span class="_ _5"></span>w<span class="_ _0"></span>ireless <span class="_ _5"></span>node <span class="_ _10"> </span>is <span class="_ _5"></span>very <span class="_ _5"></span>similar <span class="_ _5"></span>to <span class="_ _5"></span>what <span class="_ _5"></span>we <span class="_ _5"></span>need<span class="_ _0"></span>ed <span class="_ _10"> </span>to <span class="_ _5"></span>do </div><div class="t m0 x13 h3 y67 ff2 fs1 fc0 sc0 ls0 ws0">with the AP. To set the configurable options,<span class="_ _6"></span> <span class="_ _0"></span>we use the following code. </div><div class="t m0 x13 h3 y68 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y69 w3 h11"><div class="t m0 x15 h9 y6a ff4 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y69 w4 h11"><div class="t m0 x15 h9 y6b ff4 fs1 fc0 sc0 ls0 ws0">$<span class="ff6">simulator_name</span> <span class="ls6">node</span>-config <span class="_ _17"> </span><span class="ff8">–<span class="ff6">option_1 value_1</span></span> \ </div><div class="t m0 x17 h9 y6c ff4 fs1 fc0 sc0 ls0 ws0"> <span class="_ _18"> </span><span class="ff8">–<span class="ff6">option_2 value_2</span></span> \ </div><div class="t m0 x17 h9 y37 ff4 fs1 fc0 sc0 ls0 ws0"> <span class="_ _18"> </span><span class="ff9">…………………...<span class="ff6">..... </span></span></div><div class="t m0 x15 h9 y25 ff4 fs1 fc0 sc0 ls0 ws0"> <span class="_ _19"> </span><span class="ff8">–<span class="ff6">option_n value_n</span></span> </div></div><div class="t m0 x13 h12 y6d ff6 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x13 h12 y6e ff6 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x13 h3 y6f ff2 fs1 fc0 sc0 ls0 ws0">To create a wireless node (in fact even a wired node): </div><div class="t m0 x13 h9 y70 ff4 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y71 w3 ha"><div class="t m0 x15 h9 y24 ff4 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y71 w4 ha"><div class="t m0 x15 h9 y25 ff4 fs1 fc0 sc0 ls0 ws0">set <span class="ff6">node_name</span> <span class="ls8">[$</span><span class="ff6">simulato<span class="_ _0"></span>r_name</span> <span class="ls6">node</span>] </div></div><div class="t m0 x13 h3 y72 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x13 h3 y73 ff2 fs1 fc0 sc0 ls0 ws0">Disable random motion and set location as we did earlier. </div><div class="t m0 x13 h3 y74 ff2 fs1 fc0 sc0 ls0 ws0">Finally we <span class="ff7">“</span>attach<span class="ff7">”</span> the wireless node to the AP. </div><div class="t m0 x13 h3 y75 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y76 w3 ha"><div class="t m0 x15 h9 y24 ff4 fs1 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y76 w4 ha"><div class="t m0 x15 h9 y25 ff4 fs1 fc0 sc0 ls0 ws0">$<span class="ff6">node_name</span> base-station [AddrParams addr2id [$<span class="ff6">ap_name</span> <span class="ls6">node</span>-addr<span class="ls8">]]</span> </div></div><div class="t m0 x13 h9 y77 ff4 fs1 fc0 sc0 ls0 ws0"> <span class="_ _15"> </span><span class="ff2"> </span></div><div class="t m0 x12 h3 y78 ff2 fs1 fc0 sc0 ls0 ws0">vii) <span class="_ _d"> </span>Define the wir<span class="_ _6"></span>ed sou<span class="_ _0"></span>rce, con<span class="_ _6"></span>figure it and connect it to <span class="_ _0"></span>the AP/BS. </div><div class="t m0 x13 h3 y79 ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x13 h3 y7a ff2 fs1 fc0 sc0 ls0 ws0">The <span class="_ _4"></span>creation <span class="_ _4"></span>a<span class="_ _0"></span>nd <span class="_ _4"></span>configuration <span class="_ _4"></span>of <span class="_ _4"></span>the <span class="_ _4"></span>wired <span class="_ _4"></span>source <span class="_ _5"></span>is <span class="_ _4"></span>similar <span class="_ _4"></span>to <span class="_ _4"></span>that <span class="_ _4"></span>of <span class="_ _4"></span>the <span class="_ _5"></span>w<span class="_ _6"></span>ireless </div><div class="t m0 x13 h3 y7b ff7 fs1 fc0 sc0 ls0 ws0">node, except we do not “attach” it but rather “<span class="_ _6"></span>connect” it with a wired link.<span class="_ _0"></span><span class="ff2"> </span></div><div class="t m0 x13 h3 y7c ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="c x14 y7d w3 h13"><div class="t m0 x15 h14 y7e ff4 fs5 fc0 sc0 ls0 ws0"> </div></div><div class="c x16 y7d w4 h13"><div class="t m0 x15 h14 y7e ff4 fs5 fc0 sc0 ls0 ws0">$<span class="ff6">simulator_name </span><span class="ls9">du</span>ple<span class="_ _6"></span>x-link $<span class="ff6">node_na<span class="_ _6"></span>me<span class="ff4"> $</span>ap_name<span class="ff4"> </span>band<span class="_ _6"></span>width delay qu<span class="_ _6"></span>eue_type<span class="ff4"> </span></span></div></div><div class="t m0 x13 h3 y7f ff2 fs1 fc0 sc0 ls0 ws0"> </div><div class="t m0 x13 h3 y80 ff2 fs1 fc0 sc0 ls0 ws0">Please refer to the accompanying documents for possible values for the options. </div></div><div class="pi" data-data='{"ctm":[1.568627,0.000000,0.000000,1.568627,0.000000,0.000000]}'></div></div>