OMNeT++ Parallel Simulation Support  6.0.3
cNamedPipeCommunications Class Reference

#include <cnamedpipecomm.h>

Description

Implementation of the communications layer which uses named pipes. Pipes are created at initialization time, and are used throughout the whole simulation.

Inheritance diagram for cNamedPipeCommunications:
cParsimCommunications cObject

Public Member Functions

 cNamedPipeCommunications ()
 
virtual ~cNamedPipeCommunications ()
 
Redefined methods from cParsimCommunications
virtual void init (int numPartitions) override
 
virtual void shutdown () override
 
virtual int getNumPartitions () const override
 
virtual int getProcId () const override
 
virtual cCommBuffercreateCommBuffer () override
 
virtual void recycleCommBuffer (cCommBuffer *buffer) override
 
virtual void send (cCommBuffer *buffer, int tag, int destination) override
 
virtual bool receiveBlocking (int filtTag, cCommBuffer *buffer, int &receivedTag, int &sourceProcId) override
 
virtual bool receiveNonblocking (int filtTag, cCommBuffer *buffer, int &receivedTag, int &sourceProcId) override
 

Constructor & Destructor Documentation

◆ cNamedPipeCommunications()

Constructor.

◆ ~cNamedPipeCommunications()

virtual ~cNamedPipeCommunications ( )
virtual

Destructor.

Member Function Documentation

◆ init()

virtual void init ( int  numPartitions)
overridevirtual

Init the library. Here we create and open the named pipes.

Implements cParsimCommunications.

◆ shutdown()

virtual void shutdown ( )
overridevirtual

Shutdown the communications library. Closes and removes the named pipes.

Implements cParsimCommunications.

◆ getNumPartitions()

virtual int getNumPartitions ( ) const
overridevirtual

Returns total number of partitions.

Implements cParsimCommunications.

◆ getProcId()

virtual int getProcId ( ) const
overridevirtual

Returns the id of this partition.

Implements cParsimCommunications.

◆ createCommBuffer()

virtual cCommBuffer* createCommBuffer ( )
overridevirtual

Creates an empty buffer of type cMemCommBuffer.

Implements cParsimCommunications.

◆ recycleCommBuffer()

virtual void recycleCommBuffer ( cCommBuffer buffer)
overridevirtual

Recycle communication buffer after use.

Implements cParsimCommunications.

◆ send()

virtual void send ( cCommBuffer buffer,
int  tag,
int  destination 
)
overridevirtual

Sends packed data with given tag to destination.

Implements cParsimCommunications.

◆ receiveBlocking()

virtual bool receiveBlocking ( int  filtTag,
cCommBuffer buffer,
int &  receivedTag,
int &  sourceProcId 
)
overridevirtual

Receives packed data, and also returns tag and source procId. Normally returns true; false is returned if blocking was interrupted by the user.

Implements cParsimCommunications.

◆ receiveNonblocking()

virtual bool receiveNonblocking ( int  filtTag,
cCommBuffer buffer,
int &  receivedTag,
int &  sourceProcId 
)
overridevirtual

Receives packed data, and also returns tag and source procId. Call is non-blocking – it returns true if something has been received, false otherwise.

Implements cParsimCommunications.


The documentation for this class was generated from the following file: