6fifo

所属分类:单片机开发
开发工具:Visual C++
文件大小:475KB
下载次数:4
上传日期:2010-01-08 21:19:04
上 传 者shasara
说明:  入门omnet++,omnet++仿真实验,欢迎大家一起交流。
(It is very useful for student who study omnet++.)

文件列表:
fifo\.tkenvrc (1408, 2006-10-21)
fifo\fifo.cpp (2112, 2006-10-21)
fifo\fifo.dsp (7901, 2009-07-26)
fifo\fifo.dsp.in (7783, 2006-10-21)
fifo\fifo.dsw (533, 2006-10-21)
fifo\fifo.exe (1613824, 2006-10-21)
fifo\fifo.h (1345, 2006-10-21)
fifo\fifo.ned (646, 2006-10-21)
fifo\fifonet.ned (757, 2006-10-21)
fifo\gen.cpp (1179, 2006-10-21)
fifo\gen.ned (548, 2006-10-21)
fifo\Makefile.vc (3488, 2006-10-21)
fifo\omnetpp.ini (587, 2006-10-21)
fifo\sink.cpp (1235, 2006-10-21)
fifo\sink.ned (358, 2006-10-21)
fifo (0, 2009-07-26)

Fifo ==== Single-server queue model. Demonstrates: - subclassing simple modules - using handleMessage() - decomposing handleMessage() into several functions - using simple statistics and output vectors - using finish() The model contains three modules. The "gen" module generates jobs, and sends them to the "fifo" module which is a single-server queue. Jobs are stored in a queue (cQueue object) until they are served -- this queue can be found and inspected in the graphical environment among the class members of the "fifo" module -- either in the object tree in the main window, or in the inspector of the "fifo" module (right-click "fifo" icon --> Inspect as object --> click "Contents" tab). Processed jobs are disposed of in the "sink" module. The "sink" module collects statistics which can also be inspected. After running the simulation, fifo*.vec file will contain queueing time data collected via cOutVector objects during the simulation. The data can be plotted using the Plove program. AbstractFifo can be used as a base class for modules that involve queueing. One can subclass AbstractFifo and redefine the following member functions: void arrival(cMessage *msg) simtime_t startService(cMessage *msg) void endService(cMessage *msg) These functions are called by AbstractFifo::handleMessage() whenever a message arrives, begins service and ends service, respectively. startService() should return the service time for the message. ACBFifo and ACPFifo demostrates how to do this.

近期下载者

相关文件


收藏者