cnmplookahead.h Source File

Parallel Simulation API: cnmplookahead.h Source File
Parallel Simulation API
cnmplookahead.h
1//=========================================================================
2// CNMPLOOKAHEAD.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_CNMPLOOKAHEAD_H
18#define __OMNETPP_CNMPLOOKAHEAD_H
19
20#include "omnetpp/cobject.h"
21#include "omnetpp/simtime_t.h"
22
23namespace omnetpp {
24
25class cMessage;
26class cSimulation;
27class cParsimCommunications;
29
30
37class SIM_API cNMPLookahead : public cObject
38{
39 protected:
40 cSimulation *sim;
41 cParsimCommunications *comm; // TBD this is just to access numPartitions -- optimize out?
42 cParsimPartition *partition;
43 // cNullMessageProtocol *nullmsgprot;
44
45 public:
50
54 virtual ~cNMPLookahead() {}
55
59 void setContext(cSimulation *simul, cParsimPartition *seg, cParsimCommunications *co)
60 {sim = simul; partition = seg; comm = co;}
61
65 virtual void startRun() = 0;
66
70 virtual void endRun() = 0;
71
75 virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data) = 0;
76
80 virtual simtime_t getCurrentLookahead(int procId) = 0;
81
82};
83
84} // namespace omnetpp
85
86
87#endif
cNMPLookahead()
Definition cnmplookahead.h:49
virtual ~cNMPLookahead()
Definition cnmplookahead.h:54
void setContext(cSimulation *simul, cParsimPartition *seg, cParsimCommunications *co)
Definition cnmplookahead.h:59
virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data)=0
virtual void startRun()=0
virtual simtime_t getCurrentLookahead(int procId)=0
virtual void endRun()=0
Represents one partition in a parallel simulation. Knows about partitions and the links between this ...
Definition cparsimpartition.h:59