OMNeT++ Parallel Simulation Support  5.4.1
cfilecomm.h
1 //=========================================================================
2 // CFILECOMM.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_CFILECOMM_H
22 #define __OMNETPP_CFILECOMM_H
23 
24 #include "omnetpp/cparsimcomm.h"
25 #include "omnetpp/simutil.h"
26 
27 namespace omnetpp {
28 
29 
40 {
41  protected:
42  int numPartitions;
43  int myProcId;
44 
45  int seqNum;
46  opp_string commDirPrefix;
47  opp_string readDirPrefix;
48  bool preserveReadFiles;
49 
50  public:
55 
59  virtual ~cFileCommunications();
60 
66  virtual void init() override;
67 
71  virtual void shutdown() override;
72 
76  virtual int getNumPartitions() const override;
77 
81  virtual int getProcId() const override;
82 
86  virtual cCommBuffer *createCommBuffer() override;
87 
91  virtual void recycleCommBuffer(cCommBuffer *buffer) override;
92 
96  virtual void send(cCommBuffer *buffer, int tag, int destination) override;
97 
102  virtual bool receiveBlocking(int filtTag, cCommBuffer *buffer, int& receivedTag, int& sourceProcId) override;
103 
109  virtual bool receiveNonblocking(int filtTag, cCommBuffer *buffer, int& receivedTag, int& sourceProcId) override;
111 };
112 
113 } // namespace omnetpp
114 
115 
116 #endif
117 
118 
Implementation of the communications layer which works via files. Every message is created as a file ...
Definition: cfilecomm.h:39
Definition: cadvlinkdelaylookahead.h:26