Implementation of the communications layer which works via files. More...
#include <cfilecomm.h>
Public Member Functions | |
cFileCommunications () | |
virtual | ~cFileCommunications () |
Redefined methods from cParsimCommunications | |
virtual void | init () |
virtual void | shutdown () |
virtual int | getNumPartitions () const |
virtual int | getProcId () const |
virtual cCommBuffer * | createCommBuffer () |
virtual void | recycleCommBuffer (cCommBuffer *buffer) |
virtual void | send (cCommBuffer *buffer, int tag, int destination) |
virtual bool | receiveBlocking (int filtTag, cCommBuffer *buffer, int &receivedTag, int &sourceProcId) |
virtual bool | receiveNonblocking (int filtTag, cCommBuffer *buffer, int &receivedTag, int &sourceProcId) |
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.
virtual bool cFileCommunications::receiveBlocking | ( | int | filtTag, | |
cCommBuffer * | buffer, | |||
int & | receivedTag, | |||
int & | sourceProcId | |||
) | [virtual] |
Receives packed data with given tag from given destination.
Normally returns true; false is returned if blocking was interrupted by the user.
Implements cParsimCommunications.
virtual bool cFileCommunications::receiveNonblocking | ( | int | filtTag, | |
cCommBuffer * | buffer, | |||
int & | receivedTag, | |||
int & | sourceProcId | |||
) | [virtual] |
Receives packed data with given tag from given destination.
Call is non-blocking -- it returns true if something has been received, false otherwise.
Implements cParsimCommunications.