OMNeT++ Parallel Simulation Support 6.1
Discrete Event Simulation Library
cFileCommunications Class Reference

Description

Implementation of the communications layer which works via files. Every message is created as a file in a communications directory.

It is VERY slow, and only useful for understanding, debugging or demonstrating parallel simulation.

Inherits cParsimCommunications.

Public Member Functions

 cFileCommunications ()
 
virtual ~cFileCommunications ()
 
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 cCommBuffer * createCommBuffer () 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

◆ cFileCommunications()

Constructor.

◆ ~cFileCommunications()

virtual ~cFileCommunications ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ init()

virtual void init ( int  numPartitions)
overridevirtual

Init the library.

◆ shutdown()

virtual void shutdown ( )
overridevirtual

Shutdown the communications library.

◆ getNumPartitions()

virtual int getNumPartitions ( ) const
overridevirtual

Returns total number of partitions.

◆ getProcId()

virtual int getProcId ( ) const
overridevirtual

Returns the id of this partition.

◆ createCommBuffer()

virtual cCommBuffer* createCommBuffer ( )
overridevirtual

Creates an empty buffer of type cFileCommBuffer.

◆ recycleCommBuffer()

virtual void recycleCommBuffer ( cCommBuffer *  buffer)
overridevirtual

Recycle communication buffer after use.

◆ send()

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

Sends packed data with given tag to destination.

◆ receiveBlocking()

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

Receives packed data with given tag from given destination. Normally returns true; false is returned if blocking was interrupted by the user.

◆ receiveNonblocking()

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

Receives packed data with given tag from given destination. Call is non-blocking – it returns true if something has been received, false otherwise.


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