# cispeventlogger.h

    00001 //=========================================================================
    00002 //  CISPEVENTLOGGER.H - part of
    00003 //
    00004 //                  OMNeT++/OMNEST
    00005 //           Discrete System Simulation in C++
    00006 //
    00007 //   Written by:  Andras Varga, 2003
    00008 //
    00009 //=========================================================================
    00010
    00011 /*--------------------------------------------------------------*
    00012   Copyright (C) 2003-2005 Andras Varga
    00013   Monash University, Dept. of Electrical and Computer Systems Eng.
    00014   Melbourne, Australia
    00015
    00016   This file is distributed WITHOUT ANY WARRANTY. See the file
    00017   `license' for details on this and other legal matters.
    00018 *--------------------------------------------------------------*/
    00019
    00020 #ifndef __CISPEVENTLOGGER_H__
    00021 #define __CISPEVENTLOGGER_H__
    00022
    00023 #include "cnullmessageprot.h"
    00024
    00025
    00036 class cISPEventLogger : public cNullMessageProtocol
    00037 {
    00038   protected:
    00039     FILE *fout;  // the event log file (stores ExternalEvent's)
    00040
    00041   protected:
    00042     // Overridden to set message priority to sourceProcId. We do the same in
    00043     // cIdealSimulationProtocol. This ensures that messages with equal
    00044     // timestamps will get processed in the same order in both protocols,
    00045     // whatever the concrete timing conditions.
    00046     void processReceivedMessage(cMessage *msg, int destModuleId, int destGateId, int sourceProcId);
    00047
    00048   public:
    00052     cISPEventLogger();
    00053
    00057     virtual ~cISPEventLogger();
    00058
    00063     virtual void startRun();
    00064
    00069     virtual void endRun();
    00070
    00075     void processOutgoingMessage(cMessage *msg, int procId, int moduleId, int gateId, void *data);
    00076
    00081     virtual cMessage *getNextEvent();
    00082 };
    00083
    00084 #endif
    00085