doc/doxygen/html/timer_8c.html
author nico
Tue, 05 Jun 2007 18:43:21 +0200
changeset 210 6b5a4c21e061
parent 207 b6572d0336c3
child 215 f49e5a6b7804
permissions -rw-r--r--
Manual and Documentation finish
207
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     3
<title>CanFestival: /home/epimerde/documents/tc11/CanFestival-3/src/timer.c File Reference</title>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     4
<link href="doxygen.css" rel="stylesheet" type="text/css">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     5
<link href="tabs.css" rel="stylesheet" type="text/css">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     6
</head><body>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     7
<!-- Generated by Doxygen 1.5.1 -->
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     8
<div class="tabs">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     9
  <ul>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    10
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    11
    <li id="current"><a href="files.html"><span>Files</span></a></li>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    12
  </ul></div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    13
<div class="tabs">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    14
  <ul>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    15
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    16
    <li><a href="globals.html"><span>Globals</span></a></li>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    17
  </ul></div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    18
<h1>/home/epimerde/documents/tc11/CanFestival-3/src/timer.c File Reference</h1><code>#include &lt;applicfg.h&gt;</code><br>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    19
<code>#include &quot;timer.h&quot;</code><br>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    20
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    21
<p>
210
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    22
Include dependency graph for timer.c:<p><center><img src="timer_8c__incl.png" border="0" usemap="#/home/epimerde/documents/tc11/CanFestival-3/src/timer.c_map" alt=""></center>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    23
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    24
<p>
207
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    25
<a href="timer_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    26
<tr><td></td></tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    27
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    28
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#8536312cebeeea3a23dc0027800122c9">min_val</a>(a, b)&nbsp;&nbsp;&nbsp;((a&lt;b)?a:b)</td></tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    29
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    30
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    31
<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#11c2616d78f06ed9144ef662f757b128">SetAlarm</a> (CO_Data *d, UNS32 id, TimerCallback_t callback, TIMEVAL value, TIMEVAL period)</td></tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    32
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    33
<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#991b3cfaac2f201b14d5530f75985c21">DelAlarm</a> (TIMER_HANDLE handle)</td></tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    34
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    35
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#fa75192a3238525618f8cb83004930cc">TimeDispatch</a> ()</td></tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    36
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    37
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    38
<tr><td class="memItemLeft" nowrap align="right" valign="top">s_timer_entry&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#a74e2cf2504bfd18b12f112c7aaad845">timers</a> [MAX_NB_TIMER] = {{TIMER_FREE, NULL, NULL, 0, 0, 0},}</td></tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    39
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    40
<tr><td class="memItemLeft" nowrap align="right" valign="top">TIMEVAL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#5e9651eed13d70bcce9bdf3489a72a3d">total_sleep_time</a> = TIMEVAL_MAX</td></tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    41
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    42
<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#1dab7b9a29bdee8b1931f8ea90685c6f">last_timer_raw</a> = -1</td></tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    43
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    44
</table>
210
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    45
<hr><a name="_details"></a><h2>Detailed Description</h2>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    46
<dl class="author" compact><dt><b>Author:</b></dt><dd>Edouard TISSERANT and Francis DUPIN </dd></dl>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    47
<dl class="date" compact><dt><b>Date:</b></dt><dd>Tue Jun 5 09:32:32 2007 </dd></dl>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    48
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    49
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    50
Definition in file <a class="el" href="timer_8c-source.html">timer.c</a>.<hr><h2>Define Documentation</h2>
207
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    51
<a class="anchor" name="8536312cebeeea3a23dc0027800122c9"></a><!-- doxytag: member="timer.c::min_val" ref="8536312cebeeea3a23dc0027800122c9" args="(a, b)" -->
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    52
<div class="memitem">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    53
<div class="memproto">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    54
      <table class="memname">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    55
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    56
          <td class="memname">#define min_val          </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    57
          <td>(</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    58
          <td class="paramtype">a,         <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    59
          <td class="paramkey"></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    60
          <td></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    61
          <td class="paramtype">b&nbsp;</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    62
          <td class="paramname">          </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    63
          <td>&nbsp;)&nbsp;</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    64
          <td width="100%">&nbsp;&nbsp;&nbsp;((a&lt;b)?a:b)</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    65
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    66
      </table>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    67
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    68
<div class="memdoc">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    69
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    70
<p>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    71
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    72
<p>
210
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    73
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>.
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    74
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    75
Referenced by <a class="el" href="timer_8c-source.html#l00131">TimeDispatch()</a>.
207
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    76
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    77
</div><p>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    78
<hr><h2>Function Documentation</h2>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    79
<a class="anchor" name="991b3cfaac2f201b14d5530f75985c21"></a><!-- doxytag: member="timer.c::DelAlarm" ref="991b3cfaac2f201b14d5530f75985c21" args="(TIMER_HANDLE handle)" -->
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    80
<div class="memitem">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    81
<div class="memproto">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    82
      <table class="memname">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    83
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    84
          <td class="memname">TIMER_HANDLE DelAlarm           </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    85
          <td>(</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    86
          <td class="paramtype">TIMER_HANDLE&nbsp;</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    87
          <td class="paramname"> <em>handle</em>          </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    88
          <td>&nbsp;)&nbsp;</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    89
          <td width="100%"></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    90
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    91
      </table>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    92
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    93
<div class="memdoc">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    94
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    95
<p>
210
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    96
----- Use this to remove an alarm ----<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    97
<dl compact><dt><b>Parameters:</b></dt><dd>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    98
  <table border="0" cellspacing="2" cellpadding="0">
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
    99
    <tr><td valign="top"></td><td valign="top"><em>handle</em>&nbsp;</td><td></td></tr>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   100
  </table>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   101
