OpenDDS::RTPS::WaitForAcks Class Reference

A class to wait on acknowledgments from other threads. More...

#include <Sedp.h>

Collaboration diagram for OpenDDS::RTPS::WaitForAcks:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 WaitForAcks ()
void ack ()
void wait_for_acks (unsigned int num_acks)
void reset ()

Private Attributes

ACE_Thread_Mutex lock_
ACE_Condition_Thread_Mutex cond_
unsigned int acks_

Detailed Description

A class to wait on acknowledgments from other threads.

Definition at line 665 of file Sedp.h.


Constructor & Destructor Documentation

OpenDDS::RTPS::WaitForAcks::WaitForAcks (  ) 

Definition at line 4115 of file Sedp.cpp.

04116 : cond_(lock_)
04117 , acks_(0)
04118 {
04119 }


Member Function Documentation

void OpenDDS::RTPS::WaitForAcks::ack (  ) 

Definition at line 4122 of file Sedp.cpp.

References acks_, cond_, lock_, and ACE_Condition< ACE_Thread_Mutex >::signal().

Referenced by OpenDDS::RTPS::Spdp::SpdpTransport::handle_exception(), and OpenDDS::RTPS::Sedp::Task::svc().

04123 {
04124   {
04125     ACE_GUARD(ACE_Thread_Mutex, g, lock_);
04126     ++acks_;
04127   }
04128   cond_.signal();
04129 }

Here is the call graph for this function:

Here is the caller graph for this function:

void OpenDDS::RTPS::WaitForAcks::reset ( void   ) 

Definition at line 4141 of file Sedp.cpp.

References acks_, and lock_.

Referenced by OpenDDS::RTPS::Spdp::fini_bit().

04142 {
04143   ACE_GUARD(ACE_Thread_Mutex, g, lock_);
04144   acks_ = 0;
04145   // no need to signal, going back to zero won't ever
04146   // cause wait_for_acks() to exit it's loop
04147 }

Here is the caller graph for this function:

void OpenDDS::RTPS::WaitForAcks::wait_for_acks ( unsigned int  num_acks  ) 

Definition at line 4132 of file Sedp.cpp.

References acks_, cond_, lock_, and ACE_Condition< ACE_Thread_Mutex >::wait().

Referenced by OpenDDS::RTPS::Spdp::fini_bit().

04133 {
04134   ACE_GUARD(ACE_Thread_Mutex, g, lock_);
04135   while (num_acks > acks_) {
04136     cond_.wait();
04137   }
04138 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

unsigned int OpenDDS::RTPS::WaitForAcks::acks_ [private]

Definition at line 674 of file Sedp.h.

Referenced by ack(), reset(), and wait_for_acks().

Definition at line 673 of file Sedp.h.

Referenced by ack(), and wait_for_acks().

Definition at line 672 of file Sedp.h.

Referenced by ack(), reset(), and wait_for_acks().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1