OMK::PvmUnicastMessage Class Reference

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

#include <OMKPvmUnicastMessage.h>

Inheritance diagram for OMK::PvmUnicastMessage:

Inheritance graph
[legend]
Collaboration diagram for OMK::PvmUnicastMessage:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~PvmUnicastMessage ()
 destructor
 PvmUnicastMessage (int distantSiteId)
 constructor specifying the distant site ID to which message is sent
virtual void send (PvmMessage::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 13 of file OMKPvmUnicastMessage.h.


Constructor & Destructor Documentation

PvmUnicastMessage::~PvmUnicastMessage (  )  [virtual]

destructor

Definition at line 15 of file OMKPvmUnicastMessage.cxx.

00016 {
00017 }

PvmUnicastMessage::PvmUnicastMessage ( int  distantSiteId  ) 

constructor specifying the distant site ID to which message is sent

Definition at line 10 of file OMKPvmUnicastMessage.cxx.

00010                                                        :
00011   _distantSiteId ( distantSiteId )
00012 {
00013 }


Member Function Documentation

void PvmUnicastMessage::send ( PvmMessage::MessageTag  tag  )  [virtual]

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

Implements OMK::PvmOutgoingMessage.

Definition at line 24 of file OMKPvmUnicastMessage.cxx.

References OMK::PvmMessage::_currentBuffer, _distantSiteId, OMK::PvmOutgoingMessage::_timeStamped, OMK::PvmOutgoingMessage::checkForChangedBuffer(), OMK::PvmOutgoingMessage::checkForSendErrors(), and OMK::PvmOutgoingMessage::reinitAndRevertPvmContext().

Referenced by OMK::Svm::addNewSiteRequest(), OMK::Svm::addNewSiteToSimulation(), OMK::Svm::disconnectFromDistributedSimulation(), OMK::PvmMirrorObjectHandle::registerToReferenceObject(), OMK::PvmController::sendInitialValuesToMirror(), and OMK::PvmSvmLink::sendOutgoingBuffer().

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

void PvmUnicastMessage::setDistantSiteId ( int  distantSiteId  )  [virtual]

change the distant site id

Definition at line 19 of file OMKPvmUnicastMessage.cxx.

References _distantSiteId.

Referenced by OMK::PvmSvmLink::unpack().

00020 {
00021   _distantSiteId = distantSiteId ;
00022 }


Member Data Documentation

int OMK::PvmUnicastMessage::_distantSiteId [protected]

Definition at line 28 of file OMKPvmUnicastMessage.h.

Referenced by send(), and setDistantSiteId().


logo OpenMask

Documentation generated on Mon Jun 9 11:46:03 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007