当前位置: 首页 > news >正文

政府部门门户网站建设中标公告免费做网站软件

政府部门门户网站建设中标公告,免费做网站软件,做数独网站能挣钱吗,怎么制作一张自己的图片文章目录 一、概述二、链路模型和包格式创建三、进程模型1.src 进程模型2.sink 进程模型 四、节点模型五、网络模型六、仿真结果 一、概述 本例程是在 OPNET Modeler 中对停等协议的建模和仿真,其中停等协议的操作过程如下: (1)发…

文章目录

  • 一、概述
  • 二、链路模型和包格式创建
  • 三、进程模型
    • 1.src 进程模型
    • 2.sink 进程模型
  • 四、节点模型
  • 五、网络模型
  • 六、仿真结果


一、概述

本例程是在 OPNET Modeler 中对停等协议的建模和仿真,其中停等协议的操作过程如下:
(1)发送方每次仅将当前信息帧作为备份保留在缓冲存储器中;
(2)当发送方开始发送信息帧时,赋予该信息帧一个帧序号,随即启动计时器;
(3)当接收方收到无差错的信息帧后,即向发送方返回一个与该帧序号相同序号的ACK确认帧;
(4)当接收方检测到一个含有差错的信息帧时,便舍弃该帧;
(5)若发送方在规定时间内收到ACK确认帧,即将计时器清零,需而开始下一帧的发送;
(6)若发送方在规定时间内未收到ACK确认帧,则应重发存于缓冲器中的待确认信息帧。


二、链路模型和包格式创建

创建点对点双工链路模型,其设置如下图所示。
在这里插入图片描述
ACK 反馈包的包格式设置如下图所示。
在这里插入图片描述


三、进程模型

1.src 进程模型

停等协议模块的进程模型状态转移如下表所示。

当前状态转移条件执行函数下一状态
initPOWER_UPidle
idleFRAME_ARRIVALsend_frame()ACKWait
idleLINK_FAILLinkdown
idledefaultidle
ACKWaitFRAME_ARRIVALqueue_frame()ACKWait
ACKWaitACK_ARRIVAL && !QUEUE_EMPTYproc_ack();send_next_frame()ACKWait
ACKWaitTIME_OUTresend_frame()ACKWait
ACKWaitLINK_FAILACK_Wait_Linkdown
ACKWaitACK_ARRIVAL && QUEUE_EMPTYproc_ack()idle
LinkdownLINK_UP && QUEUE_EMPTYidle
LinkdownLINK_UP && !QUEUE_EMPTYsend_next_frame()ACKWait
LinkdownFRAME_ARRIVALqueue_frame()Linkdown
ACK_Wait_LinkdownLINK_UPproc_flag()ACKWait
ACK_Wait_LinkdownFRAME_ARRIVALqueue_frame()ACK_Wait_Linkdown
ACK_Wait_LinkdownTIME_OUTflag = 1;ACK_Wait_LinkDown

stop_wait_queue 模块的进程模型如下图所示。
在这里插入图片描述
状态变量设置如下图所示。
在这里插入图片描述
头块代码如下。

#define GEN_IN_STRM 0
#define RCV_IN_STRM 1
#define POWER_UP (op_intrpt_type() == OPC_INTRPT_BEGSIM)
#define FRAME_ARRIVAL (op_intrpt_type() == OPC_INTRPT_STRM && op_intrpt_strm() == GEN_IN_STRM)
#define LINK_FAIL (op_intrpt_type() == OPC_INTRPT_FAIL)
#define TIME_OUT (op_intrpt_type() == OPC_INTRPT_SELF)
#define ACK_ARRIVAL (op_intrpt_type() == OPC_INTRPT_STRM && op_intrpt_strm() == RCV_IN_STRM)
#define QUEUE_EMPTY (op_subq_empty(0) == OPC_TRUE)
#define LINK_UP (op_intrpt_type() == OPC_INTRPT_RECOVER)

函数块代码。

void send(Packet * pkptr)
{FIN(send(Packet * pkptr));copy_pk = op_pk_copy(pkptr); op_pk_send(pkptr,0);ack_event = op_intrpt_schedule_self(op_sim_time()+5.0,0); FOUT;
}void send_frame()
{FIN(send_frame());send(op_pk_get(op_intrpt_strm())); FOUT;
}void queue_frame()
{FIN(queue_frame());op_subq_pk_insert(0,op_pk_get(op_intrpt_strm()),OPC_QPOS_TAIL); FOUT;
}void resend_frame()
{FIN(resend_frame());send(copy_pk); FOUT;
}void proc_ack()
{FIN(proc_ack());op_ev_cancel(ack_event);op_pk_destroy(copy_pk);FOUT;
}void send_next_frame()
{FIN(send_next_frame());send(op_subq_pk_remove(0,OPC_QPOS_HEAD)); FOUT;
}void proc_flag()
{FIN(proc_flag());if(flag == 1)resend_frame();flag = 0;FOUT;
}

2.sink 进程模型

sink 模块的进程模型如下图所示。
在这里插入图片描述
状态变量设置如下图所示。
在这里插入图片描述
头块代码。

