xc
Public Member Functions | List of all members
XC::MPI_Channel Class Reference

MPI_Channel is a sub-class of channel. More...

#include <MPI_Channel.h>

Inheritance diagram for XC::MPI_Channel:
XC::Channel

Public Member Functions

 MPI_Channel (int otherProcess)
 
char * addToProgram (void)
 When creating remote actors the channels created in the actor space need to know how to contact the shadows channels. More...
 
virtual int setUpConnection (void)
 
int setNextAddress (const ChannelAddress &otherChannelAddress)
 A method invoked to set specify the next address that the next messages to be sent if {sendMessage()} or received if {recvMessage()} is invoked with a null pointer. More...
 
virtual ChannelAddressgetLastSendersAddress (void)
 
int sendObj (int commitTag, MovableObject &theObject, ChannelAddress *theAddress=0)
 To send the object theObj and the commit tag commitTag to a remote Channel whose address is given by theAddress. More...
 
int recvObj (int commitTag, MovableObject &theObject, FEM_ObjectBroker &theBroker, ChannelAddress *theAddress=0)
 To receive the object theObj with the commit tag commitTag from a remote Channel whose address is given by theAddress. More...
 
int recvMsg (int dbTag, int commitTag, Message &, ChannelAddress *theAddress=0)
 Invoked to send the data in the Message object theMsg to another Channel object. More...
 
int sendMsg (int dbTag, int commitTag, const Message &, ChannelAddress *theAddress=0)
 A method invoked to send the data in the Message object theMsg to another Channel object. More...
 
int sendMatrix (int dbTag, int commitTag, const Matrix &, ChannelAddress *theAddress=0)
 Method to send a XC::Matrix to an address given by other_Addr.
 
int recvMatrix (int dbTag, int commitTag, Matrix &, ChannelAddress *theAddress=0)
 Invoked to receive the data in the Matrix object theMatrix to another Channel object. More...
 
int sendVector (int dbTag, int commitTag, const Vector &, ChannelAddress *theAddress=0)
 Method to send a Vector to an address given by other_Addr.
 
int recvVector (int dbTag, int commitTag, Vector &, ChannelAddress *theAddress=0)
 Invoked to receive the data in the Vector object theVector to another Channel object. More...
 
int sendID (int dbTag, int commitTag, const ID &, ChannelAddress *theAddress=0)
 Invoked to receive the data in the ID object theID to another Channel object. More...
 
int recvID (int dbTag, int commitTag, ID &, ChannelAddress *theAddress=0)
 Invoked to receive the data in the ID object theID to another Channel object. More...
 
- Public Member Functions inherited from XC::Channel
 Channel (CommandEntity *owr=nullptr)
 Constructor.
 
virtual bool isDatastore (void) const
 Return true if channel is a data store.
 
virtual int getDbTag (void) const
 Return next available database tag. More...
 
bool checkDbTag (const int &dbTag)
 Check if a dbTag is already used.
 
const IDgetUsedTags (void) const
 Return the list of dbTags already used.
 
void clearDbTags (void)
 Reset used database tags set.
 
int getTag (void) const
 Return the object tag.
 
template<class inputIterator >
int sendObjs (int commitTag, const inputIterator &first, const inputIterator &last, ChannelAddress *theAddress=nullptr)
 Send the objects on interval [first,last).
 
template<class inputIterator >
int recvObjs (int commitTag, const inputIterator &first, const inputIterator &last, FEM_ObjectBroker &, ChannelAddress *theAddress=nullptr)
 Receive an object sequence.
 

Additional Inherited Members

- Protected Member Functions inherited from XC::Channel
int sendMovable (int commitTag, MovableObject &)
 Send theObject.
 
int receiveMovable (int commitTag, MovableObject &, FEM_ObjectBroker &)
 Receive theObject.
 

Detailed Description

MPI_Channel is a sub-class of channel.

It is implemented with Berkeley stream sockets using the TCP protocol. Messages delivery is garaunteed. Communication is full-duplex between a pair of connected sockets.

Member Function Documentation

§ addToProgram()

char * XC::MPI_Channel::addToProgram ( void  )
virtual

When creating remote actors the channels created in the actor space need to know how to contact the shadows channels.

This information is provided in the string returned from this method. It is used by the machine broker when starting the remote process. It places this information as the last arguments to the program.

Implements XC::Channel.

§ recvID()

int XC::MPI_Channel::recvID ( int  dbTag,
int  commitTag,
ID theID,
ChannelAddress theAddress = 0 
)
virtual

Invoked to receive the data in the ID object theID to another Channel object.

