下载此文档

学习笔记.doc


文档分类:外语学习 | 页数:约9页 举报非法文档有奖
1/9
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/9 下载此文档
文档列表 文档介绍
学****笔记 simple_source 模块的功能是按照配置产生包,包括不同的包格式和产生速率,也是比较简单的进程模型。参 考了《 process model : simple_source 分 析》 http://hi./ebinghaus/blog/item/ 该模块有 4个 local statistic , 注意有 5个 model attribute , 分别是 Packet Interarrival Time , Packet Size , Packet Format , Start Time , Stop Time ,这些是在使用该模块时需要配置的, 当然也可以使用默认配置。状态机也很简单: 在 header block 中定义了/* Include files. */ #include <> // 注意该模块使用了外部文件《 oms_dist_support 》和《 oms_string_support 》/* Special attribute values. */ #define SSC_INFINITE_TIME - // 定义无穷大时间为-1 /* Interrupt code values. */ // 注意这里的中断代码是自定义的, 为了在产生自中断是使用#define SSC_START 0 #define SSC_GENERATE 1 #define SSC_STOP 2 /* Node configuration constants. */ #define SSC_STRM_TO_LOW 0 // 发送的 stream index ,默认的,该模块只有一个 stream 连接,所以不需要动态获取 stream index /* Macro definitions for state transitions.*/ // 转换条件为中断代码是自定义的常量: #define START (intrpt_code == SSC_START) #define DISABLED (intrpt_code == SSC_STOP) #define STOP (intrpt_code == SSC_STOP) #define PACKET_GENERATE (intrpt_code == SSC_GENERATE) /* Function prototypes. */ static void ss_packet_generate (void); // 产生包的函数,在 function block 中定义一, INIT 的入口代码: /* At this initial state, we read the values of source attributes */ /* and schedule a selt interrupt that will indicate our start time */ /* for packet generation. */ /* Obtain the object id of the surrounding module. */ own_id = op_id_self (); // 首先得到 su

学习笔记 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数9
  • 收藏数0 收藏
  • 顶次数0
  • 上传人xxj16588
  • 文件大小66 KB
  • 时间2016-09-04