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 352 of file RtpsUdpDataLink.h.
OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay::TimedDelay | ( | RtpsUdpDataLink * | outer, | |
PMF | function, | |||
const ACE_Time_Value & | timeout | |||
) | [inline] |
Definition at line 354 of file RtpsUdpDataLink.h.
00356 : outer_(outer), function_(function), timeout_(timeout), scheduled_(false) 00357 {}
void OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay::cancel | ( | ) |
Definition at line 2518 of file RtpsUdpDataLink.cpp.
References OpenDDS::DCPS::RtpsUdpDataLink::get_reactor(), outer_, and scheduled_.
Referenced by OpenDDS::DCPS::RtpsUdpDataLink::stop_i().
02519 { 02520 if (scheduled_) { 02521 outer_->get_reactor()->cancel_timer(this); 02522 scheduled_ = false; 02523 } 02524 }
int OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay::handle_timeout | ( | const ACE_Time_Value & | , | |
const void * | ||||
) | [inline] |
Definition at line 362 of file RtpsUdpDataLink.h.
00363 { 00364 scheduled_ = false; 00365 (outer_->*function_)(); 00366 return 0; 00367 }
void OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay::schedule | ( | ) |
Definition at line 2503 of file RtpsUdpDataLink.cpp.
References OpenDDS::DCPS::RtpsUdpDataLink::get_reactor(), outer_, scheduled_, and timeout_.
Referenced by OpenDDS::DCPS::RtpsUdpDataLink::received().
02504 { 02505 if (!scheduled_) { 02506 const long timer = outer_->get_reactor()->schedule_timer(this, 0, timeout_); 02507 02508 if (timer == -1) { 02509 ACE_DEBUG((LM_ERROR, "(%P|%t) RtpsUdpDataLink::TimedDelay::schedule " 02510 "failed to schedule timer %p\n", ACE_TEXT(""))); 02511 } else { 02512 scheduled_ = true; 02513 } 02514 } 02515 }
Definition at line 370 of file RtpsUdpDataLink.h.
ACE_Time_Value OpenDDS::DCPS::RtpsUdpDataLink::TimedDelay::timeout_ |