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 | |
RtpsUdpDataLink * | outer_ |
PMF | function_ |
ACE_Time_Value | timeout_ |
bool | scheduled_ |
Definition at line 382 of file RtpsUdpDataLink.h.
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 {}
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 }
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 }
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().