TestScenario.ned

package nesting.simulations.examples;import ned.DatarateChannel;
import nesting.node.ethernet.VlanEtherHostQ;
import nesting.node.ethernet.VlanEtherHostSched;
import nesting.node.ethernet.VlanEtherSwitchPreemptable;
//场景测试
network TestScenario
{types://定义信道属性channel C extends DatarateChannel{delay = 0.1us;    //时延datarate = 1Gbps;  //传输速率}submodules://switch A、B 继承自**VlanEtherSwitchPreemptable.ned**,此文件中定义了模块,实现了一个支持帧抢占机制的交换机模块。switchA: VlanEtherSwitchPreemptable {parameters:@display("p=188,127");gates://VlanEtherSwitchPreemptable.ned中定义的输入输出门ethg[4];}switchB: VlanEtherSwitchPreemptable {parameters:@display("p=327,127");gates:ethg[3];}//workstation1、2 继承自**VlanEtherHostQ.ned**中的**VlanEtherHostQ**。此文件定义定义了模块,具有创建和接收带有VLAN标记的以太网流量能力的简单主机。workstation1: VlanEtherHostQ {@display("p=79,62");}workstation2: VlanEtherHostQ {@display("p=172,29");}//备份服务器backupServer: VlanEtherHostQ {@display("p=446,54");}//机器控制器, robotController 继承自 **VlanEtherHostSched.ned**。此文件定义 了模块,简单主机能够根据一个给定的时间表发送帧。robotController: VlanEtherHostSched {@display("p=79,202");}//机械臂roboticArm: VlanEtherHostQ {@display("p=440,202");}connections:robotController.ethg <--> C <--> switchA.ethg[0];workstation1.ethg <--> C <--> switchA.ethg[1];workstation2.ethg <--> C <--> switchA.ethg[2];roboticArm.ethg <--> C <--> switchB.ethg[0];backupServer.ethg <--> C <--> switchB.ethg[1];switchA.ethg[3] <--> C <--> switchB.ethg[2];
}
  1. switch A、B 继承自VlanEtherSwitchPreemptable.ned,此文件中定义了模块,实现了一个支持帧抢占机制的交换机模块。
  2. //VlanEtherSwitchPreemptable.ned中定义的输入输出门 ethg[4];
  3. workstation1、2 继承自VlanEtherHostQ.ned。此文件定义定义了模块,具有创建和接收带有VLAN标记的以太网流量能力的简单主机。
  4. robotController 继承自 VlanEtherHostSched.ned。此文件定义 了模块,简单主机能够根据一个给定的时间表发送帧。

01_example_strict_priority.ini

