doc/doxygen/html/timer_8c.html
author etisserant
Tue, 11 Sep 2007 17:34:31 +0200
changeset 272 bbdbf0c17d3c
parent 240 34654679f262
permissions -rw-r--r--
Added SetRoot in networkedit to change project root on the fly
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>CanFestival: src/timer.c File 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.1 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="dirs.html"><span>Directories</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="dir_0aa10e4f705947227e11e7ccb081fbe4.html">src</a></div>
<h1>timer.c File Reference</h1><code>#include &lt;<a class="el" href="win32_2applicfg_8h-source.html">applicfg.h</a>&gt;</code><br>
<code>#include &quot;<a class="el" href="timer_8h-source.html">timer.h</a>&quot;</code><br>

<p>
Include dependency graph for timer.c:<p><center><img src="timer_8c__incl.png" border="0" usemap="#src/timer.c_map" alt=""></center>
<map name="src/timer.c_map">
<area href="win32_2applicfg_8h.html" shape="rect" coords="608,296,683,323" alt="">
<area href="timer_8h.html" shape="rect" coords="132,296,191,323" alt="">
<area href="win32_2timerscfg_8h.html" shape="rect" coords="241,587,321,613" alt="">
<area href="data_8h.html" shape="rect" coords="255,296,308,323" alt="">
<area href="def_8h.html" shape="rect" coords="511,549,559,576" alt="">
<area href="can_8h.html" shape="rect" coords="511,448,559,475" alt="">
<area href="objdictdef_8h.html" shape="rect" coords="373,397,459,424" alt="">
<area href="objacces_8h.html" shape="rect" coords="377,93,455,120" alt="">
<area href="sdo_8h.html" shape="rect" coords="392,600,440,627" alt="">
<area href="pdo_8h.html" shape="rect" coords="391,499,441,525" alt="">
<area href="states_8h.html" shape="rect" coords="385,245,447,272" alt="">
<area href="lifegrd_8h.html" shape="rect" coords="383,296,449,323" alt="">
<area href="sync_8h.html" shape="rect" coords="388,144,444,171" alt="">
<area href="nmtMaster_8h.html" shape="rect" coords="372,195,460,221" alt="">
<area href="config_8h.html" shape="rect" coords="613,549,677,576" alt="">
</map>

<p>
<a href="timer_8c-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 class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#d2d95744d6e355721e7bbc2c07d934a4">min_val</a>(a, b)&nbsp;&nbsp;&nbsp;((a&lt;b)?a:b)</td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">TIMER_HANDLE&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#956b22f24089db4c367f40199f838a20">SetAlarm</a> (<a class="el" href="structstruct__CO__Data.html">CO_Data</a> *d, UNS32 id, <a class="el" href="timer_8h.html#c8436e7543fa1329b00e570246071313">TimerCallback_t</a> callback, TIMEVAL value, TIMEVAL period)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">TIMER_HANDLE&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#12fe6467e1df03cc40dd6f76123c99f6">DelAlarm</a> (TIMER_HANDLE handle)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#7a5a515821c2e4fb2f66bac72389da00">TimeDispatch</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structstruct__s__timer__entry.html">s_timer_entry</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#adb4c8d5876b377463d33bdeda56b575">timers</a> [MAX_NB_TIMER] = {{TIMER_FREE, NULL, NULL, 0, 0, 0},}</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">TIMEVAL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#242986a224c5a02d6341dd5bfdf71008">total_sleep_time</a> = TIMEVAL_MAX</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">TIMER_HANDLE&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#4afd63ff2f23fe7cd60f0d82e78c4426">last_timer_raw</a> = -1</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Edouard TISSERANT and Francis DUPIN </dd></dl>
<dl class="date" compact><dt><b>Date:</b></dt><dd>Tue Jun 5 09:32:32 2007 </dd></dl>

