<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><base href="x-msg://270/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Mohammad,</div><div><br></div><div>You don't need to remove topology reader, as it just creates a topology, and you are free to modify anything that has been created (doesn't matter which way) by directly accessing links and devices.</div><div><br></div><div>In a simple topology (I would not recommend this in very large topologies, since it may introduce significant overhead), to figure out the right NetDevice, you can do a trick similar to one used in a variant of ndn::StackHelper::AddRoute (<a href="https://github.com/NDN-Routing/ndnSIM/blob/master/helper/ndn-stack-helper.cc#L396">https://github.com/NDN-Routing/ndnSIM/blob/master/helper/ndn-stack-helper.cc#L396</a>):</div><div><br></div><div>   input: otherNode -> node on the other side of the link </div><div><br></div><div><pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; border: 0px; font-size: 11.818181991577148px; font-family: Consolas, 'Liberation Mono', Courier, monospace; color: rgb(51, 51, 51); line-height: 14.545454025268555px; "><div class="line" id="LC398" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">  <span class="k" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">for</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">(</span><span class="kt" style="margin: 0px; padding: 0px; border: 0px; color: rgb(68, 85, 136); font-weight: bold;">uint32_t</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">deviceId</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">=</span> <span class="mi" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 153, 153);">0</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">;</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">deviceId</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;"><</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">node</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">-></span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">GetNDevices</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">();</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">deviceId</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">++</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">)</span></div><div class="line" id="LC399" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">    <span class="p" style="margin: 0px; padding: 0px; border: 0px;">{</span></div><div class="line" id="LC400" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">      <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">Ptr</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;"><</span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">PointToPointNetDevice</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">></span> <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">netDevice</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">=</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">DynamicCast</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;"><</span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">PointToPointNetDevice</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">></span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">(</span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">node</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">-></span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">GetDevice</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">(</span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">deviceId</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">));</span></div><div class="line" id="LC401" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">      <span class="k" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">if</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">(</span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">netDevice</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">==</span> <span class="mi" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 153, 153);">0</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">)</span></div><div class="line" id="LC402" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">        <span class="k" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">continue</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">;</span></div><div class="line" id="LC403" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;"><br></div><div class="line" id="LC404" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">      <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">Ptr</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;"><</span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">Channel</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">></span> <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">channel</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">=</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">netDevice</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">-></span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">GetChannel</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">();</span></div><div class="line" id="LC405" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">      <span class="k" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">if</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">(</span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">channel</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">==</span> <span class="mi" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 153, 153);">0</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">)</span></div><div class="line" id="LC406" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">        <span class="k" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">continue</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">;</span></div><div class="line" id="LC407" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;"><br></div><div class="line" id="LC408" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">      <span class="k" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">if</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">(</span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">channel</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">-></span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">GetDevice</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">(</span><span class="mi" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 153, 153);">0</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">)</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">-></span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">GetNode</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">()</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">==</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">otherNode</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">||</span></div><div class="line" id="LC409" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">          <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">channel</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">-></span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">GetDevice</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">(</span><span class="mi" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 153, 153);">1</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">)</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">-></span><span class="n" style="margin: 0px; padding: 0px; border: 0px; ">GetNode</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">()</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">==</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px; ">otherNode</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">)</span></div><div class="line" id="LC410" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">        <span class="p" style="margin: 0px; padding: 0px; border: 0px;">{</span></div><div class="line" id="LC410" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;"><span class="p" style="margin: 0px; padding: 0px; border: 0px;"><span class="Apple-tab-span" style="white-space:pre">    </span>    // <b>netDevice</b> - is the device you're looking for</span></div><div class="line" id="LC411" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;"><span style="font-size: 11.818181991577148px; line-height: 14.545454025268555px; ">        </span><span class="p" style="font-size: 11.818181991577148px; line-height: 14.545454025268555px; margin: 0px; padding: 0px; border: 0px; ">}</span></div><div class="line" id="LC421" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">    <span class="p" style="margin: 0px; padding: 0px; border: 0px;">}</span></div></pre><div><br></div></div><div>Without tricks, you can just manually (if it is feasible) figure out or pre-calculate which deviceId corresponds to the link you want to modify.  This would work more efficiently in large topologies, as will not need a linear search.  </div><div><br></div><div>With AnnotatedTopologyReader, deviceId are assigned in order of links defined in the "links" section of the topology file.  For example, if you have something like this:</div><div><br></div><div>dev1 dev2 ...</div><div>dev1 dev3 ...</div><div>dev5 dev1 ...</div><div><br></div><div>The first line will create netdevice 0 on dev1 and netdevice 0 on dev2, the second will create netdevice 1 on dev1 and netdevice 0 on dev3.  The third will create netdevice 0 on dev5 and netdevice 2 on dev1.</div><div><br></div><div>---</div><div>Alex</div><div><br></div><br><div><div>On Mar 27, 2013, at 6:31 AM, Hovaidi Ardestani Mohammad <<a href="mailto:mohammad.hovaidi.ardestani@aalto.fi">mohammad.hovaidi.ardestani@aalto.fi</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div ocsi="0" fpstyle="1" lang="EN-GB" link="blue" vlink="purple" style="font-family: Monaco; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="direction: ltr; font-family: Tahoma; font-size: 10pt; "><div class="WordSection1"><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><font><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Hi Alex,</span></font></div><font></font><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><font><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Thank you for your answer.</span></font></div><font></font><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><font><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Now, my questions are:</span></font></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><font><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">1.Do I need to remove<span class="Apple-converted-space"> </span><span class="SpellE">AnnotatedTopolgyReader</span><span class="Apple-converted-space"> </span>part and place these lines instead?</span></font></div><font></font><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><font><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">1-a.If I remove topology reader part then how I can define my network<span class="GramE">?(</span>For instance using<span class="Apple-converted-space"> </span><span class="SpellE">NodeContainer</span><span class="Apple-converted-space"> </span>and<span class="SpellE">PointToPointHelper</span>).</span></font></div><font></font><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><font><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">1-b.If there is no need to remove topology then there will be conflict between those attributes set in topology and those in code.</span></font></div><font></font><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><font><span style="font-size: 11pt; font-family: Calibri, sans-serif; "> 2.In my simple code I have<span class="Apple-converted-space"> </span><br></span></font></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><font><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Ptr<Node> consumer1 = Names::Find<Node> ("Src1");</span></font></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><font><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">and according to<span class="Apple-converted-space"> </span></span><br></font></div><table class="memname" style="position: static; z-index: auto; "><tbody><tr><td class="memname"><font><a class="el" href="http://www.nsnam.org/doxygen-release/classns3_1_1_ptr.html" style="color: purple; text-decoration: underline; ">Ptr</a><<span class="Apple-converted-space"> </span><a class="el" href="http://www.nsnam.org/doxygen-release/classns3_1_1_net_device.html" style="color: purple; text-decoration: underline; ">NetDevice</a><span class="Apple-converted-space"> </span>> ns3::Node::GetDevice</font></td><td><font>(</font></td><td class="paramtype"><font>uint32_t </font></td><td class="paramname"><font><em>index</em></font></td><td><font>)</font></td><td><font>const</font></td></tr></tbody></table><font></font><div><font></font><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm; position: static; z-index: auto; "><font>what should I put as an index in following line.<span class="Apple-converted-space"> </span><br>Ptr<Channel> channel = node->GetDevice (?)->netDevice->GetChannel ();</font><a name="_MailOriginal"><b><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; "><br></span></b><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; ">-Mohammad<br></span></a><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><a name="_MailOriginal"><b><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; "><br></span></b></a></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><a name="_MailOriginal"><b><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; "><br></span></b></a></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><a name="_MailOriginal"><b><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; "><br></span></b></a></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><a name="_MailOriginal"><b><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; ">From:</span></b></a><span><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; "><span class="Apple-converted-space"> </span>Alexander Afanasyev [mailto:cawka1@<a href="http://gmail.com">gmail.com</a>]<span class="Apple-converted-space"> </span><b>On Behalf<span class="Apple-converted-space"> </span><span class="GramE">Of</span><span class="Apple-converted-space"> </span></b>Alex Afanasyev<br><b>Sent:</b><span class="Apple-converted-space"> </span>Tuesday, March 26, 2013 8:57 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Hovaidi Ardestani Mohammad<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:ndnsim@lists.cs.ucla.edu">ndnsim@lists.cs.ucla.edu</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [ndnSIM] Changing topology parameter in real-time</span></span></div></div></div><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span> </span></p><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span>Hi Mohammad,</span></div></div><div><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span> </span></p></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span>Topology (.txt) is designed to work only once before the simulation begins.  At any particular point of simulation, you have a full control of what kind of parameters links have, but you need to manually get hold of the specific transmission queues and channels and manually updated their attributes.</span></div></div><div><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span> </span></p></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span>You can try to do something like the following:</span></div></div><div><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span> </span></p></div><div><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>Ptr<span style="color: rgb(128, 96, 48); "><</span>Node<span style="color: rgb(128, 96, 48); ">></span> node <span style="color: rgb(128, 96, 48); ">=</span> <span style="color: rgb(128, 96, 48); ">?;</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>Ptr<span style="color: rgb(128, 96, 48); "><</span>Channel<span style="color: rgb(128, 96, 48); ">></span> channel <span style="color: rgb(128, 96, 48); ">=</span> node<span style="color: rgb(128, 96, 48); ">-></span>GetDevice <span style="color: rgb(128, 96, 48); ">(?)-></span>netDevice<span style="color: rgb(128, 96, 48); ">-></span>GetChannel <span style="color: rgb(128, 96, 48); ">();</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span> </span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span><span style="color: rgb(195, 78, 0); ">// set channel delay</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>channel<span style="color: rgb(128, 96, 48); ">-></span>SetAttribute <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">"</span><span style="color: rgb(230, 0, 0); ">Delay</span><span style="color: maroon; ">"</span><span style="color: rgb(128, 96, 48); ">,</span> TimeValue <span style="color: rgb(128, 96, 48); ">(</span>Seconds <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">0.01</span><span style="color: rgb(128, 96, 48); ">));</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span> </span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>Ptr<span style="color: rgb(128, 96, 48); "><</span>NetDevice<span style="color: rgb(128, 96, 48); ">></span> toDev <span style="color: rgb(128, 96, 48); ">=</span> channel<span style="color: rgb(128, 96, 48); ">-></span>GetDevice <span style="color: rgb(128, 96, 48); ">(</span><span style="color: rgb(192, 0, 0); ">1</span><span style="color: rgb(128, 96, 48); ">);</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>Ptr<span style="color: rgb(128, 96, 48); "><</span>NetDevice<span style="color: rgb(128, 96, 48); ">></span> fromDev <span style="color: rgb(128, 96, 48); ">=</span> channel<span style="color: rgb(128, 96, 48); ">-></span>GetDevice <span style="color: rgb(128, 96, 48); ">(</span><span style="color: rgb(192, 0, 0); ">0</span><span style="color: rgb(128, 96, 48); ">);</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span> </span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span><span style="color: rgb(195, 78, 0); ">// set data rates</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>toDev<span style="color: rgb(128, 96, 48); ">-></span>SetAttribute <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">"</span><span style="color: rgb(230, 0, 0); ">DataRate</span><span style="color: maroon; ">"</span><span style="color: rgb(128, 96, 48); ">,</span> StringValue <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">"</span><span style="color: rgb(230, 0, 0); ">10Mbps</span><span style="color: maroon; ">"</span><span style="color: rgb(128, 96, 48); ">));</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>fromDev<span style="color: rgb(128, 96, 48); ">-></span>SetAttribute <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">"</span><span style="color: rgb(230, 0, 0); ">DataRate</span><span style="color: maroon; ">"</span><span style="color: rgb(128, 96, 48); ">,</span> StringValue <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">"</span><span style="color: rgb(230, 0, 0); ">10Mbps</span><span style="color: maroon; ">"</span><span style="color: rgb(128, 96, 48); ">));</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span> </span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span><span style="color: rgb(195, 78, 0); ">// set queue sizes</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>PointerValue txQueue<span style="color: rgb(128, 96, 48); ">;</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span> </span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>toDev<span style="color: rgb(128, 96, 48); ">-></span>GetAttribute <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">"</span><span style="color: rgb(230, 0, 0); ">TxQueue</span><span style="color: maroon; ">"</span><span style="color: rgb(128, 96, 48); ">,</span> txQueue<span style="color: rgb(128, 96, 48); ">);</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>txQueue<span style="color: rgb(128, 96, 48); ">.</span>Get<span style="color: rgb(128, 96, 48); "><</span>DropTailQueue<span style="color: rgb(128, 96, 48); ">></span> <span style="color: rgb(128, 96, 48); ">()-></span>SetAttribute <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">"</span><span style="color: rgb(230, 0, 0); ">MaxPackets</span><span style="color: maroon; ">"</span><span style="color: rgb(128, 96, 48); ">,</span> StringValue <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">"</span><span style="color: rgb(230, 0, 0); ">1000</span><span style="color: maroon; ">"</span><span style="color: rgb(128, 96, 48); ">));</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span> </span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>fromDev<span style="color: rgb(128, 96, 48); ">-></span>GetAttribute <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">"</span><span style="color: rgb(230, 0, 0); ">TxQueue</span><span style="color: maroon; ">"</span><span style="color: rgb(128, 96, 48); ">,</span> txQueue<span style="color: rgb(128, 96, 48); ">);</span></span></pre><pre style="margin: 0cm 0cm 0.0001pt; font-size: 10pt; font-family: 'Courier New'; background-color: rgb(241, 240, 240); background-position: initial initial; background-repeat: initial initial; "><span>txQueue<span style="color: rgb(128, 96, 48); ">.</span>Get<span style="color: rgb(128, 96, 48); "><</span>DropTailQueue<span style="color: rgb(128, 96, 48); ">></span> <span style="color: rgb(128, 96, 48); ">()-></span>SetAttribute <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">"</span><span style="color: rgb(230, 0, 0); ">MaxPackets</span><span style="color: maroon; ">"</span><span style="color: rgb(128, 96, 48); ">,</span> StringValue <span style="color: rgb(128, 96, 48); ">(</span><span style="color: maroon; ">"</span><span style="color: rgb(230, 0, 0); ">1000</span><span style="color: maroon; ">"</span><span style="color: rgb(128, 96, 48); ">));</span></span></pre><div><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span> </span></p></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span>---</span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span>Alex</span></div></div><div><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span> </span></p></div><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span> </span></p><div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span>On Mar 26, 2013, at 5:11 AM, Hovaidi Ardestani Mohammad <</span><a href="mailto:mohammad.hovaidi.ardestani@aalto.fi" target="_blank" style="color: purple; text-decoration: underline; "><span><span>mohammad.hovaidi.ardestani@aalto.fi</span></span><span></span></a><span>> wrote:</span></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span><br><br></span></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt; "><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Hello,</span></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">I am wondering how I can change the topology parameters, such as Delay, Capacity and Queue length in real time. It seems to me that we can have those parameters fixed as input in *.txt file.</span></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Can anybody guide me?</span></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">I really appreciate your help in advance.</span></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">-Mohammad</span></span></div></div></blockquote></div></div></div></div></blockquote></div><br></body></html>