📄 timers_8h.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>timers.h File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="main.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindex" href="examples.html">Examples</a> </center><hr><h1>/opentcp/include/inet/timers.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2> <dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Version: </b></dt><dd>1.0 </dl><dl compact><dt><b>Date: </b></dt><dd>18.7.2002</dl>OpenTCP timers function declarations, constants, etc.<p><p>Definition in file <a class="el" href="timers_8h-source.html">timers.h</a>.<p><a href="timers_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Defines</h2></td></tr><tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="group__opentcp__config.html#a15">NUMTIMERS</a> 55</td></tr><tr><td> </td><td><font size=-1><em>Number of timers available in the system.</em> <a href="group__opentcp__config.html#a15"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>#define </td><td valign=bottom><a class="el" href="timers_8h.html#a1">TIMERTIC</a> 100</td></tr><tr><td> </td><td><font size=-1><em>Frequency of timer interrupt.</em> <a href="#a1"></a><em></em></font><br><br></td></tr><tr><td colspan=2><br><h2>Functions</h2></td></tr><tr><td nowrap align=right valign=top>UINT8 </td><td valign=bottom><a class="el" href="timers_8h.html#a2">get_timer</a> (void)</td></tr><tr><td> </td><td><font size=-1><em>Obtain a timer from timer pool.</em> <a href="#a2"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="timers_8h.html#a3">free_timer</a> (UINT8)</td></tr><tr><td> </td><td><font size=-1><em>Release timer back to free timer pool.</em> <a href="#a3"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="timers_8h.html#a4">init_timer</a> (UINT8, UINT32)</td></tr><tr><td> </td><td><font size=-1><em>Initialize timer to a given time-out value.</em> <a href="#a4"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__core__initializer.html#a3">timer_pool_init</a> (void)</td></tr><tr><td> </td><td><font size=-1><em>Initialize timer pool.</em> <a href="group__core__initializer.html#a3"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>UINT32 </td><td valign=bottom><a class="el" href="timers_8h.html#a6">check_timer</a> (UINT8)</td></tr><tr><td> </td><td><font size=-1><em>Return the value of a given timer.</em> <a href="#a6"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="timers_8h.html#a7">decrement_timers</a> (void)</td></tr><tr><td> </td><td><font size=-1><em>Decrement all timers' values by one.</em> <a href="#a7"></a><em></em></font><br><br></td></tr></table><hr><h2>Define Documentation</h2><a name="a1" doxytag="timers.h::TIMERTIC"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> #define TIMERTIC 100 </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This value should be changed to reflect the frequency in which timers are decremented. Standard value for this is 100. <p>Definition at line <a class="el" href="timers_8h-source.html#l00086">86</a> of file <a class="el" href="timers_8h-source.html">timers.h</a>.<p>Referenced by <a class="el" href="arp_8c-source.html#l00910">arp_init()</a>, <a class="el" href="arp_8c-source.html#l00785">arp_manage()</a>, <a class="el" href="bootp_8c-source.html#l00183">bootpc_run()</a>, <a class="el" href="dhcpc_8c-source.html#l00158">dhcpc_init()</a>, <a class="el" href="dhcpc_8c-source.html#l00201">dhcpc_run()</a>, <a class="el" href="dns_8c-source.html#l00142">dns_retransmit()</a>, <a class="el" href="dns_8c-source.html#l00445">get_host_by_name()</a>, <a class="el" href="tcp_8c-source.html#l00155">tcp_getsocket()</a>, <a class="el" href="tcp_8c-source.html#l02455">tcp_newstate()</a>, and <a class="el" href="tcp_8c-source.html#l00808">tcp_poll()</a>. </td> </tr></table><hr><h2>Function Documentation</h2><a name="a2" doxytag="timers.h::get_timer"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> UINT8 get_timer </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>18.07.2001 </dl><dl compact><dt><b>Returns: </b></dt><dd>Handle to a free timer </dl><dl compact><dt><b>Warning: </b></dt><dd> <ul><li> Timers are considered to be critical resources, so if there is no available timer and get_timer is invoked, system will reset.</ul></dl>Invoke this function to obtain a free timer (it's handle that is) from the timer pool. <p>Definition at line <a class="el" href="timers_8c-source.html#l00131">131</a> of file <a class="el" href="timers_8c-source.html">timers.c</a>.<p>References <a class="el" href="system_8h-source.html#l00079">FALSE</a>, <a class="el" href="timers_8h-source.html#l00077">NUMTIMERS</a>, <a class="el" href="system_8h-source.html#l00163">RESET_SYSTEM</a>, <a class="el" href="timers_8c.html#a2">timer_pool</a>, and <a class="el" href="system_8h-source.html#l00078">TRUE</a>.<p>Referenced by <a class="el" href="arp_8c-source.html#l00910">arp_init()</a>, <a class="el" href="bootp_8c-source.html#l00108">bootpc_init()</a>, <a class="el" href="dhcpc_8c-source.html#l00158">dhcpc_init()</a>, <a class="el" href="dns_8c-source.html#l00108">dns_init()</a>, <a class="el" href="pop3__client_8c-source.html#l00148">pop3c_init()</a>, <a class="el" href="smtp__client_8c-source.html#l00155">smtpc_init()</a>, <a class="el" href="tcp_8c-source.html#l01154">tcp_init()</a>, and <a class="el" href="tftps_8c-source.html#l00136">tftps_init()</a>. </td> </tr></table><a name="a3" doxytag="timers.h::free_timer"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void free_timer </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">UINT8 </td> <td class="mdname1" valign="top" nowrap> <em>nbr</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>18.07.2001 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>nbr</em> </td><td>handle to timer beeing released</td></tr></table></dl>This function releases the timer who's handle is supplied as parameter. Use this when timer is not needed any more and other applications might use it. <p>Definition at line <a class="el" href="timers_8c-source.html#l00169">169</a> of file <a class="el" href="timers_8c-source.html">timers.c</a>.<p>References <a class="el" href="timers_8h-source.html#l00077">NUMTIMERS</a>, <a class="el" href="timers_8c.html#a2">timer_pool</a>, and <a class="el" href="system_8h-source.html#l00078">TRUE</a>. </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -