17 #ifndef __OMNETPP_CNAMEDPIPECOMM_H
18 #define __OMNETPP_CNAMEDPIPECOMM_H
23 #include "omnetpp/simutil.h"
24 #include "omnetpp/opp_string.h"
25 #include "omnetpp/cparsimcomm.h"
26 #include "omnetpp/platdep/platmisc.h"
30 #define USE_WINDOWS_PIPES
35 #ifdef USE_WINDOWS_PIPES
58 PIPE *rpipes =
nullptr;
59 PIPE *wpipes =
nullptr;
64 struct ReceivedBuffer {
int receivedTag;
int sourceProcId;
cMemCommBuffer *buffer;};
65 std::list<ReceivedBuffer> receivedBuffers;
69 bool receive(
int filtTag, cCommBuffer *buffer,
int& receivedTag,
int& sourceProcId,
bool blocking);
70 bool doReceive(cCommBuffer *buffer,
int& receivedTag,
int& sourceProcId,
bool blocking);
88 virtual void init(
int numPartitions)
override;
93 virtual void shutdown()
override;
98 virtual int getNumPartitions()
const override;
103 virtual int getProcId()
const override;
108 virtual cCommBuffer *createCommBuffer()
override;
113 virtual void recycleCommBuffer(cCommBuffer *buffer)
override;
118 virtual void send(cCommBuffer *buffer,
int tag,
int destination)
override;
124 virtual bool receiveBlocking(
int filtTag, cCommBuffer *buffer,
int& receivedTag,
int& sourceProcId)
override;
131 virtual bool receiveNonblocking(
int filtTag, cCommBuffer *buffer,
int& receivedTag,
int& sourceProcId)
override;