[ndnSIM] How I can cheek the bandwidth

Alex Afanasyev aa at CS.UCLA.EDU
Wed Nov 11 02:03:14 PST 2015


> On Nov 1, 2015, at 9:00 PM, Kerrouche Abdelali <kerrouche.abdelali at yahoo.fr> wrote:
> 
> Dears ALL,
> 
> How can I access the link Bandwidth to manage it in ndnSIM?
> In fact, I want know where I can find the Values of Bandwidth that I give to link by the following instruction:
> Config::SetDefault("ns3::PointToPointNetDevice::DataRate", StringValue("1Mbps"));

Hi Kerrouche,

It is very easy to set the default DataRate on PointToPointNetDevice, but not as simple to get actual value.  Though, it is possible.

First. You need to get hold of the NetDevice you're interested in (this is the most complex part, as it depends on your scenario).  After you have this, getting the value is easy:

Ptr<NetDevice> nd = ...;
DataRateValue value;
nd->GetAttribute(DataRate, value);

// now value contains what you need

For more info check: https://www.nsnam.org/doxygen/classns3_1_1_data_rate_value.html and https://www.nsnam.org/doxygen/classns3_1_1_data_rate.html

---
Alex

> 
> How I can Access to this values to check it;
> Best regards
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20151111/07efe0e5/attachment.bin>


More information about the ndnSIM mailing list