The object will obtain the data and size of the data to be sent by invoking getData() and getSize() on theID. The channel object is then responsible for sending that data to the remote channel address given by theAddress. If theAddress is 0, the Channel sends to the Channel with the address last set in a send..()}, recv..(), or setNextAddress() operation. To return 0 if successful, a negative number if not.

Implements XC::Channel.

§ recvMatrix()

int XC::MPI_Channel::recvMatrix ( int  dbTag,
int  commitTag,
Matrix theMatrix,
ChannelAddress theAddress = 0 
)
virtual

Invoked to receive the data in the Matrix object theMatrix to another Channel object.

The object will obtain the data and size of the data to be sent by invoking getData() and getSize() on theMatrix. The channel object is then responsible for sending that data to the remote channel address given by theAddress. If theAddress is 0, the Channel sends to the Channel with the address last set in a send..()}, recv..(), or setNextAddress() operation. To return 0 if successful, a negative number if not.

Implements XC::Channel.

§ recvMsg()

int XC::MPI_Channel::recvMsg ( int  dbTag,
int  commitTag,
Message theMsg,
ChannelAddress theAddress = 0 
)
virtual

Invoked to send the data in the Message object theMsg to another Channel object.

The object will obtain the the size of the data that is being received by invoking getSize() on theMsg. The channel object is then responsible for receiving that amount of data from the channel whose address is given by theAddress. If theAddress is 0, the Channel receives from the Channel with the address last set in a send..(), recv..(), or setNextAddress() operation. To return 0 if successful, a negative number if not.

Implements XC::Channel.

§ recvObj()

int XC::MPI_Channel::recvObj ( int  commitTag,
MovableObject theObj,
FEM_ObjectBroker theBroker,
ChannelAddress theAddress = 0 
)
virtual

To receive the object theObj with the commit tag commitTag from a remote Channel whose address is given by theAddress.

If theAddress is 0, the Channel receives from the Channel with the address last set in a send..(), recv..()}, or setNextAddress() operation. To return 0 if successful, a negative number if not.

Implements XC::Channel.

§ recvVector()

int XC::MPI_Channel::recvVector ( int  dbTag,
int  commitTag,
Vector theVector,
ChannelAddress theAddress = 0 
)
virtual

Invoked to receive the data in the Vector object theVector to another Channel object.

The object will obtain the data and size of the data to be sent by invoking getData() and getSize() on theVector. The channel object is then responsible for sending that data to the remote channel address given by theAddress. If theAddress is 0, the Channel sends to the Channel with the address last set in a send..()}, recv..(), or setNextAddress() operation. To return 0 if successful, a negative number if not.

Implements XC::Channel.

§ sendID()

int XC::MPI_Channel::sendID ( int  dbTag,
int  commitTag,
const ID theID,
ChannelAddress theAddress = 0 
)
virtual

Invoked to receive the data in the ID object theID to another Channel object.

The object will obtain the data and size of the data to be sent by invoking getData() and getSize() on theID. The channel object is then responsible for sending that data to the remote channel address given by theAddress. If theAddress is 0, the Channel sends to the Channel with the address last set in a send..()}, recv..(), or setNextAddress() operation. To return 0 if successful, a negative number if not.

Implements XC::Channel.

§ sendMsg()

int XC::MPI_Channel::sendMsg ( int  dbTag,
int  commitTag,
const Message theMsg,
ChannelAddress theAddress = 0 
)
virtual

A method invoked to send the data in the Message object theMsg to another Channel object.

The object will obtain the data and size of the data to be sent by invoking getData() and getSize() on theMsg. The channel object is then responsible for sending that data to the remote channel address given by theAddress. If theAddress is 0, the Channel sends to the Channel with the address last set in a send..()}, recv..(), or setNextAddress() operation. To return 0 if successful, a negative number if not.

Implements XC::Channel.

§ sendObj()

int XC::MPI_Channel::sendObj ( int  commitTag,
MovableObject theObj,
ChannelAddress theAddress = 0 
)
virtual

To send the object theObj and the commit tag commitTag to a remote Channel whose address is given by theAddress.

If theAddress is 0, the Channel sends to the Channel with the address last set in a send..(), recv..(), or {setNextAddress() operation. To return 0 if successful, a negative number if not.

Implements XC::Channel.

§ setNextAddress()

int XC::MPI_Channel::setNextAddress ( const ChannelAddress theAddress)
virtual

A method invoked to set specify the next address that the next messages to be sent if {sendMessage()} or received if {recvMessage()} is invoked with a null pointer.

Implements XC::Channel.


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