opnet之作者设计csma
来源:互联网 发布:vb中elseif什么意思 编辑:程序博客网 时间:2024/06/05 08:11
作者设计的:
自己设计的:
状态机
HB
/* Input stream from ideal generator module */#define IN_STRM 0/* Output stream to bus transmitter module */#define OUT_STRM 0/* Conditional macros */#define PKT_ARVL (op_intrpt_type() == OPC_INTRPT_STRM)/* Global Variable */extern int subm_pkts;/* Input statistic indices */#define CH_BUSY_STAT 0/* Conditional macros */#define FREE (op_stat_local_read (CH_BUSY_STAT) == 0.0)#define PKTS_QUEUED (!op_strm_empty (IN_STRM))#define CH_GOES_FREE (op_intrpt_type () == OPC_INTRPT_STAT)
init
/* Get the maximum packet count, *//* set at simulation run-time */op_ima_sim_attr_get_int32 ("max packet count", &max_packet_count);
tx_pkt
Packet * out_pkt;/* A packet has arrived for transmission. Acquire *//* the packet from the input stream, send the packet *//* and update the global submitted packet counter. */out_pkt = op_pk_get (IN_STRM);op_pk_send (out_pkt, OUT_STRM);++subm_pkts;/* Compare the total number of packets submitted with *//* the maximum set for this simulation run. If equal *//* end the simulation run. */if (subm_pkts == max_packet_count) { op_sim_end ("Simulation ended when max packet count reached.", "", "", ""); }
仿真结果
tags:opnet
0 0
- opnet之作者设计csma
- opnet之自行设计csma
- opnet之aloha进阶csma
- opnet之自行设计csma/ca
- opnet之csma/ca之bbb_csma_tx
- opnet之csma/ca之aaa_csma_ca_rx
- opnet之自行设计csma/ca/tx
- opnet之自行设计csma/ca/rx
- 利用OPNET仿真CSMA /CD信道访问协议(不完整)
- CSMA/CD 和 CSMA/CA 之原理
- opnet调试之查看opnet日志文件
- opnet 学习之 process
- opnet之右键属性
- opnet学习之方法论
- opnet之事件列表
- opnet之Aloha
- opnet之变量类型
- opnet之进程接口
- 10.8交互式绘图
- Centos 6 Install Ovirt
- 素数
- 什么是支付账户、备付金、网络支付、银行卡清算、贷记卡、代扣、代付....
- SGI STL学习笔记(1):空间配置器(allocator)
- opnet之作者设计csma
- JavaWeb学习总结——Session总结
- Hello World程序背后的故事解密(二)——程序之生
- python数字图像处理(8):对比度与亮度调整
- 乒乓buffer
- KwikCluster算法实现
- Android Studio小技巧收集(极慢更新)
- secureCRT快捷键
- 关于Condition Variable为什么需要一个Mutex的思考