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

Description

A gate that belongs to a cross-partition link and represents the remote gate on the local partition. cProxyGate's belong to cPlaceholderModule objects, which represent a "remote" module in the local partition.

This class basically exists so that we can override the deliver() method of cGate so that it doesn't pass arriving messages to the module object but to parallel simulation layer (cParsimPartition) instead – so cParsimPartition can deliver them to the remote partition.

cProxyGate contains the address of the corresponding remote gate as a (procId, moduleId, gateId) triplet:

  • procId is a partition identifier (also used by cParsimCommunications; in the MPI implementation of cParsimCommunications it maps to MPI_rank)
  • moduleId and gateId identify the target ("to-") gate on the remote partition.

Inherits cGate.

Public Member Functions

Redefined cObject member functions
virtual std::string str () const override
 
Redefined cGate member functions
virtual bool deliver (cMessage *msg, const SendOptions &options, simtime_t at) override
 
Address of remote gate
void setRemoteGate (short procId, int moduleId, int gateId)
 
short getRemoteProcId ()
 
int getRemoteModuleId ()
 
int getRemoteGateId ()
 
cParsimPartition pointer
void setPartition (cParsimPartition *seg)
 
cParsimPartitiongetPartition ()
 
Generic associated data pointer
void setSynchData (void *data)
 
void * getSynchData ()
 

Member Function Documentation

◆ str()

virtual std::string str ( ) const
overridevirtual

Redefined here to display remoteProcId, remoteModId and remoteGateId.

◆ deliver()

virtual bool deliver ( cMessage *  msg,
const SendOptions &  options,
simtime_t  at 
)
overridevirtual

Redefined to pass message to the parallel simulation layer, cParsimPartition.

Invokes the cParsimPartition::processOutgoingMessage() method to transmit the message, then deletes the message object.

◆ setRemoteGate()

void setRemoteGate ( short  procId,
int  moduleId,
int  gateId 
)

Sets remote gate address.

◆ getRemoteProcId()

short getRemoteProcId ( )
inline

Returns partition where remote gate resides.

◆ getRemoteModuleId()

int getRemoteModuleId ( )
inline

Returns module Id in remote partition where remote gate resides.

◆ getRemoteGateId()

int getRemoteGateId ( )
inline

Returns Id of remote gate in remote partition and remote module.

◆ setPartition()

void setPartition ( cParsimPartition seg)
inline

Sets cParsimPartition object.

◆ getPartition()

cParsimPartition* getPartition ( )
inline

Returns pointer to cParsimPartition object.

◆ setSynchData()

void setSynchData ( void *  data)
inline

Sets the data pointer in this object. This pointer is used by the parallel simulation synchronizaton layer (cParsimSynchronizer) to store additional information about the gate.

◆ getSynchData()

void* getSynchData ( )
inline

Returns the data pointer in this object.


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