</dl>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   102
<dl class="return" compact><dt><b>Returns:</b></dt><dd></dd></dl>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   103
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   104
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   105
Quick and dirty. system timer will continue to be trigged, but no action will be preformed. 
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   106
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   107
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>.
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   108
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   109
References <a class="el" href="timer_8c-source.html#l00042">last_timer_raw</a>, and <a class="el" href="timer_8c-source.html#l00039">timers</a>.
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   110
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   111
Referenced by <a class="el" href="lifegrd_8c-source.html#l00236">heartbeatStop()</a>, <a class="el" href="lifegrd_8c-source.html#l00081">proceedNODE_GUARD()</a>, <a class="el" href="lifegrd_8c-source.html#l00161">ProducerHearbeatAlarm()</a>, and <a class="el" href="sync_8c-source.html#l00105">stopSYNC()</a>.
207
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   112
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   113
</div><p>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   114
<a class="anchor" name="11c2616d78f06ed9144ef662f757b128"></a><!-- doxytag: member="timer.c::SetAlarm" ref="11c2616d78f06ed9144ef662f757b128" args="(CO_Data *d, UNS32 id, TimerCallback_t callback, TIMEVAL value, TIMEVAL period)" -->
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   115
<div class="memitem">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   116
<div class="memproto">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   117
      <table class="memname">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   118
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   119
          <td class="memname">TIMER_HANDLE SetAlarm           </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   120
          <td>(</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   121
          <td class="paramtype">CO_Data *&nbsp;</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   122
          <td class="paramname"> <em>d</em>, </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   123
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   124
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   125
          <td class="paramkey"></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   126
          <td></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   127
          <td class="paramtype">UNS32&nbsp;</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   128
          <td class="paramname"> <em>id</em>, </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   129
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   130
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   131
          <td class="paramkey"></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   132
          <td></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   133
          <td class="paramtype">TimerCallback_t&nbsp;</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   134
          <td class="paramname"> <em>callback</em>, </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   135
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   136
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   137
          <td class="paramkey"></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   138
          <td></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   139
          <td class="paramtype">TIMEVAL&nbsp;</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   140
          <td class="paramname"> <em>value</em>, </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   141
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   142
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   143
          <td class="paramkey"></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   144
          <td></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   145
          <td class="paramtype">TIMEVAL&nbsp;</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   146
          <td class="paramname"> <em>period</em></td><td>&nbsp;</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   147
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   148
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   149
          <td></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   150
          <td>)</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   151
          <td></td><td></td><td width="100%"></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   152
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   153
      </table>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   154
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   155
<div class="memdoc">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   156
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   157
<p>
210
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   158
------- Use this to declare a new alarm ------<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   159
<dl compact><dt><b>Parameters:</b></dt><dd>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   160
  <table border="0" cellspacing="2" cellpadding="0">
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   161
    <tr><td valign="top"></td><td valign="top"><em>d</em>&nbsp;</td><td></td></tr>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   162
    <tr><td valign="top"></td><td valign="top"><em>id</em>&nbsp;</td><td></td></tr>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   163
    <tr><td valign="top"></td><td valign="top"><em>callback</em>&nbsp;</td><td></td></tr>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   164
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td></td></tr>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   165
    <tr><td valign="top"></td><td valign="top"><em>period</em>&nbsp;</td><td></td></tr>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   166
  </table>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   167
