#include <cnamedpipecomm.h>
Inheritance diagram for cNamedPipeCommunications:
Public Member Functions | |
cNamedPipeCommunications () | |
virtual | ~cNamedPipeCommunications () |
Redefined methods from cParsimCommunications | |
virtual void | init () |
virtual void | shutdown () |
virtual int | getNumPartitions () |
virtual int | getProcId () |
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) |
Pipes are created at initialization time, and are used throughout the whole simulation.
|
Constructor.
|
|
Destructor.
|
|
Creates an empty buffer of type cMemCommBuffer.
Implements cParsimCommunications. |
|
Returns total number of partitions.
Implements cParsimCommunications. |
|
Returns the id of this partition.
Implements cParsimCommunications. |
|
Init the library. Here we create and open the named pipes. Implements cParsimCommunications. |
|
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. |
|
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. |
|
Recycle communication buffer after use.
Implements cParsimCommunications. |
|
Sends packed data with given tag to destination.
Implements cParsimCommunications. |
|
Shutdown the communications library. Closes and removes the named pipes. Implements cParsimCommunications. |