美文网首页
ndnSIM applications

ndnSIM applications

作者: Olivia_SHEN | 来源:发表于2017-12-01 16:16 被阅读0次

Reference applications

ndnSIM包含一些可用作NDN仿真基础的参考应用程序。

ConsumerCbr

一个以预定义模式(恒定频率,恒定平均速率,兴趣发布间隔均匀随机分布或者指数随机分布)产生兴趣业务的应用。

// Create application using the app helper
AppHelper helper("ns3::ndn::ConsumerCbr");

这个应用有以下属性:

  • 频率(默认1Hz,1 per second),既是期望的频率for randomized version也是准确的频率for contant version
// Set attribute using the app helper
helper.SetAttribute("Frequency", DoubleValue (1.0));
  • Randomize (默认"none")
    明确是否要对兴趣包的间隔进行随机化。有以下几个变量可以考虑:
    "none": no randomization
    "uniform": uniform distribution in range (0, 1/Frequency)
    "exponential": exponential distribution with mean 1/Frequency
// Set attribute using the app helper
helper.SetAttribute("Randomize", StringValue("uniform"));
ConsumerZipfMandelbrot

请求内容服从Zipf-Mandelbrot分布,继承自ConsumerCbr

// Create application using the app helper
ndn::AppHelper helper("ns3::ndn::ConsumerZipfMandelbrot");

Frequency and Randomize属性的设置和ComsumerCbr一致
多了一个属性:

  • NumberOfContents(默认100)应用所请求的不同内容(序列)的数量
ConsumerBatches

在指定的模拟点生成指定数量的兴趣的开关式应用程序。

// Create application using the app helper
ndn::AppHelper consumerHelper("ns3::ndn::ConsumerBatches");

有以下属性:

  • Batches (默认:Empty)
    指定兴趣数据包的确切模式,指定何时以及应该发送多少兴趣数据包。
    下面的例子定义1s时应该请求一个兴趣,2s时请求5个兴趣,10S时请求2个兴趣。
/ /Set attribute using the app helper
consumerHelper.SetAttribute("Batches", StringValue("1s 1 2s 5 10s 2"));

兴趣不会在指定时间一起发出,而是会根据估计的重传时间分开发送:
所以,可能会导致以下的兴趣发送表:

1s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 0
2s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 1
2s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 2
2.2s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 3
2.4s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 4
2.6s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 5
10s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 6
10.2s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 7
ConsumerWindow

一个生成可变速率兴趣包发送的app,实现了一个简单的基于滑动窗口的兴趣生成机制。

// Create application using the app helper
AppHelper consumerHelper("ns3::ndn::ConsumerWindow");

有以下属性:

  • Window(默认1):在不等待数据(未完成兴趣的数量)的情况下将被发送的初始兴趣数量
  • PayloadSize(默认1040):期望的数据包负载的大小
  • Size(默认-1):
    要请求的数据量(将在收到大小数据后停止发布兴趣)如果Size设置为-1,则将要求兴趣直到模拟结束。
Producer

replying every incoming Interest with Data packet with a specified size and name same as in Interest.

// Create application using the app helper
AppHelper consumerHelper("ns3::ndn::Producer");

相关文章

  • ndnSIM applications

    Reference applications ndnSIM包含一些可用作NDN仿真基础的参考应用程序。 Consu...

  • NDNSIM 在线拓扑生成器

    本文主要介绍一个用于在线生成NDNSIM实现所需拓扑的工具, github项目地址:SunnyQjm/ndnsim...

  • ubuntu下基于ns-3的ndnSIM的安装

    http://ndnsim.net/1.0/getting-started.htmlsudo apt-get up...

  • GPUImage翻译六:Demo代码

    Sample applications Several sample applications are bundl...

  • Mac 中同一个程序打开多个的方法

    open -n /Applications/xxxxx.app 例如:open -n /Applications/...

  • Shader溶解

    [官网基础](file:///Volumes/Applications/Applications/Unity5.3...

  • 升级xcode11后上传ipa文件失败,xcrun altool

    错误提示:/Applications/Xcode.app/Contents/Applications/Applic...

  • Applications

    1.将本章所解释的方法应用于以下两个问题。一定要选择你感兴趣的问题,因为后续章节中的应用将建立在这个问题上。 a....

  • Applications

    1.根据本章中提出的问题来审视自己。不要为你已经知道的事情而沉沦。相反,试着扩大你的自我意识。不要忽视你不太有利的...

  • Applications

    5仔细阅读以下各句子。然后解决什么问题。如果有,一个好的批判性思维者会找到它合适的问。 a电视新闻大肆渲染处理战争...

网友评论

      本文标题:ndnSIM applications

      本文链接:https://www.haomeiwen.com/subject/uqdwbxtx.html