</dl>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   168
<dl class="return" compact><dt><b>Returns:</b></dt><dd></dd></dl>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   169
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   170
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   171
in order to decide new timer setting we have to run over all timer rows<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   172
if something to store<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   173
and empty row<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   174
just store<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   175
if successfull<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   176
set next wakeup alarm if new entry is sooner than others, or if it is alone<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   177
printf("elapsed_time=%d real_timer_value=%d total_sleep_time=%d\n", elapsed_time, real_timer_value, total_sleep_time);<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   178
printf("SetAlarm() return %d\n", row_number); 
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   179
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   180
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>.
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   181
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   182
References <a class="el" href="timer_8c-source.html#l00042">last_timer_raw</a>, and <a class="el" href="timer_8c-source.html#l00039">timers</a>.
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   183
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   184
Referenced by <a class="el" href="lifegrd_8c-source.html#l00206">heartbeatInit()</a>, <a class="el" href="lifegrd_8c-source.html#l00081">proceedNODE_GUARD()</a>, and <a class="el" href="sync_8c-source.html#l00080">startSYNC()</a>.
207
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   185
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   186
</div><p>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   187
<a class="anchor" name="fa75192a3238525618f8cb83004930cc"></a><!-- doxytag: member="timer.c::TimeDispatch" ref="fa75192a3238525618f8cb83004930cc" args="()" -->
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   188
<div class="memitem">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   189
<div class="memproto">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   190
      <table class="memname">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   191
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   192
          <td class="memname">void TimeDispatch           </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   193
          <td>(</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   194
          <td class="paramname">          </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   195
          <td>&nbsp;)&nbsp;</td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   196
          <td width="100%"></td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   197
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   198
      </table>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   199
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   200
<div class="memdoc">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   201
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   202
<p>
210
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   203
------ TimeDispatch is called on each timer expiration ---- 
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   204
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   205
used to compute when should normaly occur next wakeup<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   206
First run : change timer state depending on time<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   207
Get time since timer signal<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   208
if row is active<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   209
to be trigged<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   210
if simply outdated<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   211
ask for trig<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   212
or period have expired<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   213
set val as interval, with overrun correction<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   214
Check if this new timer value is the soonest<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   215
Each armed timer value in decremented.<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   216
Check if this new timer value is the soonest<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   217
Remember how much time we should sleep.<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   218
Set timer to soonest occurence<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   219
Then trig them or not.<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   220
reset trig state (will be free if not periodic)<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   221
trig ! 
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   222
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   223
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>.
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   224
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   225
References <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_8c-source.html#l00039">timers</a>, and <a class="el" href="timer_8c-source.html#l00041">total_sleep_time</a>.
207
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   226
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   227
</div><p>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   228
<hr><h2>Variable Documentation</h2>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   229
<a class="anchor" name="1dab7b9a29bdee8b1931f8ea90685c6f"></a><!-- doxytag: member="timer.c::last_timer_raw" ref="1dab7b9a29bdee8b1931f8ea90685c6f" args="" -->
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   230
<div class="memitem">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   231
<div class="memproto">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   232
      <table class="memname">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   233
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   234
          <td class="memname">TIMER_HANDLE <a class="el" href="timer_8c.html#1dab7b9a29bdee8b1931f8ea90685c6f">last_timer_raw</a> = -1          </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   235
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   236
      </table>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   237
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   238
<div class="memdoc">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   239
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   240
<p>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   241
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   242
<p>
210
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   243
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>.
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   244
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   245
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>.
207
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   246
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   247
</div><p>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   248
<a class="anchor" name="a74e2cf2504bfd18b12f112c7aaad845"></a><!-- doxytag: member="timer.c::timers" ref="a74e2cf2504bfd18b12f112c7aaad845" args="[MAX_NB_TIMER]" -->
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   249
<div class="memitem">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   250
<div class="memproto">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   251
      <table class="memname">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   252
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   253
          <td class="memname">s_timer_entry <a class="el" href="timer_8c.html#a74e2cf2504bfd18b12f112c7aaad845">timers</a>[MAX_NB_TIMER] = {{TIMER_FREE, NULL, NULL, 0, 0, 0},}          </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   254
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   255
      </table>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   256
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   257
<div class="memdoc">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   258
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   259
<p>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   260
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   261
<p>
210
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   262
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>.
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   263
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   264
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>.
207
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   265
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   266
</div><p>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   267
<a class="anchor" name="5e9651eed13d70bcce9bdf3489a72a3d"></a><!-- doxytag: member="timer.c::total_sleep_time" ref="5e9651eed13d70bcce9bdf3489a72a3d" args="" -->
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   268
<div class="memitem">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   269
<div class="memproto">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   270
      <table class="memname">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   271
        <tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   272
          <td class="memname">TIMEVAL <a class="el" href="timer_8c.html#5e9651eed13d70bcce9bdf3489a72a3d">total_sleep_time</a> = TIMEVAL_MAX          </td>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   273
        </tr>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   274
      </table>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   275
</div>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   276
<div class="memdoc">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   277
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   278
<p>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   279
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   280
<p>
210
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   281
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>.
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   282
<p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   283
Referenced by <a class="el" href="timer_8c-source.html#l00131">TimeDispatch()</a>.
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   284
</div>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   285
</div><p>
6b5a4c21e061 Manual and Documentation finish
nico
parents: 207
diff changeset
   286
<hr size="1"><address style="align: right;"><small>Generated on Tue Jun 5 18:32:11 2007 for CanFestival by&nbsp;
207
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   287
<a href="http://www.doxygen.org/index.html">
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   288
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   289
</body>
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   290
</html>