OMNeT++ Parallel Simulation Support  6.0.3
clinkdelaylookahead.h
1 //=========================================================================
2 // CLINKDELAYLOOKAHEAD.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_CLINKDELAYLOOKAHEAD_H
18 #define __OMNETPP_CLINKDELAYLOOKAHEAD_H
19 
20 #include "cnmplookahead.h"
21 
22 namespace omnetpp {
23 
24 class cGate;
25 
31 class SIM_API cLinkDelayLookahead : public cNMPLookahead
32 {
33  protected:
34  struct PartitionInfo
35  {
36  simtime_t minDelay; // minimum of all link delays to given partition
37  };
38 
39  // partition information
40  int numSeg = 0; // number of partitions
41  PartitionInfo *segInfo = nullptr; // partition info array, size numSeg
42 
43  // calculate the total delay along the path ending the given gate
44  simtime_t collectPathDelay(cGate *pathEndGate);
45 
46  public:
51 
55  virtual ~cLinkDelayLookahead();
56 
60  virtual void startRun() override;
61 
65  virtual void endRun() override;
66 
71  virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data) override;
72 
76  virtual simtime_t getCurrentLookahead(int procId) override;
77 };
78 
79 } // namespace omnetpp
80 
81 
82 #endif
83 
84 
omnetpp::cNMPLookahead
Base class of lookahead calculations for cNullMessageProtocol which implements the "null message algo...
Definition: cnmplookahead.h:37
omnetpp::cLinkDelayLookahead
Lookahead calculation based on inter-partition link delays only.
Definition: clinkdelaylookahead.h:31
omnetpp::cGate
simtime_t
SimTime simtime_t
omnetpp::cLinkDelayLookahead::cLinkDelayLookahead
cLinkDelayLookahead()
Definition: clinkdelaylookahead.h:50
omnetpp::cMessage