<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>DTN Reference Implementation: dtn::ProphetTimer Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="main.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="namespacedtn.html">dtn</a>::<a class="el" href="classdtn_1_1ProphetTimer.html">ProphetTimer</a> </div> </div> <div class="contents"> <h1>dtn::ProphetTimer Class Reference</h1><!-- doxytag: class="dtn::ProphetTimer" --><!-- doxytag: inherits="prophet::Alarm" --><code>#include <<a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for dtn::ProphetTimer:</div> <div class="dynsection"> <p><center><img src="classdtn_1_1ProphetTimer.png" usemap="#dtn::ProphetTimer_map" border="0" alt=""></center> <map name="dtn::ProphetTimer_map"> <area href="classprophet_1_1Alarm.html" alt="prophet::Alarm" shape="rect" coords="0,0,110,24"> </map> </div> <p> <a href="classdtn_1_1ProphetTimer-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> <p>Definition at line <a class="el" href="ProphetTimer_8h-source.html#l00028">28</a> of file <a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a>.</p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1ProphetTimer.html#a80cd34a517fbd5302ed2d0a6037317f">ProphetTimer</a> (<a class="el" href="classprophet_1_1ExpirationHandler.html">prophet::ExpirationHandler</a> *eh, oasys::SpinLock *lock)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1ProphetTimer.html#ed0554f250d7b8217095a46185d8e43d">~ProphetTimer</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1ProphetTimer.html#5833c6d20785f3396c980766e12a5cc3">timeout</a> (const struct timeval &now)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual from oasys::Timer. <a href="#5833c6d20785f3396c980766e12a5cc3"></a><br></td></tr> <tr><td colspan="2"><div class="groupHeader"></div></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1ProphetTimer.html#06a6447f317c304f1a341dad43484b0e">schedule</a> (u_int milliseconds)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual from <a class="el" href="classprophet_1_1Alarm.html" title="Alarm registration.">prophet::Alarm</a>. <a href="#06a6447f317c304f1a341dad43484b0e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">u_int </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1ProphetTimer.html#19272e0bef9c0df0e20d278c0e4f586f">time_remaining</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual from <a class="el" href="classprophet_1_1Alarm.html" title="Alarm registration.">prophet::Alarm</a>. <a href="#19272e0bef9c0df0e20d278c0e4f586f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1ProphetTimer.html#ac693f56a7f6de16b5a23935438194e3">cancel</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual from <a class="el" href="classprophet_1_1Alarm.html" title="Alarm registration.">prophet::Alarm</a>. <a href="#ac693f56a7f6de16b5a23935438194e3"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1ProphetTimer.html#7dfd5440dcb955b90ba0fb2c7a9f6145">pending</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual from <a class="el" href="classprophet_1_1Alarm.html" title="Alarm registration.">prophet::Alarm</a>. <a href="#7dfd5440dcb955b90ba0fb2c7a9f6145"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1ProphetTimer.html#e0a84170bfd5dd1f2fbbb32e51cf343a">cancelled</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual from <a class="el" href="classprophet_1_1Alarm.html" title="Alarm registration.">prophet::Alarm</a>. <a href="#e0a84170bfd5dd1f2fbbb32e51cf343a"></a><br></td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">oasys::SpinLock * </td><td class="memItemRight" valign="bottom"><a class="el" href="classdtn_1_1ProphetTimer.html#2271483967f207c0b6729dce4e70abfe">lock_</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">synchronize/serialize access to handler <a href="#2271483967f207c0b6729dce4e70abfe"></a><br></td></tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="a80cd34a517fbd5302ed2d0a6037317f"></a><!-- doxytag: member="dtn::ProphetTimer::ProphetTimer" ref="a80cd34a517fbd5302ed2d0a6037317f" args="(prophet::ExpirationHandler *eh, oasys::SpinLock *lock)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">dtn::ProphetTimer::ProphetTimer </td> <td>(</td> <td class="paramtype"><a class="el" href="classprophet_1_1ExpirationHandler.html">prophet::ExpirationHandler</a> * </td> <td class="paramname"> <em>eh</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">oasys::SpinLock * </td> <td class="paramname"> <em>lock</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="ProphetTimer_8h-source.html#l00032">32</a> of file <a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a>.</p> <p>References <a class="el" href="SDNV_8cc-source.html#l00044">ASSERT</a>.</p> </div> </div><p> <a class="anchor" name="ed0554f250d7b8217095a46185d8e43d"></a><!-- doxytag: member="dtn::ProphetTimer::~ProphetTimer" ref="ed0554f250d7b8217095a46185d8e43d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual dtn::ProphetTimer::~ProphetTimer </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <p>Definition at line <a class="el" href="ProphetTimer_8h-source.html#l00042">42</a> of file <a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="5833c6d20785f3396c980766e12a5cc3"></a><!-- doxytag: member="dtn::ProphetTimer::timeout" ref="5833c6d20785f3396c980766e12a5cc3" args="(const struct timeval &now)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void dtn::ProphetTimer::timeout </td> <td>(</td> <td class="paramtype">const struct timeval & </td> <td class="paramname"> <em>now</em> </td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual from oasys::Timer. <p> <p>Definition at line <a class="el" href="ProphetTimer_8h-source.html#l00047">47</a> of file <a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a>.</p> <p>References <a class="el" href="ProphetTimer_8h-source.html#l00073">lock_</a>, and <a class="el" href="Alarm_8h-source.html#l00103">prophet::Alarm::timeout()</a>.</p> </div> </div><p> <a class="anchor" name="06a6447f317c304f1a341dad43484b0e"></a><!-- doxytag: member="dtn::ProphetTimer::schedule" ref="06a6447f317c304f1a341dad43484b0e" args="(u_int milliseconds)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void dtn::ProphetTimer::schedule </td> <td>(</td> <td class="paramtype">u_int </td> <td class="paramname"> <em>milliseconds</em> </td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual from <a class="el" href="classprophet_1_1Alarm.html" title="Alarm registration.">prophet::Alarm</a>. <p> <p>Implements <a class="el" href="classprophet_1_1Alarm.html#63c754c7cac177eba56e52a1a0dda218">prophet::Alarm</a>.</p> <p>Definition at line <a class="el" href="ProphetTimer_8h-source.html#l00055">55</a> of file <a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a>.</p> <p>Referenced by <a class="el" href="ProphetBundleCore_8cc-source.html#l00375">dtn::ProphetBundleCore::create_alarm()</a>.</p> </div> </div><p> <a class="anchor" name="19272e0bef9c0df0e20d278c0e4f586f"></a><!-- doxytag: member="dtn::ProphetTimer::time_remaining" ref="19272e0bef9c0df0e20d278c0e4f586f" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">u_int dtn::ProphetTimer::time_remaining </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual from <a class="el" href="classprophet_1_1Alarm.html" title="Alarm registration.">prophet::Alarm</a>. <p> <p>Implements <a class="el" href="classprophet_1_1Alarm.html#3304d46e4d44b59e1e2387c7c2f3bb07">prophet::Alarm</a>.</p> <p>Definition at line <a class="el" href="ProphetTimer_8h-source.html#l00059">59</a> of file <a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a>.</p> <p>References <a class="el" href="Simulator_8cc-source.html#l00269">dtnsim::gettimeofday()</a>, and <a class="el" href="dtnping_8h-source.html#l00029">TIMEVAL_DIFF_MSEC</a>.</p> </div> </div><p> <a class="anchor" name="ac693f56a7f6de16b5a23935438194e3"></a><!-- doxytag: member="dtn::ProphetTimer::cancel" ref="ac693f56a7f6de16b5a23935438194e3" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void dtn::ProphetTimer::cancel </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual from <a class="el" href="classprophet_1_1Alarm.html" title="Alarm registration.">prophet::Alarm</a>. <p> <p>Implements <a class="el" href="classprophet_1_1Alarm.html#508522f8fbea59f5b6a64a6fafae5f4c">prophet::Alarm</a>.</p> <p>Definition at line <a class="el" href="ProphetTimer_8h-source.html#l00067">67</a> of file <a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a>.</p> </div> </div><p> <a class="anchor" name="7dfd5440dcb955b90ba0fb2c7a9f6145"></a><!-- doxytag: member="dtn::ProphetTimer::pending" ref="7dfd5440dcb955b90ba0fb2c7a9f6145" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::ProphetTimer::pending </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual from <a class="el" href="classprophet_1_1Alarm.html" title="Alarm registration.">prophet::Alarm</a>. <p> <p>Implements <a class="el" href="classprophet_1_1Alarm.html#6d7567c66026f23fa7ef545b23110fe5">prophet::Alarm</a>.</p> <p>Definition at line <a class="el" href="ProphetTimer_8h-source.html#l00068">68</a> of file <a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a>.</p> </div> </div><p> <a class="anchor" name="e0a84170bfd5dd1f2fbbb32e51cf343a"></a><!-- doxytag: member="dtn::ProphetTimer::cancelled" ref="e0a84170bfd5dd1f2fbbb32e51cf343a" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="serialsource_8c.html#1062901a7428fdd9c7f180f5e01ea056">bool</a> dtn::ProphetTimer::cancelled </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td> const<code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Virtual from <a class="el" href="classprophet_1_1Alarm.html" title="Alarm registration.">prophet::Alarm</a>. <p> <p>Implements <a class="el" href="classprophet_1_1Alarm.html#c091adaa44e62772c19f20d23efebd92">prophet::Alarm</a>.</p> <p>Definition at line <a class="el" href="ProphetTimer_8h-source.html#l00069">69</a> of file <a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a>.</p> </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="2271483967f207c0b6729dce4e70abfe"></a><!-- doxytag: member="dtn::ProphetTimer::lock_" ref="2271483967f207c0b6729dce4e70abfe" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">oasys::SpinLock* <a class="el" href="classdtn_1_1ProphetTimer.html#2271483967f207c0b6729dce4e70abfe">dtn::ProphetTimer::lock_</a><code> [protected]</code> </td> </tr> </table> </div> <div class="memdoc"> <p> synchronize/serialize access to handler <p> <p>Definition at line <a class="el" href="ProphetTimer_8h-source.html#l00073">73</a> of file <a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a>.</p> <p>Referenced by <a class="el" href="ProphetTimer_8h-source.html#l00047">timeout()</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="ProphetTimer_8h-source.html">ProphetTimer.h</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Mon Jul 21 14:09:55 2008 for DTN Reference Implementation by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>