opnet之作者设计csma
2016-12-17 13:56
597 查看
作者设计的:
自己设计的:
tags:opnet
自己设计的:
状态机
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
相关文章推荐
- opnet之自行设计csma/ca/rx
- opnet之自行设计csma/ca/tx
- opnet之自行设计csma/ca
- opnet之自行设计csma
- 设计信息可视化的10条建议来源:ued163 作者:robot
- 网站设计65条原则 作者:小柯
- C#中不需要用锁的线程安全的Singleton设计模式开发者在线 Builder.com.cn 更新时间:2008-07-19作者: 来源:
- 两本讲游戏引擎设计、架构的书,同一个作者写的。
- 垂直搜索设计思路系列: 垂直搜索引擎——路在何方(作者佚名,请指出)
- 四种网络游戏外挂的设计方法 作者:mprogramer
- 利用OPNET仿真CSMA /CD信道访问协议(不完整)
- 《 .NET软件设计新思维》一书作者MSDN课程日程
- 与王翔面对面——《设计模式——基于C#的工程化实现及扩展》作者访谈录
- 《人月神话》作者Frederick P. Brooks, Jr.大师论设计原本
- 【原创】gooogleman亲自参与设计的三星Cortex A8 S5pv210 之Sate210核心板硬件用户手册(作者:gooogleman)
- 《人月神话》作者Frederick P. Brooks, Jr.大师论设计原本
- 与王翔面对面——《设计模式——基于C#的工程化实现及扩展》作者访谈录
- 集中/分布式搜索引擎的4种设计方案(作者: sunny)
- 《 .NET软件设计新思维》一书作者MSDN课程日程
- 【原创】gooogleman亲自参与设计的三星Cortex A8 S5pv210 之Sate210核心板硬件用户手册(作者:gooogleman)