OMNeT++ Parallel Simulation Support  5.4.1
cproxygate.h
1 //=========================================================================
2 // CPROXYGATE.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_CPROXYGATE_H
22 #define __OMNETPP_CPROXYGATE_H
23 
24 #include "omnetpp/cgate.h"
25 
26 namespace omnetpp {
27 
28 class cParsimPartition;
29 
51 class SIM_API cProxyGate : public cGate // noncopyable
52 {
53  friend class cPlaceholderModule;
54  private:
55  cParsimPartition *partition;
56  short remoteProcId;
57  int remoteModuleId;
58  int remoteGateId;
59  void *data;
60 
61  protected:
62  // internal: constructor is protected because only cPlaceholderModule
63  // is allowed to create instances
64  explicit cProxyGate();
65 
66  public:
72  virtual std::string str() const override;
74 
84  virtual bool deliver(cMessage *msg, simtime_t at) override;
86 
89 
93  void setRemoteGate(short procId, int moduleId, int gateId);
94 
98  short getRemoteProcId() {return remoteProcId;}
99 
103  int getRemoteModuleId() {return remoteModuleId;}
104 
108  int getRemoteGateId() {return remoteGateId;}
110 
116  void setPartition(cParsimPartition *seg) {partition=seg;}
120  cParsimPartition *getPartition() {return partition;}
122 
130  void setSynchData(void *data) {this->data = data;}
134  void *getSynchData() {return data;}
136 };
137 
138 } // namespace omnetpp
139 
140 
141 #endif
142 
short getRemoteProcId()
Definition: cproxygate.h:98
SimTime simtime_t
void * getSynchData()
Definition: cproxygate.h:134
int getRemoteGateId()
Definition: cproxygate.h:108
void setPartition(cParsimPartition *seg)
Definition: cproxygate.h:116
A gate that belongs to a cross-partition link and represents the remote gate on the local partition...
Definition: cproxygate.h:51
void setSynchData(void *data)
Definition: cproxygate.h:130
In distributed parallel simulation, modules of the network are distributed across partitions...
Definition: cplaceholdermod.h:37
cParsimPartition * getPartition()
Definition: cproxygate.h:120
Definition: cadvlinkdelaylookahead.h:26
int getRemoteModuleId()
Definition: cproxygate.h:103
Represents one partition in a parallel simulation. Knows about partitions and the links between this ...
Definition: cparsimpartition.h:62