[General]
#场景
network = TestScenariorecord-eventlog = false     #不记录事件日志
debug-on-errors = true
result-dir = results_strict_priority
sim-time-limit = 1s# debug
**.displayAddresses = true
**.verbose = true# MAC Addresses
**.robotController.eth.address = "00-00-00-00-00-01"
**.workstation1.eth.address = "00-00-00-00-00-02"
**.workstation2.eth.address = "00-00-00-00-00-03"
**.roboticArm.eth.address = "00-00-00-00-00-04"
**.backupServer.eth.address = "00-00-00-00-00-05"# Switches
**.switch*.processingDelay.delay = 5us
**.filteringDatabase.database = xmldoc("xml/TestScenarioRouting.xml", "/filteringDatabases/")  #引用.xml配置文件中<filteringDatabases>标签内容**.switchA.eth[3].queue.gateController.initialSchedule = xmldoc("xml/TestScenarioSchedule_AllOpen.xml", "/schedules/switch[@name='switchA']/port[@id='3']/schedule")
**.switchB.eth[0].queue.gateController.initialSchedule = xmldoc("xml/TestScenarioSchedule_AllOpen.xml", "/schedules/switch[@name='switchB']/port[@id='0']/schedule")
**.switch*.eth[*].queue.gateController.enableHoldAndRelease = false
**.switch*.eth[*].queue.numberOfQueues = 8
**.switch*.eth[*].queue.tsAlgorithms[0].typename = "StrictPriority"
**.switch*.eth[*].queue.tsAlgorithms[1].typename = "StrictPriority"
**.switch*.eth[*].queue.tsAlgorithms[2].typename = "StrictPriority"
**.switch*.eth[*].queue.tsAlgorithms[3].typename = "StrictPriority"
**.switch*.eth[*].queue.tsAlgorithms[4].typename = "StrictPriority"
**.switch*.eth[*].queue.tsAlgorithms[5].typename = "StrictPriority"
**.switch*.eth[*].queue.tsAlgorithms[6].typename = "StrictPriority"
**.switch*.eth[*].queue.tsAlgorithms[7].typename = "StrictPriority"
**.switch*.eth[*].queue.queues[0].expressQueue = true
**.switch*.eth[*].queue.queues[1].expressQueue = true
**.switch*.eth[*].queue.queues[2].expressQueue = true
**.switch*.eth[*].queue.queues[3].expressQueue = true
**.switch*.eth[*].queue.queues[4].expressQueue = true
**.switch*.eth[*].queue.queues[5].expressQueue = true
**.switch*.eth[*].queue.queues[6].expressQueue = true
**.switch*.eth[*].queue.queues[7].expressQueue = true**.queues[*].bufferCapacity = 363360b**.switchA.eth[3].mac.enablePreemptingFrames = false# Schedule/Routing Swap
#**.scheduleSwap.schedule = xmldoc("xml/TestScenarioScheduleSwap.xml")# Robot Controller
**.robotController.trafGenSchedApp.initialSchedule = xmldoc("xml/TestScenarioSchedule_AllOpen.xml")# Workstations
**.workstation*.trafGenApp.destAddress = "00-00-00-00-00-05"
**.workstation*.trafGenApp.packetLength = 1500Byte-4Byte # MTU-Size - VLAN-Tag-Size
**.workstation*.trafGenApp.sendInterval = 12us
**.workstation*.trafGenApp.vlanTagEnabled = true
**.workstation1.trafGenApp.pcp = 6
**.workstation2.trafGenApp.pcp = 5# Robotic Arms
**.roboticArm.trafGenApp.numPacketsPerBurst = 0
**.roboticArm.trafGenApp.sendInterval = 1ms
**.roboticArm.trafGenApp.packetLength = 100B# Backup Server
**.backupServer.trafGenApp.numPacketsPerBurst = 0
**.backupServer.trafGenApp.sendInterval = 1ms
**.backupServer.trafGenApp.packetLength = 100B
  1. 在filteringDatabase时调用了TestScenarioRouting.xml配置文件,已做注释(怎么感觉是个路由表):
<filteringDatabases><filteringDatabase id="switchA"><static><forward><!-- 将发送到robotArm的数据包转发到switchB --><individualAddress macAddress="00-00-00-00-00-04" port="3" /><!-- 将发送到backupServer的数据包转发到switchB--><individualAddress macAddress="00-00-00-00-00-05" port="3" /></forward></static></filteringDatabase><filteringDatabase id="switchB"><static><forward><!-- 将发送到robotArm的数据包转发到robotArm--><individualAddress macAddress="00-00-00-00-00-04" port="0" /><!-- 将发送到backupServer的报文转发到backupServer--><individualAddress macAddress="00-00-00-00-00-05" port="1" /></forward></static></filteringDatabase>
</filteringDatabases>
  1. 队列门控列表的初始化过程中调用了TestScenarioSchedule_AllOpen.xml
<?xml version="1.0" ?>
<schedules><defaultcycle>400us</defaultcycle><host name="robotController"><cycle>400us</cycle><entry><start>10us</start><queue>7</queue><dest>00:00:00:00:00:04</dest><size>354B</size><flowId>1</flowId></entry></host><switch name="switchA"><port id="3"><schedule cycleTime="400us"><entry><length>400us</length><bitvector>11111111</bitvector></entry></schedule></port></switch><switch name="switchB"><port id="0"><schedule cycleTime="400us"><entry><length>400us</length><bitvector>11111111</bitvector></entry></schedule></port></switch>
</schedules>

