1 / 9
文档名称:

学习笔记.doc

格式:doc   大小:66KB   页数:9页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

学习笔记.doc

上传人:xxj16588 2016/9/4 文件大小:66 KB

下载得到文件列表

学习笔记.doc

文档介绍

文档介绍:学****笔记 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