OMNeT++ Parallel Simulation Support  5.4.1
cispeventlogger.h
1 //=========================================================================
2 // CISPEVENTLOGGER.H - part of
3 //
4 // OMNeT++/OMNEST
5 // Discrete System Simulation in C++
6 //
7 // Author: Andras Varga, 2003
8 // Dept. of Electrical and Computer Systems Engineering,
9 // Monash University, Melbourne, Australia
10 //
11 //=========================================================================
12 
13 /*--------------------------------------------------------------*
14  Copyright (C) 2003-2017 Andras Varga
15  Copyright (C) 2006-2017 OpenSim Ltd.
16 
17  This file is distributed WITHOUT ANY WARRANTY. See the file
18  `license' for details on this and other legal matters.
19 *--------------------------------------------------------------*/
20 
21 #ifndef __OMNETPP_CISPEVENTLOGGER_H
22 #define __OMNETPP_CISPEVENTLOGGER_H
23 
24 #include "cnullmessageprot.h"
25 
26 namespace omnetpp {
27 
28 
39 class SIM_API cISPEventLogger : public cNullMessageProtocol
40 {
41  protected:
42  FILE *fout; // the event log file (stores ExternalEvent's)
43 
44  protected:
45  // Overridden to set message priority to sourceProcId. We do the same in
46  // cIdealSimulationProtocol. This ensures that messages with equal
47  // timestamps will get processed in the same order in both protocols,
48  // whatever the concrete timing conditions.
49  void processReceivedMessage(cMessage *msg, int destModuleId, int destGateId, int sourceProcId) override;
50 
51  public:
56 
60  virtual ~cISPEventLogger();
61 
66  virtual void startRun() override;
67 
72  virtual void endRun() override;
73 
78  void processOutgoingMessage(cMessage *msg, int procId, int moduleId, int gateId, void *data) override;
79 
84  virtual cEvent *takeNextEvent() override;
85 
89  virtual void putBackEvent(cEvent *event) override;
90 };
91 
92 } // namespace omnetpp
93 
94 
95 #endif
96 
Implements phase one for the Ideal Simulation Protocol (ISP), namely, creating the log of "external" ...
Definition: cispeventlogger.h:39
Implements the "null message algorithm". Lookahead calculation is encapsulated into a separate object...
Definition: cnullmessageprot.h:40
Definition: cadvlinkdelaylookahead.h:26