clinkdelaylookahead.h Source File

Parallel Simulation API: clinkdelaylookahead.h Source File
Parallel Simulation API
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
22namespace omnetpp {
23
24class cGate;
25
31class 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
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
virtual void endRun() override
cLinkDelayLookahead()
Definition clinkdelaylookahead.h:50
virtual simtime_t getCurrentLookahead(cMessage *msg, int procId, void *data) override
virtual void startRun() override
virtual simtime_t getCurrentLookahead(int procId) override
cNMPLookahead()
Definition cnmplookahead.h:49