<div dir="ltr">Dear All,<div><br></div><div>I wanted to change the BW on link during sim, I found this method in a previous email <a href="http://www.lists.cs.ucla.edu/pipermail/ndnsim/2013-March/000297.html">Here</a></div><div><br></div><div>so now I have this method:</div><div><br></div><div><div>// Set the Data Rate of a given Device.</div><div>void setDataRate(Ptr<NetDevice > nd, std::string DR)</div><div>{</div><div>  Ptr < Channel > channel = nd->GetChannel();</div><div>  Ptr<NetDevice> toDev = channel->GetDevice (1);</div><div>  Ptr<NetDevice> fromDev = channel->GetDevice (0);</div><div><br></div><div>  toDev->SetAttribute ("DataRate", StringValue (DR));</div><div>  fromDev->SetAttribute ("DataRate", StringValue (DR));</div><div>}</div></div><div><br></div><div>And was wondering, is there a simpler method to take advantage of point to point device method <a href="https://www.nsnam.org/doxygen/classns3_1_1_point_to_point_net_device.html#adc4e5973337c576a2352e261cd844686">Here</a> (</div><pre style="overflow:auto;padding:5px;color:rgb(51,51,51);line-height:15.6px;border-top-width:1px;border-bottom-width:1px;border-style:solid none;border-top-color:rgb(170,204,153);border-bottom-color:rgb(170,204,153);background-color:rgb(238,255,204)">pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));<br></pre><div>), can't we cast <i style="color:rgb(0,0,0);white-space:pre-wrap"><b>netDevice </b></i>to <b>PointToPointNetDevice </b>or something similar ?<br></div><div><br></div><div>Thanks!</div><div>Ahmed</div></div>