<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><base href="x-msg://3678/"></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>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.</div><div><br></div><div>You can try to do something like the following:</div><div><br></div><div><div><pre style="background-color: rgb(241, 240, 240); ">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 style="color: rgb(128, 96, 48);">;</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><span style="color: rgb(128, 96, 48);">></span>GetDevice <span style="color: rgb(128, 96, 48);">(</span><span style="color: rgb(128, 96, 48);">?</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">-</span><span style="color: rgb(128, 96, 48);">></span>netDevice<span style="color: rgb(128, 96, 48);">-</span><span style="color: rgb(128, 96, 48);">></span>GetChannel <span style="color: rgb(128, 96, 48);">(</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">;</span>

<span style="color: rgb(195, 78, 0);">// set channel delay</span>
channel<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: rgb(128, 0, 0);">"</span><span style="color: rgb(230, 0, 0);">Delay</span><span style="color: rgb(128, 0, 0);">"</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: rgb(128, 0, 0);">0.01</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">;</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><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 style="color: rgb(128, 96, 48);">;</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><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 style="color: rgb(128, 96, 48);">;</span>

<span style="color: rgb(195, 78, 0);">// set data rates</span>
toDev<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: rgb(128, 0, 0);">"</span><span style="color: rgb(230, 0, 0);">DataRate</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 96, 48);">,</span> StringValue <span style="color: rgb(128, 96, 48);">(</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(230, 0, 0);">10Mbps</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">;</span>
fromDev<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: rgb(128, 0, 0);">"</span><span style="color: rgb(230, 0, 0);">DataRate</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 96, 48);">,</span> StringValue <span style="color: rgb(128, 96, 48);">(</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(230, 0, 0);">10Mbps</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">;</span>

<span style="color: rgb(195, 78, 0);">// set queue sizes</span>
PointerValue txQueue<span style="color: rgb(128, 96, 48);">;</span>

toDev<span style="color: rgb(128, 96, 48);">-</span><span style="color: rgb(128, 96, 48);">></span>GetAttribute <span style="color: rgb(128, 96, 48);">(</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(230, 0, 0);">TxQueue</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 96, 48);">,</span> txQueue<span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">;</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><span style="color: rgb(128, 96, 48);">)</span><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: rgb(128, 0, 0);">"</span><span style="color: rgb(230, 0, 0);">MaxPackets</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 96, 48);">,</span> StringValue <span style="color: rgb(128, 96, 48);">(</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(230, 0, 0);">1000</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">;</span>

fromDev<span style="color: rgb(128, 96, 48);">-</span><span style="color: rgb(128, 96, 48);">></span>GetAttribute <span style="color: rgb(128, 96, 48);">(</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(230, 0, 0);">TxQueue</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 96, 48);">,</span> txQueue<span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">;</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><span style="color: rgb(128, 96, 48);">)</span><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: rgb(128, 0, 0);">"</span><span style="color: rgb(230, 0, 0);">MaxPackets</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 96, 48);">,</span> StringValue <span style="color: rgb(128, 96, 48);">(</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(230, 0, 0);">1000</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">)</span><span style="color: rgb(128, 96, 48);">;</span></pre><div><br></div></div></div><div>---</div><div>Alex</div><div><br></div><br><div><div>On Mar 26, 2013, at 5:11 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 lang="EN-GB" link="#0563C1" vlink="#954F72" 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 class="WordSection1" style="page: WordSection1; "><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Hello,<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; 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.<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Can anybody guide me?<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">I really appreciate your help in advance.<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">-Mohammad<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div></div></div></blockquote></div></body></html>