OMNeT++ Parallel Simulation Support  5.4.1
clinkdelaylookahead.h
1 //=========================================================================
2 // CLINKDELAYLOOKAHEAD.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_CLINKDELAYLOOKAHEAD_H
22 #define __OMNETPP_CLINKDELAYLOOKAHEAD_H
23 
24 #include "cnmplookahead.h"
25 
26 namespace omnetpp {
27 
28 class cGate;
29 
35 class SIM_API cLinkDelayLookahead : public cNMPLookahead
36 {
37  protected:
38  struct PartitionInfo
39  {
40  simtime_t minDelay; // minimum of all link delays to given partition
41  };
42 
43  // partition information
44  int numSeg; // number of partitions
45  PartitionInfo *segInfo; // partition info array, size numSeg
46 
47  // calculate the total delay along the path ending the given gate
48  simtime_t collectPathDelay(cGate *pathEndGate);
49 
50  public:
55 
59  virtual ~cLinkDelayLookahead();
60 
64  virtual void startRun() override;
65 
69  virtual void endRun() override;
70 
75  virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data) override;
76 
80  virtual simtime_t getCurrentLookahead(int procId) override;
81 };
82 
83 } // namespace omnetpp
84 
85 
86 #endif
87 
88 
SimTime simtime_t
Lookahead calculation based on inter-partition link delays only.
Definition: clinkdelaylookahead.h:35
Definition: cadvlinkdelaylookahead.h:26
Base class of lookahead calculations for cNullMessageProtocol which implements the "null message algo...
Definition: cnmplookahead.h:41