#include <CustodyTimer.h>
Each bundle stores a vector of these timers, as the bundle may be in flight on multiple links concurrently, each having distinct retransmission timer parameters. When a given timer fires, a retransmission is expected to be initiated on only one link.
When a successful custody signal is received, the daemon will cancel all timers and release custody, informing the routers as such. If a failed custody signal is received or a timer fires, it is up to the router to initiate a retransmission on one or more links.
Definition at line 101 of file CustodyTimer.h.
Public Member Functions | |
CustodyTimer (const struct timeval &xmit_time, const CustodyTimerSpec &spec, Bundle *bundle, Link *link) | |
Constructor. | |
void | timeout (const struct timeval &now) |
Virtual timeout function. | |
Public Attributes | |
BundleRef | bundle_ |
The link that it was transmitted on. | |
Link * | link_ |
dtn::CustodyTimer::CustodyTimer | ( | const struct timeval & | xmit_time, | |
const CustodyTimerSpec & | spec, | |||
Bundle * | bundle, | |||
Link * | link | |||
) |
Constructor.
Definition at line 67 of file CustodyTimer.cc.
References dtn::CustodyTimerSpec::calculate_timeout(), dtnsim::gettimeofday(), log_info, oasys::Timer::schedule_at(), and TIMEVAL_DIFF_MSEC.
void dtn::CustodyTimer::timeout | ( | const struct timeval & | now | ) | [virtual] |
Virtual timeout function.
The bundle for whom the the timer refers
Implements oasys::Timer.
Definition at line 88 of file CustodyTimer.cc.
References bundle_, link_, log_info, oasys::Ref< _Type >::object(), and dtn::BundleDaemon::post().
The link that it was transmitted on.
Definition at line 114 of file CustodyTimer.h.
Referenced by timeout().
Definition at line 115 of file CustodyTimer.h.
Referenced by dtn::BundleDaemon::handle_custody_timeout(), and timeout().