1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
|
3 <title>CanFestival: src/timer.c File Reference</title> |
|
4 <link href="doxygen.css" rel="stylesheet" type="text/css"> |
|
5 <link href="tabs.css" rel="stylesheet" type="text/css"> |
|
6 </head><body> |
|
7 <!-- Generated by Doxygen 1.5.1 --> |
|
8 <div class="tabs"> |
|
9 <ul> |
|
10 <li><a href="main.html"><span>Main Page</span></a></li> |
|
11 <li><a href="annotated.html"><span>Data Structures</span></a></li> |
|
12 <li id="current"><a href="files.html"><span>Files</span></a></li> |
|
13 <li><a href="dirs.html"><span>Directories</span></a></li> |
|
14 </ul></div> |
|
15 <div class="tabs"> |
|
16 <ul> |
|
17 <li><a href="files.html"><span>File List</span></a></li> |
|
18 <li><a href="globals.html"><span>Globals</span></a></li> |
|
19 </ul></div> |
|
20 <div class="nav"> |
|
21 <a class="el" href="dir_0aa10e4f705947227e11e7ccb081fbe4.html">src</a></div> |
|
22 <h1>timer.c File Reference</h1><code>#include <<a class="el" href="win32_2applicfg_8h-source.html">applicfg.h</a>></code><br> |
|
23 <code>#include "<a class="el" href="timer_8h-source.html">timer.h</a>"</code><br> |
|
24 |
|
25 <p> |
|
26 Include dependency graph for timer.c:<p><center><img src="timer_8c__incl.png" border="0" usemap="#src/timer.c_map" alt=""></center> |
|
27 <map name="src/timer.c_map"> |
|
28 <area href="win32_2applicfg_8h.html" shape="rect" coords="608,296,683,323" alt=""> |
|
29 <area href="timer_8h.html" shape="rect" coords="132,296,191,323" alt=""> |
|
30 <area href="win32_2timerscfg_8h.html" shape="rect" coords="241,587,321,613" alt=""> |
|
31 <area href="data_8h.html" shape="rect" coords="255,296,308,323" alt=""> |
|
32 <area href="def_8h.html" shape="rect" coords="511,549,559,576" alt=""> |
|
33 <area href="can_8h.html" shape="rect" coords="511,448,559,475" alt=""> |
|
34 <area href="objdictdef_8h.html" shape="rect" coords="373,397,459,424" alt=""> |
|
35 <area href="objacces_8h.html" shape="rect" coords="377,93,455,120" alt=""> |
|
36 <area href="sdo_8h.html" shape="rect" coords="392,600,440,627" alt=""> |
|
37 <area href="pdo_8h.html" shape="rect" coords="391,499,441,525" alt=""> |
|
38 <area href="states_8h.html" shape="rect" coords="385,245,447,272" alt=""> |
|
39 <area href="lifegrd_8h.html" shape="rect" coords="383,296,449,323" alt=""> |
|
40 <area href="sync_8h.html" shape="rect" coords="388,144,444,171" alt=""> |
|
41 <area href="nmtMaster_8h.html" shape="rect" coords="372,195,460,221" alt=""> |
|
42 <area href="config_8h.html" shape="rect" coords="613,549,677,576" alt=""> |
|
43 </map> |
|
44 |
|
45 <p> |
|
46 <a href="timer_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> |
|
47 <tr><td></td></tr> |
|
48 <tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
|
49 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#d2d95744d6e355721e7bbc2c07d934a4">min_val</a>(a, b) ((a<b)?a:b)</td></tr> |
|
50 |
|
51 <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
|
52 <tr><td class="memItemLeft" nowrap align="right" valign="top">TIMER_HANDLE </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> |
|
53 |
|
54 <tr><td class="memItemLeft" nowrap align="right" valign="top">TIMER_HANDLE </td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#12fe6467e1df03cc40dd6f76123c99f6">DelAlarm</a> (TIMER_HANDLE handle)</td></tr> |
|
55 |
|
56 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#7a5a515821c2e4fb2f66bac72389da00">TimeDispatch</a> ()</td></tr> |
|
57 |
|
58 <tr><td colspan="2"><br><h2>Variables</h2></td></tr> |
|
59 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structstruct__s__timer__entry.html">s_timer_entry</a> </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> |
|
60 |
|
61 <tr><td class="memItemLeft" nowrap align="right" valign="top">TIMEVAL </td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#242986a224c5a02d6341dd5bfdf71008">total_sleep_time</a> = TIMEVAL_MAX</td></tr> |
|
62 |
|
63 <tr><td class="memItemLeft" nowrap align="right" valign="top">TIMER_HANDLE </td><td class="memItemRight" valign="bottom"><a class="el" href="timer_8c.html#4afd63ff2f23fe7cd60f0d82e78c4426">last_timer_raw</a> = -1</td></tr> |
|
64 |
|
65 </table> |
|
66 <hr><a name="_details"></a><h2>Detailed Description</h2> |
|
67 <dl class="author" compact><dt><b>Author:</b></dt><dd>Edouard TISSERANT and Francis DUPIN </dd></dl> |
|
68 <dl class="date" compact><dt><b>Date:</b></dt><dd>Tue Jun 5 09:32:32 2007 </dd></dl> |
|
69 |
|
70 <p> |
|
71 Definition in file <a class="el" href="timer_8c-source.html">timer.c</a>.<hr><h2>Define Documentation</h2> |
|
72 <a class="anchor" name="d2d95744d6e355721e7bbc2c07d934a4"></a><!-- doxytag: member="timer.c::min_val" ref="d2d95744d6e355721e7bbc2c07d934a4" args="(a, b)" --> |
|
73 <div class="memitem"> |
|
74 <div class="memproto"> |
|
75 <table class="memname"> |
|
76 <tr> |
|
77 <td class="memname">#define min_val </td> |
|
78 <td>(</td> |
|
79 <td class="paramtype">a, <tr> |
|
80 <td class="paramkey"></td> |
|
81 <td></td> |
|
82 <td class="paramtype">b </td> |
|
83 <td class="paramname"> </td> |
|
84 <td> ) </td> |
|
85 <td width="100%"> ((a<b)?a:b)</td> |
|
86 </tr> |
|
87 </table> |
|
88 </div> |
|
89 <div class="memdoc"> |
|
90 |
|
91 <p> |
|
92 |
|
93 <p> |
|
94 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>. |
|
95 <p> |
|
96 Referenced by <a class="el" href="timer_8c-source.html#l00131">TimeDispatch()</a>. |
|
97 </div> |
|
98 </div><p> |
|
99 <hr><h2>Function Documentation</h2> |
|
100 <a class="anchor" name="12fe6467e1df03cc40dd6f76123c99f6"></a><!-- doxytag: member="timer.c::DelAlarm" ref="12fe6467e1df03cc40dd6f76123c99f6" args="(TIMER_HANDLE handle)" --> |
|
101 <div class="memitem"> |
|
102 <div class="memproto"> |
|
103 <table class="memname"> |
|
104 <tr> |
|
105 <td class="memname">TIMER_HANDLE DelAlarm </td> |
|
106 <td>(</td> |
|
107 <td class="paramtype">TIMER_HANDLE </td> |
|
108 <td class="paramname"> <em>handle</em> </td> |
|
109 <td> ) </td> |
|
110 <td width="100%"></td> |
|
111 </tr> |
|
112 </table> |
|
113 </div> |
|
114 <div class="memdoc"> |
|
115 |
|
116 <p> |
|
117 ----- Use this to remove an alarm ----<p> |
|
118 <dl compact><dt><b>Parameters:</b></dt><dd> |
|
119 <table border="0" cellspacing="2" cellpadding="0"> |
|
120 <tr><td valign="top"></td><td valign="top"><em>handle</em> </td><td></td></tr> |
|
121 </table> |
|
122 </dl> |
|
123 <dl class="return" compact><dt><b>Returns:</b></dt><dd></dd></dl> |
|
124 |
|
125 <p> |
|
126 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>. |
|
127 <p> |
|
128 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>. |
|
129 <p> |
|
130 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>. |
|
131 </div> |
|
132 </div><p> |
|
133 <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)" --> |
|
134 <div class="memitem"> |
|
135 <div class="memproto"> |
|
136 <table class="memname"> |
|
137 <tr> |
|
138 <td class="memname">TIMER_HANDLE SetAlarm </td> |
|
139 <td>(</td> |
|
140 <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> * </td> |
|
141 <td class="paramname"> <em>d</em>, </td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td class="paramkey"></td> |
|
145 <td></td> |
|
146 <td class="paramtype">UNS32 </td> |
|
147 <td class="paramname"> <em>id</em>, </td> |
|
148 </tr> |
|
149 <tr> |
|
150 <td class="paramkey"></td> |
|
151 <td></td> |
|
152 <td class="paramtype"><a class="el" href="timer_8h.html#c8436e7543fa1329b00e570246071313">TimerCallback_t</a> </td> |
|
153 <td class="paramname"> <em>callback</em>, </td> |
|
154 </tr> |
|
155 <tr> |
|
156 <td class="paramkey"></td> |
|
157 <td></td> |
|
158 <td class="paramtype">TIMEVAL </td> |
|
159 <td class="paramname"> <em>value</em>, </td> |
|
160 </tr> |
|
161 <tr> |
|
162 <td class="paramkey"></td> |
|
163 <td></td> |
|
164 <td class="paramtype">TIMEVAL </td> |
|
165 <td class="paramname"> <em>period</em></td><td> </td> |
|
166 </tr> |
|
167 <tr> |
|
168 <td></td> |
|
169 <td>)</td> |
|
170 <td></td><td></td><td width="100%"></td> |
|
171 </tr> |
|
172 </table> |
|
173 </div> |
|
174 <div class="memdoc"> |
|
175 |
|
176 <p> |
|
177 ------- Use this to declare a new alarm ------<p> |
|
178 <dl compact><dt><b>Parameters:</b></dt><dd> |
|
179 <table border="0" cellspacing="2" cellpadding="0"> |
|
180 <tr><td valign="top"></td><td valign="top"><em>d</em> </td><td></td></tr> |
|
181 <tr><td valign="top"></td><td valign="top"><em>id</em> </td><td></td></tr> |
|
182 <tr><td valign="top"></td><td valign="top"><em>callback</em> </td><td></td></tr> |
|
183 <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td></td></tr> |
|
184 <tr><td valign="top"></td><td valign="top"><em>period</em> </td><td></td></tr> |
|
185 </table> |
|
186 </dl> |
|
187 <dl class="return" compact><dt><b>Returns:</b></dt><dd></dd></dl> |
|
188 |
|
189 <p> |
|
190 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>. |
|
191 <p> |
|
192 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>. |
|
193 <p> |
|
194 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>. |
|
195 </div> |
|
196 </div><p> |
|
197 <a class="anchor" name="7a5a515821c2e4fb2f66bac72389da00"></a><!-- doxytag: member="timer.c::TimeDispatch" ref="7a5a515821c2e4fb2f66bac72389da00" args="()" --> |
|
198 <div class="memitem"> |
|
199 <div class="memproto"> |
|
200 <table class="memname"> |
|
201 <tr> |
|
202 <td class="memname">void TimeDispatch </td> |
|
203 <td>(</td> |
|
204 <td class="paramtype">void </td> |
|
205 <td class="paramname"> </td> |
|
206 <td> ) </td> |
|
207 <td width="100%"></td> |
|
208 </tr> |
|
209 </table> |
|
210 </div> |
|
211 <div class="memdoc"> |
|
212 |
|
213 <p> |
|
214 ------ TimeDispatch is called on each timer expiration ---- |
|
215 <p> |
|
216 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>. |
|
217 <p> |
|
218 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>. |
|
219 <p> |
|
220 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>. |
|
221 <p> |
|
222 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> |
|
223 <map name="timer_8c_7a5a515821c2e4fb2f66bac72389da00_cgraph_map"> |
|
224 <area href="canOpenDriver_8c.html#38b23a8ee3748bca3415967b90df1e15" shape="rect" coords="153,5,260,32" alt=""> |
|
225 </map> |
|
226 |
|
227 </div> |
|
228 </div><p> |
|
229 <hr><h2>Variable Documentation</h2> |
|
230 <a class="anchor" name="4afd63ff2f23fe7cd60f0d82e78c4426"></a><!-- doxytag: member="timer.c::last_timer_raw" ref="4afd63ff2f23fe7cd60f0d82e78c4426" args="" --> |
|
231 <div class="memitem"> |
|
232 <div class="memproto"> |
|
233 <table class="memname"> |
|
234 <tr> |
|
235 <td class="memname">TIMER_HANDLE <a class="el" href="timer_8c.html#4afd63ff2f23fe7cd60f0d82e78c4426">last_timer_raw</a> = -1 </td> |
|
236 </tr> |
|
237 </table> |
|
238 </div> |
|
239 <div class="memdoc"> |
|
240 |
|
241 <p> |
|
242 |
|
243 <p> |
|
244 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>. |
|
245 <p> |
|
246 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>. |
|
247 </div> |
|
248 </div><p> |
|
249 <a class="anchor" name="adb4c8d5876b377463d33bdeda56b575"></a><!-- doxytag: member="timer.c::timers" ref="adb4c8d5876b377463d33bdeda56b575" args="[MAX_NB_TIMER]" --> |
|
250 <div class="memitem"> |
|
251 <div class="memproto"> |
|
252 <table class="memname"> |
|
253 <tr> |
|
254 <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> |
|
255 </tr> |
|
256 </table> |
|
257 </div> |
|
258 <div class="memdoc"> |
|
259 |
|
260 <p> |
|
261 |
|
262 <p> |
|
263 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>. |
|
264 <p> |
|
265 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>. |
|
266 </div> |
|
267 </div><p> |
|
268 <a class="anchor" name="242986a224c5a02d6341dd5bfdf71008"></a><!-- doxytag: member="timer.c::total_sleep_time" ref="242986a224c5a02d6341dd5bfdf71008" args="" --> |
|
269 <div class="memitem"> |
|
270 <div class="memproto"> |
|
271 <table class="memname"> |
|
272 <tr> |
|
273 <td class="memname">TIMEVAL <a class="el" href="timer_8c.html#242986a224c5a02d6341dd5bfdf71008">total_sleep_time</a> = TIMEVAL_MAX </td> |
|
274 </tr> |
|
275 </table> |
|
276 </div> |
|
277 <div class="memdoc"> |
|
278 |
|
279 <p> |
|
280 |
|
281 <p> |
|
282 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>. |
|
283 <p> |
|
284 Referenced by <a class="el" href="timer_8c-source.html#l00131">TimeDispatch()</a>. |
|
285 </div> |
|
286 </div><p> |
|
287 <hr size="1"><address style="align: right;"><small>Generated on Mon Jul 2 19:10:42 2007 for CanFestival by |
|
288 <a href="http://www.doxygen.org/index.html"> |
|
289 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> |
|
290 </body> |
|
291 </html> |
|