cispeventlogger.h Source File

Parallel Simulation API: cispeventlogger.h Source File
Parallel Simulation API
cispeventlogger.h
1//=========================================================================
2// CISPEVENTLOGGER.H - part of
3//
4// OMNeT++/OMNEST
5// Discrete System Simulation in C++
6//
7//=========================================================================
8
9/*--------------------------------------------------------------*
10 Copyright (C) 1992-2017 Andras Varga
11 Copyright (C) 2006-2017 OpenSim Ltd.
12
13 This file is distributed WITHOUT ANY WARRANTY. See the file
14 `license' for details on this and other legal matters.
15*--------------------------------------------------------------*/
16
17#ifndef __OMNETPP_CISPEVENTLOGGER_H
18#define __OMNETPP_CISPEVENTLOGGER_H
19
20#include "cnullmessageprot.h"
21
22namespace omnetpp {
23
24
36{
37 protected:
38 FILE *fout = nullptr; // the event log file (stores ExternalEvent's)
39
40 protected:
41 // Overridden to set message priority to sourceProcId. We do the same in
42 // cIdealSimulationProtocol. This ensures that messages with equal
43 // timestamps will get processed in the same order in both protocols,
44 // whatever the concrete timing conditions.
45 void processReceivedMessage(cMessage *msg, const SendOptions& options, int destModuleId, int destGateId, int sourceProcId) override;
46
47 public:
52
56 virtual ~cISPEventLogger() {}
57
62 virtual void startRun() override;
63
68 virtual void endRun() override;
69
74 void processOutgoingMessage(cMessage *msg, const SendOptions& options, int procId, int moduleId, int gateId, void *data) override;
75
80 virtual cEvent *takeNextEvent() override;
81
85 virtual void putBackEvent(cEvent *event) override;
86};
87
88} // namespace omnetpp
89
90
91#endif
92
virtual void endRun() override
virtual cEvent * takeNextEvent() override
virtual void putBackEvent(cEvent *event) override
virtual void startRun() override
void processOutgoingMessage(cMessage *msg, const SendOptions &options, int procId, int moduleId, int gateId, void *data) override
cISPEventLogger()
Definition cispeventlogger.h:51
virtual ~cISPEventLogger()
Definition cispeventlogger.h:56