<p>
Definition in file <a class="el" href="timer_8c-source.html">timer.c</a>.<hr><h2>Define Documentation</h2>
<a class="anchor" name="d2d95744d6e355721e7bbc2c07d934a4"></a><!-- doxytag: member="timer.c::min_val" ref="d2d95744d6e355721e7bbc2c07d934a4" args="(a, b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define min_val          </td>
          <td>(</td>
          <td class="paramtype">a,         <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">b&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%">&nbsp;&nbsp;&nbsp;((a&lt;b)?a:b)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="timer_8c-source.html#l00044">44</a> of file <a class="el" href="timer_8c-source.html">timer.c</a>.
<p>
Referenced by <a class="el" href="timer_8c-source.html#l00131">TimeDispatch()</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="12fe6467e1df03cc40dd6f76123c99f6"></a><!-- doxytag: member="timer.c::DelAlarm" ref="12fe6467e1df03cc40dd6f76123c99f6" args="(TIMER_HANDLE handle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TIMER_HANDLE DelAlarm           </td>
          <td>(</td>
          <td class="paramtype">TIMER_HANDLE&nbsp;</td>
          <td class="paramname"> <em>handle</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
----- Use this to remove an alarm ----<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td></td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="timer_8c-source.html#l00112">112</a> of file <a class="el" href="timer_8c-source.html">timer.c</a>.
<p>
References <a class="el" href="timer_8c-source.html#l00042">last_timer_raw</a>, <a class="el" href="hcs12_2applicfg_8h-source.html#l00190">MSG_WAR</a>, <a class="el" href="timer_8h-source.html#l00044">struct_s_timer_entry::state</a>, and <a class="el" href="timer_8c-source.html#l00039">timers</a>.
<p>
Referenced by <a class="el" href="pdo_8c-source.html#l00442">_sendPDOevent()</a>, <a class="el" href="lifegrd_8c-source.html#l00236">heartbeatStop()</a>, <a class="el" href="pdo_8c-source.html#l00632">PDOStop()</a>, <a class="el" href="lifegrd_8c-source.html#l00081">proceedNODE_GUARD()</a>, <a class="el" href="pdo_8c-source.html#l00141">proceedPDO()</a>, <a class="el" href="lifegrd_8c-source.html#l00161">ProducerHearbeatAlarm()</a>, <a class="el" href="sync_8c-source.html#l00105">stopSYNC()</a>, and <a class="el" href="pdo_8c-source.html#l00573">TPDO_Communication_Parameter_Callback()</a>.
</div>
</div><p>
<a class="anchor" name="956b22f24089db4c367f40199f838a20"></a><!-- doxytag: member="timer.c::SetAlarm" ref="956b22f24089db4c367f40199f838a20" args="(CO_Data *d, UNS32 id, TimerCallback_t callback, TIMEVAL value, TIMEVAL period)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TIMER_HANDLE SetAlarm           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> *&nbsp;</td>
          <td class="paramname"> <em>d</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">UNS32&nbsp;</td>
          <td class="paramname"> <em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="timer_8h.html#c8436e7543fa1329b00e570246071313">TimerCallback_t</a>&nbsp;</td>
          <td class="paramname"> <em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TIMEVAL&nbsp;</td>
          <td class="paramname"> <em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">TIMEVAL&nbsp;</td>
          <td class="paramname"> <em>period</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
------- Use this to declare a new alarm ------<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>id</em>&nbsp;</td><td></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>callback</em>&nbsp;</td><td></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td></td></tr>
    <tr><td valign="top"></td><td valign="top"><em>period</em>&nbsp;</td><td></td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd></dd></dl>

<p>
Definition at line <a class="el" href="timer_8c-source.html#l00057">57</a> of file <a class="el" href="timer_8c-source.html">timer.c</a>.
<p>
References <a class="el" href="timer_8h-source.html#l00045">struct_s_timer_entry::d</a>, <a class="el" href="timer_8c-source.html#l00042">last_timer_raw</a>, <a class="el" href="config_8h-source.html#l00032">MAX_NB_TIMER</a>, <a class="el" href="timer_8h-source.html#l00029">TIMER_HANDLE</a>, and <a class="el" href="timer_8c-source.html#l00039">timers</a>.
<p>
Referenced by <a class="el" href="pdo_8c-source.html#l00442">_sendPDOevent()</a>, <a class="el" href="lifegrd_8c-source.html#l00206">heartbeatInit()</a>, <a class="el" href="lifegrd_8c-source.html#l00081">proceedNODE_GUARD()</a>, <a class="el" href="sync_8c-source.html#l00080">startSYNC()</a>, and <a class="el" href="timers__unix_8c-source.html#l00062">StartTimerLoop()</a>.
</div>
</div><p>
<a class="anchor" name="7a5a515821c2e4fb2f66bac72389da00"></a><!-- doxytag: member="timer.c::TimeDispatch" ref="7a5a515821c2e4fb2f66bac72389da00" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void TimeDispatch           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
------ TimeDispatch is called on each timer expiration ---- 
<p>
Definition at line <a class="el" href="timer_8c-source.html#l00131">131</a> of file <a class="el" href="timer_8c-source.html">timer.c</a>.
<p>
References <a class="el" href="canOpenDriver_8c-source.html#l00066">getElapsedTime()</a>, <a class="el" href="timer_8c-source.html#l00042">last_timer_raw</a>, <a class="el" href="timer_8c-source.html#l00044">min_val</a>, <a class="el" href="timer_8h-source.html#l00029">TIMER_HANDLE</a>, <a class="el" href="timer_8c-source.html#l00039">timers</a>, <a class="el" href="hcs12_2applicfg_8h-source.html#l00150">TIMEVAL</a>, <a class="el" href="hcs12_2applicfg_8h-source.html#l00153">TIMEVAL_MAX</a>, and <a class="el" href="timer_8c-source.html#l00041">total_sleep_time</a>.
<p>
Referenced by <a class="el" href="timers__win32_8cpp-source.html#l00151">class_timers::timer_loop_thread_proc()</a>, <a class="el" href="timers__unix_8c-source.html#l00030">timer_notify()</a>, and <a class="el" href="timers__xeno_8c-source.html#l00045">timerloop_task_proc()</a>.
<p>
Here is the call graph for this function:<p><center><img src="timer_8c_7a5a515821c2e4fb2f66bac72389da00_cgraph.png" border="0" usemap="#timer_8c_7a5a515821c2e4fb2f66bac72389da00_cgraph_map" alt=""></center>
<map name="timer_8c_7a5a515821c2e4fb2f66bac72389da00_cgraph_map">
<area href="canOpenDriver_8c.html#38b23a8ee3748bca3415967b90df1e15" shape="rect" coords="153,5,260,32" alt="">
</map>

</div>
</div><p>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="4afd63ff2f23fe7cd60f0d82e78c4426"></a><!-- doxytag: member="timer.c::last_timer_raw" ref="4afd63ff2f23fe7cd60f0d82e78c4426" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TIMER_HANDLE <a class="el" href="timer_8c.html#4afd63ff2f23fe7cd60f0d82e78c4426">last_timer_raw</a> = -1          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="timer_8c-source.html#l00042">42</a> of file <a class="el" href="timer_8c-source.html">timer.c</a>.
<p>
Referenced by <a class="el" href="timer_8c-source.html#l00112">DelAlarm()</a>, <a class="el" href="timer_8c-source.html#l00057">SetAlarm()</a>, and <a class="el" href="timer_8c-source.html#l00131">TimeDispatch()</a>.
</div>
</div><p>
<a class="anchor" name="adb4c8d5876b377463d33bdeda56b575"></a><!-- doxytag: member="timer.c::timers" ref="adb4c8d5876b377463d33bdeda56b575" args="[MAX_NB_TIMER]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structstruct__s__timer__entry.html">s_timer_entry</a> <a class="el" href="timer_8c.html#adb4c8d5876b377463d33bdeda56b575">timers</a>[MAX_NB_TIMER] = {{TIMER_FREE, NULL, NULL, 0, 0, 0},}          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="timer_8c-source.html#l00039">39</a> of file <a class="el" href="timer_8c-source.html">timer.c</a>.
<p>
Referenced by <a class="el" href="timer_8c-source.html#l00112">DelAlarm()</a>, <a class="el" href="timer_8c-source.html#l00057">SetAlarm()</a>, and <a class="el" href="timer_8c-source.html#l00131">TimeDispatch()</a>.
</div>
</div><p>
<a class="anchor" name="242986a224c5a02d6341dd5bfdf71008"></a><!-- doxytag: member="timer.c::total_sleep_time" ref="242986a224c5a02d6341dd5bfdf71008" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TIMEVAL <a class="el" href="timer_8c.html#242986a224c5a02d6341dd5bfdf71008">total_sleep_time</a> = TIMEVAL_MAX          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="timer_8c-source.html#l00041">41</a> of file <a class="el" href="timer_8c-source.html">timer.c</a>.
<p>
Referenced by <a class="el" href="timer_8c-source.html#l00131">TimeDispatch()</a>.
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 2 19:10:42 2007 for CanFestival by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>