OMNeT++ Parallel Simulation Support  5.4.1
cparsimprotocolbase.h
1 //=========================================================================
2 // CPARSIMPROTOCOLBASE.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_CPARSIMPROTOCOLBASE_H
22 #define __OMNETPP_CPARSIMPROTOCOLBASE_H
23 
24 #include "cparsimsynchr.h"
25 
26 namespace omnetpp {
27 
28 class cCommBuffer;
29 
37 {
38  protected:
39  // process whatever comes from other partitions -- nonblocking
40  virtual void receiveNonblocking();
41 
42  // process whatever comes from other partitions -- blocking
43  // (normally returns true; false is returned if blocking was interrupted by the user)
44  virtual bool receiveBlocking();
45 
46  // process buffers coming from other partitions
47  virtual void processReceivedBuffer(cCommBuffer *buffer, int tag, int sourceProcId);
48 
49  // process cMessages received from other partitions
50  virtual void processReceivedMessage(cMessage *msg, int destModuleId, int destGateId, int sourceProcId);
51 
52  public:
57 
61  virtual ~cParsimProtocolBase();
62 
66  virtual void processOutgoingMessage(cMessage *msg, int procId, int moduleId, int gateId, void *data) override;
67 };
68 
69 } // namespace omnetpp
70 
71 
72 #endif
73 
Definition: cadvlinkdelaylookahead.h:26
Abstract base class for parallel simulation algorithms. Subclasses implement the "null message algori...
Definition: cparsimsynchr.h:54
Contains utility functions for implementing parallel simulation protocols.
Definition: cparsimprotocolbase.h:36