Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PsnPvmUnicastMessage Class Reference

refine the Pvm outgoing message with a send to only one destination site. More...

#include <PsnPvmUnicastMessage.h>

Inheritance diagram for PsnPvmUnicastMessage:

Inheritance graph
[legend]
Collaboration diagram for PsnPvmUnicastMessage:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual ~PsnPvmUnicastMessage ()
 destructor

 PsnPvmUnicastMessage (int distantSiteId)
 constructor specifying the distant site ID to which message is sent

virtual void send (PsnPvmMessage::MessageTag tag)
 send all previously packed data to destination and reinitiliases the send buffer

virtual void setDistantSiteId (int distantSiteId)
 change the distant site id


Protected Attributes

int _distantSiteId

Detailed Description

refine the Pvm outgoing message with a send to only one destination site.

Author:
David Margery
Version:
1.0

Definition at line 10 of file PsnPvmUnicastMessage.h.


Constructor & Destructor Documentation

PsnPvmUnicastMessage::~PsnPvmUnicastMessage   [virtual]
 

destructor

Definition at line 13 of file PsnPvmUnicastMessage.cxx.

00014 {
00015   
00016 }

PsnPvmUnicastMessage::PsnPvmUnicastMessage int    distantSiteId
 

constructor specifying the distant site ID to which message is sent

Definition at line 6 of file PsnPvmUnicastMessage.cxx.

00006                                                              :
00007   _distantSiteId ( distantSiteId )
00008 {
00009  
00010 }


Member Function Documentation

void PsnPvmUnicastMessage::send PsnPvmMessage::MessageTag    tag [virtual]
 

send all previously packed data to destination and reinitiliases the send buffer

Implements PsnPvmOutgoingMessage.

Definition at line 25 of file PsnPvmUnicastMessage.cxx.

References PsnPvmMessage::_currentBuffer, _distantSiteId, PsnPvmOutgoingMessage::_timeStamped, PsnPvmOutgoingMessage::checkForChangedBuffer(), PsnPvmOutgoingMessage::checkForSendErrors(), PsnPvmMessage::MessageTag, and PsnPvmOutgoingMessage::reinitAndRevertPvmContext().

Referenced by PsnSvm::disconnectFromDistributedSimulation(), PsnMirrorObjectHandle::registerToReferenceObject(), and PsnPvmSvmLink::sendOutgoingBuffer().

00026 {
00027   assert ( _timeStamped ) ;
00028 
00029   assert ( _currentBuffer != 0 ) ;
00030 
00031   assert ( _distantSiteId != 0 ) ;
00032 
00033 #ifdef _DEBUGPVMMESS
00034   cerr<<"PsnPvmUnicastMessage:"<<this<<":send ("<<tag<<") to "<< _distantSiteId << " buffer "<<_currentBuffer<<endl;
00035 #endif
00036 
00037   int oldbuf = pvm_setsbuf ( _currentBuffer ) ;
00038 
00039   checkForChangedBuffer ( oldbuf, __LINE__, __FILE__ ) ;
00040 
00041   int info = pvm_send ( _distantSiteId, tag ) ;
00042 
00043   checkForSendErrors ( info ) ;
00044 
00045   reinitAndRevertPvmContext ( oldbuf ) ;
00046 }

void PsnPvmUnicastMessage::setDistantSiteId int    distantSiteId [virtual]
 

change the distant site id

Definition at line 19 of file PsnPvmUnicastMessage.cxx.

References _distantSiteId.

Referenced by PsnPvmSvmLink::unpack().

00020 {
00021   _distantSiteId = distantSiteId ;
00022 }


Member Data Documentation

int PsnPvmUnicastMessage::_distantSiteId [protected]
 

Definition at line 25 of file PsnPvmUnicastMessage.h.

Referenced by send(), and setDistantSiteId().


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

Documentation generated on Mon Nov 25 15:26:23 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001