[ndnSIM] Changing the BW on Link during sim

Ahmed Sadek don1559 at gmail.com
Tue Apr 5 04:04:05 PDT 2016

Dear All,

I wanted to change the BW on link during sim, I found this method in a
previous email Here

so now I have this method:

// Set the Data Rate of a given Device.
void setDataRate(Ptr<NetDevice > nd, std::string DR)
  Ptr < Channel > channel = nd->GetChannel();
  Ptr<NetDevice> toDev = channel->GetDevice (1);
  Ptr<NetDevice> fromDev = channel->GetDevice (0);

  toDev->SetAttribute ("DataRate", StringValue (DR));
  fromDev->SetAttribute ("DataRate", StringValue (DR));

And was wondering, is there a simpler method to take advantage of point to
point device method Here

pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));

), can't we cast *netDevice *to *PointToPointNetDevice *or something
similar ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160405/37b148b7/attachment.html>

More information about the ndnSIM mailing list