(二)nesting解读simulations>examples相关推荐

  1. Spring源码之getBean(获取 bean)方法(二)解读

    目录 前言 `spring` 初始化 `bean` 过程 进入类 `ClassPathXmlApplicationContext` 的构造器 `AbstractApplicationContext` ...

  2. 【OpenPose】1.OpenPoseDemo文件的使用与解读

    OpenPose是基于深度学习的姿势估计开源框架. 它的源码托管在github上:OpenPose的链接 下载.安装可以参考官方文档,Visual Studio2017.CUDA9的安装方法可以参考国 ...

  3. Ubuntu安装OMNet++与nesting进行仿真

    0.版本 经测试,最终使用Ubuntu16.04 OMNet++ 5.4.1,INET 4.1.2,nesting master branch NOTE:我在尝试其他版本时有多种报错,略去不提,欢迎他 ...

  4. nvGRAPH API参考分析(二)

    nvGRAPH API参考分析(二) nvGRAPH Code Examples 本文提供了简单的示例. nvGRAPH convert topology example void check(nvg ...

  5. request中的内容存储_宜信开源|调用链系列(3):解读UAVStack中的调用链技术...

    拓展阅读:宜信开源|调用链系列(1):解读UAVStack中的贪吃蛇 调用链系列(二):解读UAVStack中的贪吃蛇-调用链 在Java中,HTTP协议的请求/响应模型是由Servlet规范+Ser ...

  6. 技本功丨请带上纸笔刷着看:解读MySQL执行计划的type列和extra列

    本萌最近被一则新闻深受鼓舞,西工大硬核"女学神"白雨桐,获6所世界顶级大学博士录取通知书. 货真价值的才貌双全,别人家的孩子 高考失利与心仪的专业失之交臂,选择了软件工程这门自己完 ...

  7. “云计算”三部曲之二:与“云”共舞——再谈云计算

    引言:去年,我曾在一篇名为<未来计算在"云-端">的文章中指出,纯"云计算"并不是启动计算未来的"万能钥匙","云+端 ...

  8. SQL Server 解读【已分区索引的特殊指导原则】(1)- 索引对齐

    一.前言 在MSDN上看到一篇关于SQL Server 表分区的文档:已分区索引的特殊指导原则,如果你对表分区没有实战经验的话是比较难理解文档里面描述的意思.这里我就里面的一些概念进行讲解,方便大家的 ...

  9. 1936年发表理想计算机的论文,科学网—图灵1936年论文解读(1):可计算性 - 柳渝的博文...

    "可计算性(Computability)"是可计算性理论的核心概念,具有深刻的数学内涵和哲学底蕴,图灵.丘奇.哥德尔等前辈的工作为此概念打下了坚实的基础,应该说对此概念的理解已经不 ...

最新文章

  1. 【Git报错】 ! [rejected] master - master (fetch first)
  2. 足不出户,游遍七大洲,不可错过的14部地理纪录片!
  3. 如何在MyEclipse中建立一个代理服务器
  4. linux中为什么已经是root用户仍不能执行程序
  5. 简单循迹小车实验心得_简单循迹小车的制作
  6. cad详图怎么画_CAD结构图怎么画?手把手教你CAD结构图的绘制方法
  7. How to change the implementation (detour) of an externally declared function
  8. <C++>初识STL —— 标准模板库
  9. java中的jsp是什么?
  10. 漫漫人生录 | 小圈子 | 别让自己“墙”了自己
  11. Android studio实现类微信界面
  12. Spring MVC实现查找酒店用例
  13. 后端程序员必备的 Linux 基础知识+常见命令(近万字总结)
  14. ModuleNotFoundError: No module named ‘kombu.five‘
  15. python 学习爬取链家武汉二手房市场成交记录
  16. 全国降雨量数据、气温数据、风速数据
  17. Android Snackbar基本使用
  18. 如何设计接口测试用例?
  19. TUM RGB-D数据集解释简介
  20. GX、LS型螺旋输送机结构新颖 噪声低

热门文章

  1. 米兔积木机器人与履带机甲零件差别_米兔积木机器人履带机甲,比乐高还有趣的益智体验!...
  2. 简洁的keras安装方法
  3. linux下x86和arm架构区别
  4. 学习指南!2020最新Android大厂面试真题大全,架构师必备技能
  5. OpenCV图片压缩保存
  6. 皮卡丘为什么不进化_神奇宝贝:为什么皮卡丘一直不愿进化?小智得知真相流下了眼泪!...
  7. 2021年安全员-A证考试总结及安全员-A证实操考试视频
  8. WP论坛WordPress主题免费下载(1)
  9. android7内存需求,内存疯狂涨价 安卓手机今年普及8G RAM落空
  10. OpenCV4 图像处理与视频分析实战教程 笔记