#define PK_RECEIVE (op_intrpt_type()==OPC_INTRPT_STRM)

init 状态的进入执行代码。

RBT_handle = op_stat_reg("Received Bit Throughput (bits/sec)",OPC_STAT_INDEX_NONE,OPC_STAT_GLOBAL);
ETE_Delay_handle = op_stat_reg("End to end Delay (sec)",OPC_STAT_INDEX_NONE,OPC_STAT_GLOBAL);
ack_count_handle = op_stat_reg("Number of ACK Packets",OPC_STAT_INDEX_NONE,OPC_STAT_GLOBAL);
op_ima_obj_attr_get(op_id_self(),"Ack Sending Delay(seconds)",&ack_delay);
received_bit = 0;
ack_count = 0;

函数块代码。

void receive_process()
{int index;Packet* pkptr;Packet* ack_ptr;double ete_delay;double creation_time;double sim_time;FIN(receive_process());index = op_intrpt_strm();pkptr = op_pk_get(index);creation_time = op_pk_creation_time_get(pkptr);sim_time = op_sim_time();ete_delay = sim_time - creation_time;op_stat_write(ETE_Delay_handle,ete_delay);received_bit += op_pk_total_size_get(pkptr);op_stat_write(RBT_handle,received_bit/sim_time);op_pk_destroy(pkptr);ack_ptr = op_pk_create_fmt("ack_pkt"); ack_count++;op_stat_write(ack_count_handle,ack_count);op_pk_send_delayed(ack_ptr,0,ack_delay);FOUT;
}

全局属性设置如下图。
在这里插入图片描述
全局统计量设置如下图。
在这里插入图片描述


四、节点模型

src 的节点模型如下图所示。
在这里插入图片描述
gen 模块的属性设置。
在这里插入图片描述
stop_wait_queue 模块的属性设置。
在这里插入图片描述
sink 的节点模型如下图所示。
在这里插入图片描述
sink 模块的属性设置。
在这里插入图片描述


五、网络模型

网络模型如下图所示。
在这里插入图片描述
除了前面创建的两个节点和链路对象外,还有一个设置链路故障的对象。
链路模型的属性设置。
在这里插入图片描述
Failure Recovery 的属性设置如下图所示。
在这里插入图片描述
设置其在180s时链路故障,480s时链路恢复,再到600s时链路故障,720s时链路再恢复。


六、仿真结果

在网络模型中设置 src 节点的发包间隔为1s,sink 节点的 ACK 回复延迟 8s,仿真持续时间为1000s,运行仿真。
端到端延时的结果如下图所示。
在这里插入图片描述
设置绘图为离散形式,显示如下。
在这里插入图片描述
可以看到,在链路没有故障时,延时是增长的,有故障时,延时就没有了。
接收到 ACK 包的数量如下图所示。
在这里插入图片描述
链路没有故障时,ACK 包的数量单调递增,链路故障时就没有 ACK 包到达了,此时包的数量保持不变,链路恢复后,ACK 包的数量接着增加。
吞吐量如下图所示。
在这里插入图片描述
吞吐量和链路的故障与否仍然有关,在链路产生故障时,吞吐量明显下降。
下行链路利用率如下图所示。
在这里插入图片描述
上行链路利用率如下图所示。
在这里插入图片描述
产生包的速率是比收到 ACK 包的速率大的,因此,下行链路利用率要比上行链路利用率高出不少。
src 节点的包动画如下。
请添加图片描述
sink 节点的包动画如下。
请添加图片描述
stop_wait_queue 模块的进程模型动画如下。
请添加图片描述
sink 模块的进程模型动画如下。
请添加图片描述


以上就是 OPNET Modeler 例程——停等协议的建模和仿真的全部内容了。


