ACE_RMCast::Simulator Class Reference

#include <Simulator.h>

Inheritance diagram for ACE_RMCast::Simulator:

Inheritance graph
[legend]
Collaboration diagram for ACE_RMCast::Simulator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Simulator ()
virtual void send (Message_ptr m)

Private Attributes

Message_ptr hold_
Mutex mutex_

Constructor & Destructor Documentation

ACE_RMCast::Simulator::Simulator  ) 
 

Definition at line 10 of file Simulator.cpp.

00011   {
00012     srand (time (0));
00013   }


Member Function Documentation

void ACE_RMCast::Simulator::send Message_ptr  m  )  [virtual]
 

Reimplemented from ACE_RMCast::Out_Element.

Definition at line 16 of file Simulator.cpp.

References ACE_RMCast::Message_ptr.

00017   {
00018     // Note: Simulator may work in unpredictable ways mainly due
00019     // to the "reliable loopback" mechanism.
00020     //
00021     out_->send (m);
00022     return;
00023 
00024     /*int r (rand ());
00025 
00026     if ((r % 3) == 0) return;
00027 
00028     Lock l (mutex_);
00029 
00030     if (hold_.get ())
00031     {
00032       out_->send (m);
00033       out_->send (hold_);
00034     }
00035     else
00036     {
00037       hold_ = m;
00038     }*/
00039   }


Member Data Documentation

Message_ptr ACE_RMCast::Simulator::hold_ [private]
 

Definition at line 24 of file Simulator.h.

Mutex ACE_RMCast::Simulator::mutex_ [private]
 

Definition at line 25 of file Simulator.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:41:24 2006 for ACE_RMCast by doxygen 1.3.6