cispeventlogger.h

00001 //=========================================================================
00002 //  CISPEVENTLOGGER.H - part of
00003 //
00004 //                  OMNeT++/OMNEST
00005 //           Discrete System Simulation in C++
00006 //
00007 //  Author: Andras Varga, 2003
00008 //          Dept. of Electrical and Computer Systems Engineering,
00009 //          Monash University, Melbourne, Australia
00010 //
00011 //=========================================================================
00012 
00013 /*--------------------------------------------------------------*
00014   Copyright (C) 2003-2008 Andras Varga
00015   Copyright (C) 2006-2008 OpenSim Ltd.
00016 
00017   This file is distributed WITHOUT ANY WARRANTY. See the file
00018   `license' for details on this and other legal matters.
00019 *--------------------------------------------------------------*/
00020 
00021 #ifndef __CISPEVENTLOGGER_H__
00022 #define __CISPEVENTLOGGER_H__
00023 
00024 #include "cnullmessageprot.h"
00025 
00026 NAMESPACE_BEGIN
00027 
00028 
00039 class SIM_API cISPEventLogger : public cNullMessageProtocol
00040 {
00041   protected:
00042     FILE *fout;  // the event log file (stores ExternalEvent's)
00043 
00044   protected:
00045     // Overridden to set message priority to sourceProcId. We do the same in
00046     // cIdealSimulationProtocol. This ensures that messages with equal
00047     // timestamps will get processed in the same order in both protocols,
00048     // whatever the concrete timing conditions.
00049     void processReceivedMessage(cMessage *msg, int destModuleId, int destGateId, int sourceProcId);
00050 
00051   public:
00055     cISPEventLogger();
00056 
00060     virtual ~cISPEventLogger();
00061 
00066     virtual void startRun();
00067 
00072     virtual void endRun();
00073 
00078     void processOutgoingMessage(cMessage *msg, int procId, int moduleId, int gateId, void *data);
00079 
00084     virtual cMessage *getNextEvent();
00085 };
00086 
00087 NAMESPACE_END
00088 
00089 
00090 #endif
00091 
Generated on Tue Dec 2 11:16:32 2014 for OMNeT++ Parallel Simulation Support by  doxygen 1.6.3