fifo.h

来自「ver good program for queing」· C头文件 代码 · 共 44 行

H
44
字号
//
// This file is part of an OMNeT++/OMNEST simulation example.
//
// Contributed by Nick van Foreest
//
// This file is distributed WITHOUT ANY WARRANTY. See the file
// `license' for details on this and other legal matters.
//

#ifndef __FIFO_H
#define __FIFO_H

#include <omnetpp.h>

/**
 * Implements a single-server queue; see NED file for more info.
 */
class Fifo : public cSimpleModule
{
  protected:
    cMessage *msgServiced;
    cMessage *endServiceMsg;
    cQueue queue;

    cDoubleHistogram *jobDist;
    cOutVector jobsInSys;

  public:
    Fifo();
    virtual ~Fifo();

  protected:
    virtual void initialize();
    virtual void handleMessage(cMessage *msg);
    virtual void finish();

    void arrival(cMessage *msg) {}
    simtime_t serviceRequirement(cMessage *msg);
    void endService(cMessage *msg);
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?