OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay Struct Reference

Inheritance diagram for OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay:
Inheritance graph
[legend]
Collaboration diagram for OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TimedDelay (RtpsUdpDataLink *outer, PMF function, const ACE_Time_Value &timeout)
void schedule ()
void cancel ()
int handle_timeout (const ACE_Time_Value &, const void *)

Public Attributes

RtpsUdpDataLinkouter_
PMF function_
ACE_Time_Value timeout_
bool scheduled_

Detailed Description

Definition at line 382 of file RtpsUdpDataLink.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay::TimedDelay ( RtpsUdpDataLink outer,
PMF  function,
const ACE_Time_Value timeout 
) [inline]

Definition at line 384 of file RtpsUdpDataLink.h.

00386       : outer_(outer), function_(function), timeout_(timeout), scheduled_(false)
00387     {}


Member Function Documentation

void OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay::cancel ( void   ) 

Definition at line 2765 of file RtpsUdpDataLink.cpp.

References ACE_Reactor::cancel_timer(), OpenDDS::DCPS::RtpsUdpDataLink::get_reactor(), outer_, and scheduled_.

Referenced by OpenDDS::DCPS::RtpsUdpDataLink::stop_i().

02766 {
02767   if (scheduled_) {
02768     outer_->get_reactor()->cancel_timer(this);
02769     scheduled_ = false;
02770   }
02771 }

Here is the call graph for this function:

Here is the caller graph for this function:

int OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay::handle_timeout ( const ACE_Time_Value ,
const void *   
) [inline, virtual]

Reimplemented from ACE_Event_Handler.

Definition at line 392 of file RtpsUdpDataLink.h.

00393     {
00394       scheduled_ = false;
00395       (outer_->*function_)();
00396       return 0;
00397     }

void OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay::schedule (  ) 

Definition at line 2750 of file RtpsUdpDataLink.cpp.

References ACE_TEXT(), OpenDDS::DCPS::RtpsUdpDataLink::get_reactor(), LM_ERROR, outer_, ACE_Reactor::schedule_timer(), scheduled_, and timeout_.

Referenced by OpenDDS::DCPS::RtpsUdpDataLink::received().

02751 {
02752   if (!scheduled_) {
02753     const long timer = outer_->get_reactor()->schedule_timer(this, 0, timeout_);
02754 
02755     if (timer == -1) {
02756       ACE_ERROR((LM_ERROR, "(%P|%t) RtpsUdpDataLink::TimedDelay::schedule "
02757         "failed to schedule timer %p\n", ACE_TEXT("")));
02758     } else {
02759       scheduled_ = true;
02760     }
02761   }
02762 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 400 of file RtpsUdpDataLink.h.

Definition at line 399 of file RtpsUdpDataLink.h.

Referenced by cancel(), and schedule().

Definition at line 402 of file RtpsUdpDataLink.h.

Referenced by cancel(), and schedule().

Definition at line 401 of file RtpsUdpDataLink.h.

Referenced by schedule().


The documentation for this struct 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