doc/doxygen/html/sync_8h.html
changeset 210 6b5a4c21e061
parent 209 2cb34a4ac65a
child 211 2a4c2ca03555
equal deleted inserted replaced
209:2cb34a4ac65a 210:6b5a4c21e061
     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">
       
     6 </head><body>
       
     7 <!-- Generated by Doxygen 1.5.1 -->
       
     8 <div class="tabs">
       
     9   <ul>
       
    10     <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
       
    11     <li><a href="namespaces.html"><span>Namespaces</span></a></li>
       
    12     <li><a href="annotated.html"><span>Data&nbsp;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&nbsp;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/include/sync.h File Reference</h1>
       
    21 <p>
       
    22 <a href="sync_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
       
    23 <tr><td></td></tr>
       
    24 <tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
       
    25 <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*)&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#8a0b5b8c19b375ef1c985caa120f3274">post_sync_t</a> (void)</td></tr>
       
    26 
       
    27 <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*)&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#b9bc4632750ad12f918aa22a1eb7756b">post_TPDO_t</a> (void)</td></tr>
       
    28 
       
    29 <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
       
    30 <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</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>
       
    31 
       
    32 <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</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>
       
    33 
       
    34 <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#1da155dcbd7fa1271216d74a15e30490">_post_sync</a> (void)</td></tr>
       
    35 
       
    36 <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="sync_8h.html#1fdf94721303f1c60bb2de1a36b13cc4">_post_TPDO</a> (void)</td></tr>
       
    37 
       
    38 <tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8&nbsp;</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>
       
    39 
       
    40 <tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8&nbsp;</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>
       
    41 
       
    42 </table>
       
    43 <hr><h2>Typedef Documentation</h2>
       
    44 <a class="anchor" name="8a0b5b8c19b375ef1c985caa120f3274"></a><!-- doxytag: member="sync.h::post_sync_t" ref="8a0b5b8c19b375ef1c985caa120f3274" args="(void)" -->
       
    45 <div class="memitem">
       
    46 <div class="memproto">
       
    47       <table class="memname">
       
    48         <tr>
       
    49           <td class="memname">typedef void(*) <a class="el" href="sync_8h.html#8a0b5b8c19b375ef1c985caa120f3274">post_sync_t</a>(void)          </td>
       
    50         </tr>
       
    51       </table>
       
    52 </div>
       
    53 <div class="memdoc">
       
    54 
       
    55 <p>
       
    56 
       
    57 <p>
       
    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>.
       
    59 </div>
       
    60 </div><p>
       
    61 <a class="anchor" name="b9bc4632750ad12f918aa22a1eb7756b"></a><!-- doxytag: member="sync.h::post_TPDO_t" ref="b9bc4632750ad12f918aa22a1eb7756b" args="(void)" -->
       
    62 <div class="memitem">
       
    63 <div class="memproto">
       
    64       <table class="memname">
       
    65         <tr>
       
    66           <td class="memname">typedef void(*) <a class="el" href="sync_8h.html#b9bc4632750ad12f918aa22a1eb7756b">post_TPDO_t</a>(void)          </td>
       
    67         </tr>
       
    68       </table>
       
    69 </div>
       
    70 <div class="memdoc">
       
    71 
       
    72 <p>
       
    73 
       
    74 <p>
       
    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>.
       
    76 </div>
       
    77 </div><p>
       
    78 <hr><h2>Function Documentation</h2>
       
    79 <a class="anchor" name="1da155dcbd7fa1271216d74a15e30490"></a><!-- doxytag: member="sync.h::_post_sync" ref="1da155dcbd7fa1271216d74a15e30490" args="(void)" -->
       
    80 <div class="memitem">
       
    81 <div class="memproto">
       
    82       <table class="memname">
       
    83         <tr>
       
    84           <td class="memname">void _post_sync           </td>
       
    85           <td>(</td>
       
    86           <td class="paramtype">void&nbsp;</td>
       
    87           <td class="paramname">          </td>
       
    88           <td>&nbsp;)&nbsp;</td>
       
    89           <td width="100%"></td>
       
    90         </tr>
       
    91       </table>
       
    92 </div>
       
    93 <div class="memdoc">
       
    94 
       
    95 <p>
       
    96 
       
    97 <p>
       
    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>.
       
    99 </div>
       
   100 </div><p>
       
   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">
       
   105         <tr>
       
   106           <td class="memname">void _post_TPDO           </td>
       
   107           <td>(</td>
       
   108           <td class="paramtype">void&nbsp;</td>
       
   109           <td class="paramname">          </td>
       
   110           <td>&nbsp;)&nbsp;</td>
       
   111           <td width="100%"></td>
       
   112         </tr>
       
   113       </table>
       
   114 </div>
       
   115 <div class="memdoc">
       
   116 
       
   117 <p>
       
   118 
       
   119 <p>
       
   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>.
       
   121 </div>
       
   122 </div><p>
       
   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">
       
   127         <tr>
       
   128           <td class="memname">UNS8 proceedSYNC           </td>
       
   129           <td>(</td>
       
   130           <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> *&nbsp;</td>
       
   131           <td class="paramname"> <em>d</em>, </td>
       
   132         </tr>
       
   133         <tr>
       
   134           <td class="paramkey"></td>
       
   135           <td></td>
       
   136           <td class="paramtype"><a class="el" href="structMessage.html">Message</a> *&nbsp;</td>
       
   137           <td class="paramname"> <em>m</em></td><td>&nbsp;</td>
       
   138         </tr>
       
   139         <tr>
       
   140           <td></td>
       
   141           <td>)</td>
       
   142           <td></td><td></td><td width="100%"></td>
       
   143         </tr>
       
   144       </table>
       
   145 </div>
       
   146 <div class="memdoc">
       
   147 
       
   148 <p>
       
   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 &lt; 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 
       
   150 <p>
       
   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>.
       
   152 <p>
       
   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>.
       
   154 </div>
       
   155 </div><p>
       
   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">
       
   160         <tr>
       
   161           <td class="memname">UNS8 sendSYNC           </td>
       
   162           <td>(</td>
       
   163           <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> *&nbsp;</td>
       
   164           <td class="paramname"> <em>d</em>, </td>
       
   165         </tr>
       
   166         <tr>
       
   167           <td class="paramkey"></td>
       
   168           <td></td>
       
   169           <td class="paramtype">UNS32&nbsp;</td>
       
   170           <td class="paramname"> <em>cob_id</em></td><td>&nbsp;</td>
       
   171         </tr>
       
   172         <tr>
       
   173           <td></td>
       
   174           <td>)</td>
       
   175           <td></td><td></td><td width="100%"></td>
       
   176         </tr>
       
   177       </table>
       
   178 </div>
       
   179 <div class="memdoc">
       
   180 
       
   181 <p>
       
   182 transmit a SYNC message on the bus number bus_id bus_id is hardware dependant return canSend(bus_id,&amp;m) 
       
   183 <p>
       
   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>.
       
   185 <p>
       
   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>.
       
   187 </div>
       
   188 </div><p>
       
   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">
       
   193         <tr>
       
   194           <td class="memname">void startSYNC           </td>
       
   195           <td>(</td>
       
   196           <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> *&nbsp;</td>
       
   197           <td class="paramname"> <em>d</em>          </td>
       
   198           <td>&nbsp;)&nbsp;</td>
       
   199           <td width="100%"></td>
       
   200         </tr>
       
   201       </table>
       
   202 </div>
       
   203 <div class="memdoc">
       
   204 
       
   205 <p>
       
   206 
       
   207 <p>
       
   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>.
       
   209 <p>
       
   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>.
       
   211 </div>
       
   212 </div><p>
       
   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">
       
   217         <tr>
       
   218           <td class="memname">void stopSYNC           </td>
       
   219           <td>(</td>
       
   220           <td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> *&nbsp;</td>
       
   221           <td class="paramname"> <em>d</em>          </td>
       
   222           <td>&nbsp;)&nbsp;</td>
       
   223           <td width="100%"></td>
       
   224         </tr>
       
   225       </table>
       
   226 </div>
       
   227 <div class="memdoc">
       
   228 
       
   229 <p>
       
   230 
       
   231 <p>
       
   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>.
       
   233 <p>
       
   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>.
       
   235 </div>
       
   236 </div><p>
       
   237 <hr size="1"><address style="align: right;"><small>Generated on Mon Jun 4 16:29:07 2007 for CanFestival by&nbsp;
       
   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>
       
   240 </body>
       
   241 </html>