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/include/sync.h File Reference</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
5 <link href="tabs.css" rel="stylesheet" type="text/css">
7 <!-- Generated by Doxygen 1.5.1 -->
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>
17 <li><a href="files.html"><span>File List</span></a></li>
18 <li><a href="globals.html"><span>Globals</span></a></li>
20 <h1>/home/epimerde/documents/tc11/CanFestival-3/include/sync.h File Reference</h1>
22 <a href="sync_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
24 <tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
25 <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*) </td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#8a0b5b8c19b375ef1c985caa120f3274">post_sync_t</a> (void)</td></tr>
27 <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*) </td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#b9bc4632750ad12f918aa22a1eb7756b">post_TPDO_t</a> (void)</td></tr>
29 <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
30 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#2e0bf669f5b40dfbdda0f12a5ae3631a">startSYNC</a> (<a class="el" href="structstruct__CO__Data.html">CO_Data</a> *d)</td></tr>
32 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#41c47dbd59d22bf9bab6cd288cf27164">stopSYNC</a> (<a class="el" href="structstruct__CO__Data.html">CO_Data</a> *d)</td></tr>
34 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#1da155dcbd7fa1271216d74a15e30490">_post_sync</a> (void)</td></tr>
36 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#1fdf94721303f1c60bb2de1a36b13cc4">_post_TPDO</a> (void)</td></tr>
38 <tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8 </td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#0bcc501eb14c12365ffbaa3453905b50">sendSYNC</a> (<a class="el" href="structstruct__CO__Data.html">CO_Data</a> *d, UNS32 cob_id)</td></tr>
40 <tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8 </td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#80cadcba23dc859db8a8d3f52789d6d1">proceedSYNC</a> (<a class="el" href="structstruct__CO__Data.html">CO_Data</a> *d, <a class="el" href="structMessage.html">Message</a> *m)</td></tr>
43 <hr><h2>Typedef Documentation</h2>
44 <a class="anchor" name="8a0b5b8c19b375ef1c985caa120f3274"></a><!-- doxytag: member="sync.h::post_sync_t" ref="8a0b5b8c19b375ef1c985caa120f3274" args="(void)" -->
46 <div class="memproto">
47 <table class="memname">
49 <td class="memname">typedef void(*) <a class="el" href="sync_8h.html#8a0b5b8c19b375ef1c985caa120f3274">post_sync_t</a>(void) </td>
58 Definition at line <a class="el" href="sync_8h-source.html#l00030">30</a> of file <a class="el" href="sync_8h-source.html">sync.h</a>.
61 <a class="anchor" name="b9bc4632750ad12f918aa22a1eb7756b"></a><!-- doxytag: member="sync.h::post_TPDO_t" ref="b9bc4632750ad12f918aa22a1eb7756b" args="(void)" -->
63 <div class="memproto">
64 <table class="memname">
66 <td class="memname">typedef void(*) <a class="el" href="sync_8h.html#b9bc4632750ad12f918aa22a1eb7756b">post_TPDO_t</a>(void) </td>
75 Definition at line <a class="el" href="sync_8h-source.html#l00033">33</a> of file <a class="el" href="sync_8h-source.html">sync.h</a>.
78 <hr><h2>Function Documentation</h2>
79 <a class="anchor" name="1da155dcbd7fa1271216d74a15e30490"></a><!-- doxytag: member="sync.h::_post_sync" ref="1da155dcbd7fa1271216d74a15e30490" args="(void)" -->
81 <div class="memproto">
82 <table class="memname">
84 <td class="memname">void _post_sync </td>
86 <td class="paramtype">void </td>
87 <td class="paramname"> </td>
88 <td> ) </td>
89 <td width="100%"></td>
98 Definition at line <a class="el" href="sync_8c-source.html#l00245">245</a> of file <a class="el" href="sync_8c-source.html">sync.c</a>.
101 <a class="anchor" name="1fdf94721303f1c60bb2de1a36b13cc4"></a><!-- doxytag: member="sync.h::_post_TPDO" ref="1fdf94721303f1c60bb2de1a36b13cc4" args="(void)" -->
102 <div class="memitem">
103 <div class="memproto">
104 <table class="memname">
106 <td class="memname">void _post_TPDO </td>
108 <td class="paramtype">void </td>
109 <td class="paramname"> </td>
110 <td> ) </td>
111 <td width="100%"></td>
120 Definition at line <a class="el" href="sync_8c-source.html#l00246">246</a> of file <a class="el" href="sync_8c-source.html">sync.c</a>.
123 <a class="anchor" name="80cadcba23dc859db8a8d3f52789d6d1"></a><!-- doxytag: member="sync.h::proceedSYNC" ref="80cadcba23dc859db8a8d3f52789d6d1" args="(CO_Data *d, Message *m)" -->
124 <div class="memitem">
125 <div class="memproto">
126 <table class="memname">
128 <td class="memname">UNS8 proceedSYNC </td>
130 <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> * </td>
131 <td class="paramname"> <em>d</em>, </td>
134 <td class="paramkey"></td>
136 <td class="paramtype"><a class="el" href="structMessage.html">Message</a> * </td>
137 <td class="paramname"> <em>m</em></td><td> </td>
142 <td></td><td></td><td width="100%"></td>
149 This function is called when the node is receiving a SYNC message (cob-id = 0x80). What does the function : check if the node is in OERATIONAL mode. (other mode : return 0 but does nothing). Get the SYNC cobId by reading the dictionary index 1005. (Return -1 if it does not correspond to the cobId received). Scan the dictionary from index 0x1800 to the last PDO defined (dict_cstes.max_count_of_PDO_transmit) for each PDO whose transmission type is on synchro (transmission type < 241) and if the msg must be send at this SYNC. read the COBID. Verify that the nodeId inside the nodeId correspond to bDeviceNodeId. (Assume that the cobId of a PDO Transmit is made with the node id of the node who transmit), get the mapping, launch PDOmGR to send the PDO *m is a pointer to the message received bus_id is hardware dependant return 0 if OK, 0xFF if error
151 Definition at line <a class="el" href="sync_8c-source.html#l00093">93</a> of file <a class="el" href="sync_8c-source.html">sync.c</a>.
153 References <a class="el" href="objdictdef_8h-source.html#l00108">td_indextable::bSubCount</a>, <a class="el" href="pdo_8c-source.html#l00376">CopyBits()</a>, <a class="el" href="pdo_8h-source.html#l00033">struct_s_process_var::count</a>, <a class="el" href="data_8h-source.html#l00049">struct_CO_Data::count_sync</a>, <a class="el" href="timer_8h-source.html#l00045">struct_s_timer_entry::d</a>, <a class="el" href="pdo_8h-source.html#l00037">struct_s_process_var::data</a>, <a class="el" href="data_8h-source.html#l00050">struct_CO_Data::firstIndex</a>, <a class="el" href="objacces_8c-source.html#l00145">getODentry()</a>, <a class="el" href="data_8h-source.html#l00051">struct_CO_Data::lastIndex</a>, <a class="el" href="hcs12_2applicfg_8h-source.html#l00177">MSG_ERR</a>, <a class="el" href="hcs12_2applicfg_8h-source.html#l00190">MSG_WAR</a>, <a class="el" href="data_8h-source.html#l00061">struct_CO_Data::nodeState</a>, <a class="el" href="data_8h-source.html#l00048">struct_CO_Data::objdict</a>, <a class="el" href="def_8h-source.html#l00031">OD_SUCCESSFUL</a>, <a class="el" href="states_8h.html#3136d2815abe9d284f985e0a7ec68646a80594b1522cb686b981f56bbec45124">Operational</a>, <a class="el" href="objdictdef_8h-source.html#l00120">s_quick_index::PDO_TRS</a>, <a class="el" href="objdictdef_8h-source.html#l00121">s_quick_index::PDO_TRS_MAP</a>, <a class="el" href="pdo_8c-source.html#l00061">PDOmGR()</a>, <a class="el" href="objdictdef_8h-source.html#l00100">td_subindex::pObject</a>, <a class="el" href="data_8h-source.html#l00082">struct_CO_Data::post_sync</a>, <a class="el" href="data_8h-source.html#l00083">struct_CO_Data::post_TPDO</a>, <a class="el" href="data_8h-source.html#l00086">struct_CO_Data::process_var</a>, <a class="el" href="objdictdef_8h-source.html#l00107">td_indextable::pSubindex</a>, <a class="el" href="def_8h-source.html#l00122">state10</a>, <a class="el" href="def_8h-source.html#l00123">state11</a>, <a class="el" href="def_8h-source.html#l00115">state3</a>, <a class="el" href="def_8h-source.html#l00116">state4</a>, <a class="el" href="def_8h-source.html#l00117">state5</a>, <a class="el" href="def_8h-source.html#l00119">state7</a>, <a class="el" href="def_8h-source.html#l00120">state8</a>, <a class="el" href="def_8h-source.html#l00121">state9</a>, <a class="el" href="objdictdef_8h-source.html#l00077">TRANS_SYNC_MAX</a>, <a class="el" href="objdictdef_8h-source.html#l00076">TRANS_SYNC_MIN</a>, <a class="el" href="hcs12_2applicfg_8h-source.html#l00140">UNS16</a>, <a class="el" href="hcs12_2applicfg_8h-source.html#l00141">UNS32</a>, and <a class="el" href="hcs12_2applicfg_8h-source.html#l00139">UNS8</a>.
156 <a class="anchor" name="0bcc501eb14c12365ffbaa3453905b50"></a><!-- doxytag: member="sync.h::sendSYNC" ref="0bcc501eb14c12365ffbaa3453905b50" args="(CO_Data *d, UNS32 cob_id)" -->
157 <div class="memitem">
158 <div class="memproto">
159 <table class="memname">
161 <td class="memname">UNS8 sendSYNC </td>
163 <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> * </td>
164 <td class="paramname"> <em>d</em>, </td>
167 <td class="paramkey"></td>
169 <td class="paramtype">UNS32 </td>
170 <td class="paramname"> <em>cob_id</em></td><td> </td>
175 <td></td><td></td><td width="100%"></td>
182 transmit a SYNC message on the bus number bus_id bus_id is hardware dependant return canSend(bus_id,&m)
184 Definition at line <a class="el" href="sync_8c-source.html#l00077">77</a> of file <a class="el" href="sync_8c-source.html">sync.c</a>.
186 References <a class="el" href="data_8h-source.html#l00090">struct_CO_Data::canHandle</a>, <a class="el" href="canOpenDriver_8c-source.html#l00505">canSend()</a>, <a class="el" href="can_8h-source.html#l00042">Message::cob_id</a>, <a class="el" href="timer_8h-source.html#l00045">struct_s_timer_entry::d</a>, <a class="el" href="can_8h-source.html#l00045">Message::len</a>, <a class="el" href="hcs12_2applicfg_8h-source.html#l00190">MSG_WAR</a>, <a class="el" href="def_8h-source.html#l00055">NOT_A_REQUEST</a>, <a class="el" href="sync_8c-source.html#l00093">proceedSYNC()</a>, <a class="el" href="can_8h-source.html#l00043">Message::rtr</a>, <a class="el" href="hcs12_2applicfg_8h-source.html#l00139">UNS8</a>, and <a class="el" href="can_8h-source.html#l00036">SHORT_CAN::w</a>.
189 <a class="anchor" name="2e0bf669f5b40dfbdda0f12a5ae3631a"></a><!-- doxytag: member="sync.h::startSYNC" ref="2e0bf669f5b40dfbdda0f12a5ae3631a" args="(CO_Data *d)" -->
190 <div class="memitem">
191 <div class="memproto">
192 <table class="memname">
194 <td class="memname">void startSYNC </td>
196 <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> * </td>
197 <td class="paramname"> <em>d</em> </td>
198 <td> ) </td>
199 <td width="100%"></td>
208 Definition at line <a class="el" href="sync_8c-source.html#l00050">50</a> of file <a class="el" href="sync_8c-source.html">sync.c</a>.
210 References <a class="el" href="data_8h-source.html#l00079">struct_CO_Data::COB_ID_Sync</a>, <a class="el" href="timer_8h-source.html#l00045">struct_s_timer_entry::d</a>, <a class="el" href="sync_8c-source.html#l00043">OnCOB_ID_SyncUpdate()</a>, <a class="el" href="objacces_8c-source.html#l00297">RegisterSetODentryCallBack()</a>, <a class="el" href="timer_8c-source.html#l00038">SetAlarm()</a>, <a class="el" href="sync_8c-source.html#l00071">stopSYNC()</a>, <a class="el" href="data_8h-source.html#l00080">struct_CO_Data::Sync_Cycle_Period</a>, <a class="el" href="sync_8c-source.html#l00036">SyncAlarm()</a>, <a class="el" href="data_8h-source.html#l00078">struct_CO_Data::syncTimer</a>, and <a class="el" href="hcs12_2applicfg_8h-source.html#l00157">US_TO_TIMEVAL</a>.
213 <a class="anchor" name="41c47dbd59d22bf9bab6cd288cf27164"></a><!-- doxytag: member="sync.h::stopSYNC" ref="41c47dbd59d22bf9bab6cd288cf27164" args="(CO_Data *d)" -->
214 <div class="memitem">
215 <div class="memproto">
216 <table class="memname">
218 <td class="memname">void stopSYNC </td>
220 <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> * </td>
221 <td class="paramname"> <em>d</em> </td>
222 <td> ) </td>
223 <td width="100%"></td>
232 Definition at line <a class="el" href="sync_8c-source.html#l00071">71</a> of file <a class="el" href="sync_8c-source.html">sync.c</a>.
234 References <a class="el" href="timer_8h-source.html#l00045">struct_s_timer_entry::d</a>, <a class="el" href="timer_8c-source.html#l00087">DelAlarm()</a>, and <a class="el" href="data_8h-source.html#l00078">struct_CO_Data::syncTimer</a>.
237 <hr size="1"><address style="align: right;"><small>Generated on Mon Jun 4 16:29:07 2007 for CanFestival by
238 <a href="http://www.doxygen.org/index.html">
239 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>