|
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: /home/epimerde/documents/tc11/CanFestival-3/drivers/unix/unix.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="namespaces.html"><span>Namespaces</span></a></li> |
|
12 <li><a href="annotated.html"><span>Data Structures</span></a></li> |
|
13 <li id="current"><a href="files.html"><span>Files</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 <h1>/home/epimerde/documents/tc11/CanFestival-3/drivers/unix/unix.c File Reference</h1><code>#include <unistd.h></code><br> |
|
21 <code>#include <stdio.h></code><br> |
|
22 <code>#include <stdlib.h></code><br> |
|
23 <code>#include "<a class="el" href="data_8h-source.html">data.h</a>"</code><br> |
|
24 <code>#include "<a class="el" href="win32_2canfestival_8h-source.html">canfestival.h</a>"</code><br> |
|
25 <code>#include "<a class="el" href="timers__driver_8h-source.html">timers_driver.h</a>"</code><br> |
|
26 <code>#include "<a class="el" href="can__driver_8h-source.html">can_driver.h</a>"</code><br> |
|
27 |
|
28 <p> |
|
29 <a href="unix_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> |
|
30 <tr><td></td></tr> |
|
31 <tr><td colspan="2"><br><h2>Data Structures</h2></td></tr> |
|
32 <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structCANPort.html">CANPort</a></td></tr> |
|
33 |
|
34 <tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
|
35 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="unix_8c.html#74c6a27b44fd54de5cb021299ffce612">DLL_CALL</a>(funcname) (* funcname##_driver)</td></tr> |
|
36 |
|
37 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="unix_8c.html#7f7ce94bf48fde67f4af7b64c7ca4c85">FCT_PTR_INIT</a> =NULL</td></tr> |
|
38 |
|
39 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="unix_8c.html#2af8b26c5600696a026aa95fe49b9dc9">DLSYM</a>(name)</td></tr> |
|
40 |
|
41 <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="unix_8c.html#c2f10bc5b98269f33af8a74299236e03">MAX_NB_CAN_PORTS</a> 16</td></tr> |
|
42 |
|
43 <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
|
44 <tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8 </td><td class="memItemRight" valign="bottom"><a class="el" href="unix_8c.html#cb4f394ec0e040c5962d3dc1957505fb">UnLoadCanDriver</a> (<a class="el" href="win32_2canfestival_8h.html#c4a0f44120dee396ab6bb57e23effaa8">LIB_HANDLE</a> handle)</td></tr> |
|
45 |
|
46 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="win32_2canfestival_8h.html#c4a0f44120dee396ab6bb57e23effaa8">LIB_HANDLE</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unix_8c.html#a6eed61fc15f41f772d4645d7a5edeb5">LoadCanDriver</a> (char *driver_name)</td></tr> |
|
47 |
|
48 <tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8 </td><td class="memItemRight" valign="bottom"><a class="el" href="unix_8c.html#8d1909a09c50c750e4d8626595acd9f6">canSend</a> (<a class="el" href="win32_2applicfg_8h.html#7ef59f941603c6680e74fc335523f17e">CAN_PORT</a> port, <a class="el" href="structMessage.html">Message</a> *m)</td></tr> |
|
49 |
|
50 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="unix_8c.html#45ceca3727c2fb7ac93958a215efb827">canReceiveLoop</a> (<a class="el" href="win32_2applicfg_8h.html#7ef59f941603c6680e74fc335523f17e">CAN_PORT</a> port)</td></tr> |
|
51 |
|
52 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="win32_2applicfg_8h.html#7ef59f941603c6680e74fc335523f17e">CAN_PORT</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unix_8c.html#7476146ad15948a22e7f80a00c89c40a">canOpen</a> (<a class="el" href="structstruct__s__BOARD.html">s_BOARD</a> *board, <a class="el" href="structstruct__CO__Data.html">CO_Data</a> *d)</td></tr> |
|
53 |
|
54 <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="unix_8c.html#02957f72a9b951603adb98a142bd447b">canClose</a> (<a class="el" href="structstruct__CO__Data.html">CO_Data</a> *d)</td></tr> |
|
55 |
|
56 <tr><td colspan="2"><br><h2>Variables</h2></td></tr> |
|
57 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structCANPort.html">CANPort</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="unix_8c.html#0b740cf913752262ceb23d51648da86a">canports</a> [MAX_NB_CAN_PORTS] = {{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,}}</td></tr> |
|
58 |
|
59 </table> |
|
60 <hr><h2>Define Documentation</h2> |
|
61 <a class="anchor" name="74c6a27b44fd54de5cb021299ffce612"></a><!-- doxytag: member="unix.c::DLL_CALL" ref="74c6a27b44fd54de5cb021299ffce612" args="(funcname)" --> |
|
62 <div class="memitem"> |
|
63 <div class="memproto"> |
|
64 <table class="memname"> |
|
65 <tr> |
|
66 <td class="memname">#define DLL_CALL </td> |
|
67 <td>(</td> |
|
68 <td class="paramtype">funcname </td> |
|
69 <td class="paramname"> </td> |
|
70 <td> ) </td> |
|
71 <td width="100%"> (* funcname##_driver)</td> |
|
72 </tr> |
|
73 </table> |
|
74 </div> |
|
75 <div class="memdoc"> |
|
76 |
|
77 <p> |
|
78 |
|
79 <p> |
|
80 Definition at line <a class="el" href="unix_8c-source.html#l00027">27</a> of file <a class="el" href="unix_8c-source.html">unix.c</a>. |
|
81 </div> |
|
82 </div><p> |
|
83 <a class="anchor" name="2af8b26c5600696a026aa95fe49b9dc9"></a><!-- doxytag: member="unix.c::DLSYM" ref="2af8b26c5600696a026aa95fe49b9dc9" args="(name)" --> |
|
84 <div class="memitem"> |
|
85 <div class="memproto"> |
|
86 <table class="memname"> |
|
87 <tr> |
|
88 <td class="memname">#define DLSYM </td> |
|
89 <td>(</td> |
|
90 <td class="paramtype">name </td> |
|
91 <td class="paramname"> </td> |
|
92 <td> ) </td> |
|
93 <td width="100%"></td> |
|
94 </tr> |
|
95 </table> |
|
96 </div> |
|
97 <div class="memdoc"> |
|
98 |
|
99 <p> |
|
100 <b>Value:</b><div class="fragment"><pre class="fragment">*(<span class="keywordtype">void</span> **) (&name##_driver) = dlsym(handle, #name<span class="stringliteral">"_driver"</span>);\ |
|
101 <span class="keywordflow">if</span> ((error = dlerror()) != NULL) {\ |
|
102 fprintf (stderr, <span class="stringliteral">"%s\n"</span>, error);\ |
|
103 <a class="code" href="unix_8c.html#cb4f394ec0e040c5962d3dc1957505fb">UnLoadCanDriver</a>(handle);\ |
|
104 <span class="keywordflow">return</span> NULL;\ |
|
105 } |
|
106 </pre></div> |
|
107 <p> |
|
108 Definition at line <a class="el" href="unix_8c-source.html#l00030">30</a> of file <a class="el" href="unix_8c-source.html">unix.c</a>. |
|
109 </div> |
|
110 </div><p> |
|
111 <a class="anchor" name="7f7ce94bf48fde67f4af7b64c7ca4c85"></a><!-- doxytag: member="unix.c::FCT_PTR_INIT" ref="7f7ce94bf48fde67f4af7b64c7ca4c85" args="" --> |
|
112 <div class="memitem"> |
|
113 <div class="memproto"> |
|
114 <table class="memname"> |
|
115 <tr> |
|
116 <td class="memname">#define FCT_PTR_INIT =NULL </td> |
|
117 </tr> |
|
118 </table> |
|
119 </div> |
|
120 <div class="memdoc"> |
|
121 |
|
122 <p> |
|
123 |
|
124 <p> |
|
125 Definition at line <a class="el" href="unix_8c-source.html#l00028">28</a> of file <a class="el" href="unix_8c-source.html">unix.c</a>. |
|
126 </div> |
|
127 </div><p> |
|
128 <a class="anchor" name="c2f10bc5b98269f33af8a74299236e03"></a><!-- doxytag: member="unix.c::MAX_NB_CAN_PORTS" ref="c2f10bc5b98269f33af8a74299236e03" args="" --> |
|
129 <div class="memitem"> |
|
130 <div class="memproto"> |
|
131 <table class="memname"> |
|
132 <tr> |
|
133 <td class="memname">#define MAX_NB_CAN_PORTS 16 </td> |
|
134 </tr> |
|
135 </table> |
|
136 </div> |
|
137 <div class="memdoc"> |
|
138 |
|
139 <p> |
|
140 |
|
141 <p> |
|
142 Definition at line <a class="el" href="unix_8c-source.html#l00049">49</a> of file <a class="el" href="unix_8c-source.html">unix.c</a>. |
|
143 </div> |
|
144 </div><p> |
|
145 <hr><h2>Function Documentation</h2> |
|
146 <a class="anchor" name="02957f72a9b951603adb98a142bd447b"></a><!-- doxytag: member="unix.c::canClose" ref="02957f72a9b951603adb98a142bd447b" args="(CO_Data *d)" --> |
|
147 <div class="memitem"> |
|
148 <div class="memproto"> |
|
149 <table class="memname"> |
|
150 <tr> |
|
151 <td class="memname">int canClose </td> |
|
152 <td>(</td> |
|
153 <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> * </td> |
|
154 <td class="paramname"> <em>d</em> </td> |
|
155 <td> ) </td> |
|
156 <td width="100%"></td> |
|
157 </tr> |
|
158 </table> |
|
159 </div> |
|
160 <div class="memdoc"> |
|
161 |
|
162 <p> |
|
163 |
|
164 <p> |
|
165 Definition at line <a class="el" href="unix_8c-source.html#l00178">178</a> of file <a class="el" href="unix_8c-source.html">unix.c</a>. |
|
166 </div> |
|
167 </div><p> |
|
168 <a class="anchor" name="7476146ad15948a22e7f80a00c89c40a"></a><!-- doxytag: member="unix.c::canOpen" ref="7476146ad15948a22e7f80a00c89c40a" args="(s_BOARD *board, CO_Data *d)" --> |
|
169 <div class="memitem"> |
|
170 <div class="memproto"> |
|
171 <table class="memname"> |
|
172 <tr> |
|
173 <td class="memname"><a class="el" href="win32_2applicfg_8h.html#7ef59f941603c6680e74fc335523f17e">CAN_PORT</a> canOpen </td> |
|
174 <td>(</td> |
|
175 <td class="paramtype"><a class="el" href="structstruct__s__BOARD.html">s_BOARD</a> * </td> |
|
176 <td class="paramname"> <em>board</em>, </td> |
|
177 </tr> |
|
178 <tr> |
|
179 <td class="paramkey"></td> |
|
180 <td></td> |
|
181 <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> * </td> |
|
182 <td class="paramname"> <em>d</em></td><td> </td> |
|
183 </tr> |
|
184 <tr> |
|
185 <td></td> |
|
186 <td>)</td> |
|
187 <td></td><td></td><td width="100%"></td> |
|
188 </tr> |
|
189 </table> |
|
190 </div> |
|
191 <div class="memdoc"> |
|
192 |
|
193 <p> |
|
194 |
|
195 <p> |
|
196 Definition at line <a class="el" href="unix_8c-source.html#l00145">145</a> of file <a class="el" href="unix_8c-source.html">unix.c</a>. |
|
197 </div> |
|
198 </div><p> |
|
199 <a class="anchor" name="45ceca3727c2fb7ac93958a215efb827"></a><!-- doxytag: member="unix.c::canReceiveLoop" ref="45ceca3727c2fb7ac93958a215efb827" args="(CAN_PORT port)" --> |
|
200 <div class="memitem"> |
|
201 <div class="memproto"> |
|
202 <table class="memname"> |
|
203 <tr> |
|
204 <td class="memname">void canReceiveLoop </td> |
|
205 <td>(</td> |
|
206 <td class="paramtype"><a class="el" href="win32_2applicfg_8h.html#7ef59f941603c6680e74fc335523f17e">CAN_PORT</a> </td> |
|
207 <td class="paramname"> <em>port</em> </td> |
|
208 <td> ) </td> |
|
209 <td width="100%"></td> |
|
210 </tr> |
|
211 </table> |
|
212 </div> |
|
213 <div class="memdoc"> |
|
214 |
|
215 <p> |
|
216 |
|
217 <p> |
|
218 Definition at line <a class="el" href="unix_8c-source.html#l00132">132</a> of file <a class="el" href="unix_8c-source.html">unix.c</a>. |
|
219 <p> |
|
220 References <a class="el" href="states_8c-source.html#l00039">canDispatch()</a>, <a class="el" href="drivers__win32_8cpp-source.html#l00124">canReceive()</a>, <a class="el" href="unix_8c-source.html#l00027">DLL_CALL</a>, <a class="el" href="timers__unix_8c-source.html#l00020">EnterMutex()</a>, and <a class="el" href="timers__unix_8c-source.html#l00025">LeaveMutex()</a>. |
|
221 </div> |
|
222 </div><p> |
|
223 <a class="anchor" name="8d1909a09c50c750e4d8626595acd9f6"></a><!-- doxytag: member="unix.c::canSend" ref="8d1909a09c50c750e4d8626595acd9f6" args="(CAN_PORT port, Message *m)" --> |
|
224 <div class="memitem"> |
|
225 <div class="memproto"> |
|
226 <table class="memname"> |
|
227 <tr> |
|
228 <td class="memname">UNS8 canSend </td> |
|
229 <td>(</td> |
|
230 <td class="paramtype"><a class="el" href="win32_2applicfg_8h.html#7ef59f941603c6680e74fc335523f17e">CAN_PORT</a> </td> |
|
231 <td class="paramname"> <em>port</em>, </td> |
|
232 </tr> |
|
233 <tr> |
|
234 <td class="paramkey"></td> |
|
235 <td></td> |
|
236 <td class="paramtype"><a class="el" href="structMessage.html">Message</a> * </td> |
|
237 <td class="paramname"> <em>m</em></td><td> </td> |
|
238 </tr> |
|
239 <tr> |
|
240 <td></td> |
|
241 <td>)</td> |
|
242 <td></td><td></td><td width="100%"></td> |
|
243 </tr> |
|
244 </table> |
|
245 </div> |
|
246 <div class="memdoc"> |
|
247 |
|
248 <p> |
|
249 |
|
250 <p> |
|
251 Definition at line <a class="el" href="unix_8c-source.html#l00120">120</a> of file <a class="el" href="unix_8c-source.html">unix.c</a>. |
|
252 </div> |
|
253 </div><p> |
|
254 <a class="anchor" name="a6eed61fc15f41f772d4645d7a5edeb5"></a><!-- doxytag: member="unix.c::LoadCanDriver" ref="a6eed61fc15f41f772d4645d7a5edeb5" args="(char *driver_name)" --> |
|
255 <div class="memitem"> |
|
256 <div class="memproto"> |
|
257 <table class="memname"> |
|
258 <tr> |
|
259 <td class="memname"><a class="el" href="win32_2canfestival_8h.html#c4a0f44120dee396ab6bb57e23effaa8">LIB_HANDLE</a> LoadCanDriver </td> |
|
260 <td>(</td> |
|
261 <td class="paramtype">char * </td> |
|
262 <td class="paramname"> <em>driver_name</em> </td> |
|
263 <td> ) </td> |
|
264 <td width="100%"></td> |
|
265 </tr> |
|
266 </table> |
|
267 </div> |
|
268 <div class="memdoc"> |
|
269 |
|
270 <p> |
|
271 |
|
272 <p> |
|
273 Definition at line <a class="el" href="unix_8c-source.html#l00084">84</a> of file <a class="el" href="unix_8c-source.html">unix.c</a>. |
|
274 </div> |
|
275 </div><p> |
|
276 <a class="anchor" name="cb4f394ec0e040c5962d3dc1957505fb"></a><!-- doxytag: member="unix.c::UnLoadCanDriver" ref="cb4f394ec0e040c5962d3dc1957505fb" args="(LIB_HANDLE handle)" --> |
|
277 <div class="memitem"> |
|
278 <div class="memproto"> |
|
279 <table class="memname"> |
|
280 <tr> |
|
281 <td class="memname">UNS8 UnLoadCanDriver </td> |
|
282 <td>(</td> |
|
283 <td class="paramtype"><a class="el" href="win32_2canfestival_8h.html#c4a0f44120dee396ab6bb57e23effaa8">LIB_HANDLE</a> </td> |
|
284 <td class="paramname"> <em>handle</em> </td> |
|
285 <td> ) </td> |
|
286 <td width="100%"></td> |
|
287 </tr> |
|
288 </table> |
|
289 </div> |
|
290 <div class="memdoc"> |
|
291 |
|
292 <p> |
|
293 |
|
294 <p> |
|
295 Definition at line <a class="el" href="unix_8c-source.html#l00071">71</a> of file <a class="el" href="unix_8c-source.html">unix.c</a>. |
|
296 </div> |
|
297 </div><p> |
|
298 <hr><h2>Variable Documentation</h2> |
|
299 <a class="anchor" name="0b740cf913752262ceb23d51648da86a"></a><!-- doxytag: member="unix.c::canports" ref="0b740cf913752262ceb23d51648da86a" args="[MAX_NB_CAN_PORTS]" --> |
|
300 <div class="memitem"> |
|
301 <div class="memproto"> |
|
302 <table class="memname"> |
|
303 <tr> |
|
304 <td class="memname"><a class="el" href="structCANPort.html">CANPort</a> <a class="el" href="unix_8c.html#0b740cf913752262ceb23d51648da86a">canports</a>[MAX_NB_CAN_PORTS] = {{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,},{0,}} </td> |
|
305 </tr> |
|
306 </table> |
|
307 </div> |
|
308 <div class="memdoc"> |
|
309 |
|
310 <p> |
|
311 |
|
312 <p> |
|
313 Definition at line <a class="el" href="unix_8c-source.html#l00066">66</a> of file <a class="el" href="unix_8c-source.html">unix.c</a>. |
|
314 </div> |
|
315 </div><p> |
|
316 <hr size="1"><address style="align: right;"><small>Generated on Mon Jun 4 16:29:07 2007 for CanFestival by |
|
317 <a href="http://www.doxygen.org/index.html"> |
|
318 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> |
|
319 </body> |
|
320 </html> |