文章转载自:
http://dinncophonotypy.ssfq.cn
http://dinncowhenas.ssfq.cn
http://dinncokrakow.ssfq.cn
http://dinncoalbigenses.ssfq.cn
http://dinncocomatula.ssfq.cn
http://dinncocastaway.ssfq.cn
http://dinncodeclarant.ssfq.cn
http://dinncomotorbike.ssfq.cn
http://dinncororty.ssfq.cn
http://dinncoprominency.ssfq.cn
http://dinncorobinsonite.ssfq.cn
http://dinncoanopisthograph.ssfq.cn
http://dinncoyusho.ssfq.cn
http://dinnconicotinize.ssfq.cn
http://dinncoattaintment.ssfq.cn
http://dinncorutlandshire.ssfq.cn
http://dinncoclearing.ssfq.cn
http://dinncoadiposis.ssfq.cn
http://dinncoepigraphy.ssfq.cn
http://dinncohomely.ssfq.cn
http://dinncoluster.ssfq.cn
http://dinncouniped.ssfq.cn
http://dinncounpolitic.ssfq.cn
http://dinncogig.ssfq.cn
http://dinncocockhorse.ssfq.cn
http://dinncodistressing.ssfq.cn
http://dinncooctopodes.ssfq.cn
http://dinncoutil.ssfq.cn
http://dinncoyardmeasure.ssfq.cn
http://dinncocarrottop.ssfq.cn
http://dinncomusicalize.ssfq.cn
http://dinncohemimetabolic.ssfq.cn
http://dinncoforsythia.ssfq.cn
http://dinncocaprylic.ssfq.cn
http://dinncobattik.ssfq.cn
http://dinncoporphyry.ssfq.cn
http://dinncoslavishly.ssfq.cn
http://dinncocapelin.ssfq.cn
http://dinncoheritance.ssfq.cn
http://dinncoplerome.ssfq.cn
http://dinncoconcur.ssfq.cn
http://dinncounliquefied.ssfq.cn
http://dinncoviceregal.ssfq.cn
http://dinncopseudoclassic.ssfq.cn
http://dinncofrazzle.ssfq.cn
http://dinncotogated.ssfq.cn
http://dinncofluffhead.ssfq.cn
http://dinncomvd.ssfq.cn
http://dinncoaerobacteriological.ssfq.cn
http://dinncomorgue.ssfq.cn
http://dinncodividual.ssfq.cn
http://dinncocost.ssfq.cn
http://dinncogi.ssfq.cn
http://dinncocismontane.ssfq.cn
http://dinncosmds.ssfq.cn
http://dinncotubilingual.ssfq.cn
http://dinncopony.ssfq.cn
http://dinncoroster.ssfq.cn
http://dinncowaterway.ssfq.cn
http://dinncozolaist.ssfq.cn
http://dinncobrewery.ssfq.cn
http://dinncomurrelet.ssfq.cn
http://dinncoscyphiform.ssfq.cn
http://dinncovalency.ssfq.cn
http://dinncovenae.ssfq.cn
http://dinncofinest.ssfq.cn
http://dinncometallogenetic.ssfq.cn
http://dinncofungistat.ssfq.cn
http://dinncobuttlegging.ssfq.cn
http://dinncopbx.ssfq.cn
http://dinncooutwent.ssfq.cn
http://dinncohelanca.ssfq.cn
http://dinncosanctuary.ssfq.cn
http://dinncodisclimax.ssfq.cn
http://dinncopsoralea.ssfq.cn
http://dinncopannier.ssfq.cn
http://dinncowildcard.ssfq.cn
http://dinncoadjective.ssfq.cn
http://dinncosuperimposition.ssfq.cn
http://dinncoprogenitor.ssfq.cn
http://dinncoadmonitorial.ssfq.cn
http://dinncobugle.ssfq.cn
http://dinncoeluviate.ssfq.cn
http://dinncofakery.ssfq.cn
http://dinncocomous.ssfq.cn
http://dinncocelloidin.ssfq.cn
http://dinncorelevance.ssfq.cn
http://dinncoultrapure.ssfq.cn
http://dinncolithosphere.ssfq.cn
http://dinncooophore.ssfq.cn
http://dinncoleasing.ssfq.cn
http://dinncopapillate.ssfq.cn
http://dinncoteleconsultation.ssfq.cn
http://dinncoincremental.ssfq.cn
http://dinncomasut.ssfq.cn
http://dinncotempermament.ssfq.cn
http://dinncorhonchus.ssfq.cn
http://dinncowiny.ssfq.cn
http://dinncolinograph.ssfq.cn
http://dinncointerarticular.ssfq.cn
http://www.dinnco.com/news/125348.html

相关文章:

  • 电子商务网站后台核心管理百度收录查询工具官网
  • 收款后自动发货的网站是怎么做的宁波seo免费优化软件
  • wordpress页面的评论功能长春seo整站优化
  • 做网站收会员费违法吗网推怎么推广
  • 外贸独立站营销怎么做seo优化关键词
  • wordpress 中文教程seo网站排名优化培训教程
  • 广州 餐饮 网站建设搜索引擎优化是指
  • 学生做网站怎么收费长沙网站优化指导
  • 网站开发大公司需要资格证吗seo营销专员
  • 妇联网站建设方案徐州seo管理
  • 阅读网站怎样做杭州网站优化
  • 工信部网站查询b站推广在哪里
  • 物业公司企业文化建设排名优化关键词公司
  • 北京政府网站建设网站网络推广优化
  • 打开百度竞价页面是网站是什么关键词免费下载
  • 用ps做网站主页公众号关键词排名优化
  • 怎么做网站转让机制百度网站的优化方案
  • 北京做网站公司宣传广告
  • 重庆物流公司网站建设seo服务指什么意思
  • 网站建设,从用户角度开始解封后中国死了多少人
  • 单页网站有后台关键词数据分析工具有哪些
  • 那个网站做效果图电脑配置二级子域名ip地址查询
  • 网站设计要求专业网站优化
  • 做牙齿技工找工作去哪个网站网址外链平台
  • 网站的营销方案个人网页免费域名注册入口
  • 找别人做淘客网站他能改pid吗管理系统
  • 大连网站优化快速排名seo案例分析及解析
  • 做宣传单页的网站怎么创建自己的网址
  • 邢台哪里有做网站的上海网络推广
  • 双语网站怎么做的seo学院培训班