OMNeT++ Parallel Simulation Support
6.0.3
cparsimprotocolbase.h
1
//=========================================================================
2
// CPARSIMPROTOCOLBASE.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_CPARSIMPROTOCOLBASE_H
18
#define __OMNETPP_CPARSIMPROTOCOLBASE_H
19
20
#include "cparsimsynchr.h"
21
22
namespace
omnetpp {
23
24
class
cCommBuffer;
25
32
class
SIM_API
cParsimProtocolBase
:
public
cParsimSynchronizer
33
{
34
protected
:
35
// process whatever comes from other partitions -- nonblocking
36
virtual
void
receiveNonblocking();
37
38
// process whatever comes from other partitions -- blocking
39
// (normally returns true; false is returned if blocking was interrupted by the user)
40
virtual
bool
receiveBlocking();
41
42
// process buffers coming from other partitions
43
virtual
void
processReceivedBuffer(
cCommBuffer
*buffer,
int
tag,
int
sourceProcId);
44
45
// process cMessages received from other partitions
46
virtual
void
processReceivedMessage(
cMessage
*msg,
const
SendOptions
& options,
int
destModuleId,
int
destGateId,
int
sourceProcId);
47
48
// utility
49
SendOptions
unpackOptions(
cCommBuffer
*buffer);
50
void
packOptions(
cCommBuffer
*buffer,
const
SendOptions
& options);
51
52
public
:
56
cParsimProtocolBase
() {}
57
61
virtual
~cParsimProtocolBase
() {}
62
66
virtual
void
processOutgoingMessage(
cMessage
*msg,
const
SendOptions
& options,
int
procId,
int
moduleId,
int
gateId,
void
*data)
override
;
67
};
68
69
}
// namespace omnetpp
70
71
72
#endif
73
omnetpp::cParsimProtocolBase::~cParsimProtocolBase
virtual ~cParsimProtocolBase()
Definition:
cparsimprotocolbase.h:61
omnetpp::cParsimProtocolBase::cParsimProtocolBase
cParsimProtocolBase()
Definition:
cparsimprotocolbase.h:56
omnetpp::SendOptions
omnetpp::cParsimSynchronizer
Abstract base class for parallel simulation algorithms. Subclasses implement the "null message algori...
Definition:
cparsimsynchr.h:50
omnetpp::cParsimProtocolBase
Contains utility functions for implementing parallel simulation protocols.
Definition:
cparsimprotocolbase.h:32
omnetpp::cMessage
omnetpp::cCommBuffer
src
sim
parsim
cparsimprotocolbase.h
Generated on Tue Jan 30 2024 20:11:37 for OMNeT++ Parallel Simulation Support by
1.8.17