<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>CanFestival: examples/TestMasterSlave/TestMasterSlave.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.1 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li id="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul></div>
<div class="nav">
<a class="el" href="dir_aa575cee5acc3b84cc5b4489187a1fd3.html">examples</a> » <a class="el" href="dir_4f45567b048264117a95e53b67d9aefb.html">TestMasterSlave</a></div>
<h1>TestMasterSlave.c File Reference</h1><code>#include <stdio.h></code><br>
<code>#include <string.h></code><br>
<code>#include <unistd.h></code><br>
<code>#include <stdlib.h></code><br>
<code>#include <signal.h></code><br>
<code>#include "<a class="el" href="win32_2canfestival_8h-source.html">canfestival.h</a>"</code><br>
<code>#include "<a class="el" href="Master_8h-source.html">Master.h</a>"</code><br>
<code>#include "<a class="el" href="Slave_8h-source.html">Slave.h</a>"</code><br>
<code>#include "<a class="el" href="TestMasterSlave_8h-source.html">TestMasterSlave.h</a>"</code><br>
<p>
Include dependency graph for TestMasterSlave.c:<p><center><img src="TestMasterSlave_8c__incl.png" border="0" usemap="#examples/TestMasterSlave/TestMasterSlave.c_map" alt=""></center>
<map name="examples/TestMasterSlave/TestMasterSlave.c_map">
<area href="win32_2canfestival_8h.html" shape="rect" coords="495,309,583,336" alt="">
<area href="Master_8h.html" shape="rect" coords="351,360,417,387" alt="">
<area href="Slave_8h.html" shape="rect" coords="353,411,415,437" alt="">
<area href="TestMasterSlave_8h.html" shape="rect" coords="324,309,444,336" alt="">
<area href="win32_2timerscfg_8h.html" shape="rect" coords="636,259,716,285" alt="">
<area href="can__driver_8h.html" shape="rect" coords="632,360,720,387" alt="">
<area href="data_8h.html" shape="rect" coords="649,411,703,437" alt="">
<area href="TestMasterSlave_2TestMaster_8h.html" shape="rect" coords="493,360,584,387" alt="">
<area href="TestSlave_8h.html" shape="rect" coords="497,411,580,437" alt="">
</map>
<p>
<a href="TestMasterSlave_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">UNS32 </td><td class="memItemRight" valign="bottom"><a class="el" href="TestMasterSlave_8c.html#5357a5c72524c67e0141e51ebd001293">OnMasterMap1Update</a> (<a class="el" href="structstruct__CO__Data.html">CO_Data</a> *d, const <a class="el" href="structtd__indextable.html">indextable</a> *unsused_indextable, UNS8 unsused_bSubindex)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="TestMasterSlave_8c.html#3ce141bc870bf5a7cb52fa529ef2ad52">catch_signal</a> (int sig)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="TestMasterSlave_8c.html#c26945a412008c505d56d9c43688813c">help</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="TestMasterSlave_8c.html#5c2037498a2c950d815a9ad8c4ad1a51">InitNodes</a> (<a class="el" href="structstruct__CO__Data.html">CO_Data</a> *d, UNS32 id)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="TestMasterSlave_8c.html#24e6ce6d053864cf5fb7af941457bb0e">main</a> (int argc, char **argv)</td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structstruct__s__BOARD.html">s_BOARD</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="TestMasterSlave_8c.html#bb2fe357b92adf5413dca47e85606400">SlaveBoard</a> = {"0", "125K"}</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structstruct__s__BOARD.html">s_BOARD</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="TestMasterSlave_8c.html#217fe3316775036170f547ceafe4bfca">MasterBoard</a> = {"1", "125K"}</td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="3ce141bc870bf5a7cb52fa529ef2ad52"></a><!-- doxytag: member="TestMasterSlave.c::catch_signal" ref="3ce141bc870bf5a7cb52fa529ef2ad52" args="(int sig)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void catch_signal </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>sig</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
Definition at line <a class="el" href="TestMasterSlave_8c-source.html#l00056">56</a> of file <a class="el" href="TestMasterSlave_8c-source.html">TestMasterSlave.c</a>.
<p>
References <a class="el" href="TestMasterSlave_8h-source.html#l00026">eprintf</a>.
<p>
Referenced by <a class="el" href="TestMasterMicroMod_8c-source.html#l00339">catch_signal()</a>, and <a class="el" href="TestMasterMicroMod_8c-source.html#l00397">main()</a>.
</div>
</div><p>
<a class="anchor" name="c26945a412008c505d56d9c43688813c"></a><!-- doxytag: member="TestMasterSlave.c::help" ref="c26945a412008c505d56d9c43688813c" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void help </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
Definition at line <a class="el" href="TestMasterSlave_8c-source.html#l00064">64</a> of file <a class="el" href="TestMasterSlave_8c-source.html">TestMasterSlave.c</a>.
<p>
Referenced by <a class="el" href="TestMasterMicroMod_8c-source.html#l00397">main()</a>.
</div>
</div><p>
<a class="anchor" name="5c2037498a2c950d815a9ad8c4ad1a51"></a><!-- doxytag: member="TestMasterSlave.c::InitNodes" ref="5c2037498a2c950d815a9ad8c4ad1a51" args="(CO_Data *d, UNS32 id)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void InitNodes </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> * </td>
<td class="paramname"> <em>d</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">UNS32 </td>
<td class="paramname"> <em>id</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
Definition at line <a class="el" href="TestMasterSlave_8c-source.html#l00093">93</a> of file <a class="el" href="TestMasterSlave_8c-source.html">TestMasterSlave.c</a>.
<p>
References <a class="el" href="can__driver_8h-source.html#l00035">struct_s_BOARD::baudrate</a>, <a class="el" href="states_8h.html#80401a8f6d29787e07427b2baf630538de69e6bdd47a9d7dae023237acdaad5e">Initialisation</a>, <a class="el" href="TestMasterSlave_8c-source.html#l00053">MasterBoard</a>, <a class="el" href="TestMasterSlave_8c-source.html#l00046">OnMasterMap1Update()</a>, <a class="el" href="objacces_8c-source.html#l00419">RegisterSetODentryCallBack()</a>, <a class="el" href="states_8c-source.html#l00235">setNodeId()</a>, <a class="el" href="states_8c-source.html#l00138">setState()</a>, <a class="el" href="TestMasterSlave_8c-source.html#l00052">SlaveBoard</a>, <a class="el" href="TestMasterSlave_2TestMaster_8c-source.html#l00496">TestMaster_Data</a>, and <a class="el" href="TestSlave_8c-source.html#l00572">TestSlave_Data</a>.
<p>
Referenced by <a class="el" href="TestMasterMicroMod_8c-source.html#l00397">main()</a>.
<p>
Here is the call graph for this function:<p><center><img src="TestMasterSlave_8c_5c2037498a2c950d815a9ad8c4ad1a51_cgraph.png" border="0" usemap="#TestMasterSlave_8c_5c2037498a2c950d815a9ad8c4ad1a51_cgraph_map" alt=""></center>
<map name="TestMasterSlave_8c_5c2037498a2c950d815a9ad8c4ad1a51_cgraph_map">
<area href="TestMasterSlave_8c.html#5357a5c72524c67e0141e51ebd001293" shape="rect" coords="145,5,289,32" alt="">
<area href="objacces_8c.html#9a512a966532e40f35d3a4201bf54ead" shape="rect" coords="128,56,307,83" alt="">
<area href="states_8c.html#191c0cad67e093ea44285c9acd187513" shape="rect" coords="180,107,255,133" alt="">
<area href="states_8c.html#cfb53d66c2360cd55b1d968f0e5c270f" shape="rect" coords="187,157,248,184" alt="">
<area href="objacces_8c.html#b2839d53051e322c12605c1d7f3dc4e5" shape="rect" coords="393,56,487,83" alt="">
<area href="dcf_8c.html#acb81126cc677d663f367f560ae0face" shape="rect" coords="393,132,487,159" alt="">
<area href="states_8c.html#553af6eeeba1591e3d26444d8a544856" shape="rect" coords="356,183,524,209" alt="">
</map>
</div>
</div><p>
<a class="anchor" name="24e6ce6d053864cf5fb7af941457bb0e"></a><!-- doxytag: member="TestMasterSlave.c::main" ref="24e6ce6d053864cf5fb7af941457bb0e" args="(int argc, char **argv)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char ** </td>
<td class="paramname"> <em>argv</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
Definition at line <a class="el" href="TestMasterSlave_8c-source.html#l00119">119</a> of file <a class="el" href="TestMasterSlave_8c-source.html">TestMasterSlave.c</a>.
<p>
References <a class="el" href="can__driver_8h-source.html#l00035">struct_s_BOARD::baudrate</a>, <a class="el" href="can__driver_8h-source.html#l00034">struct_s_BOARD::busname</a>, <a class="el" href="unix_8c-source.html#l00178">canClose()</a>, <a class="el" href="unix_8c-source.html#l00145">canOpen()</a>, <a class="el" href="TestMasterSlave_8c-source.html#l00056">catch_signal()</a>, <a class="el" href="TestMasterSlave_8h-source.html#l00026">eprintf</a>, <a class="el" href="TestMasterSlave_2getopt_8c-source.html#l01171">getopt()</a>, <a class="el" href="data_8h-source.html#l00074">struct_CO_Data::heartbeatError</a>, <a class="el" href="TestMasterSlave_8c-source.html#l00064">help()</a>, <a class="el" href="data_8h-source.html#l00063">struct_CO_Data::initialisation</a>, <a class="el" href="TestMasterSlave_8c-source.html#l00093">InitNodes()</a>, <a class="el" href="unix_8c-source.html#l00084">LoadCanDriver()</a>, <a class="el" href="TestMasterSlave_8c-source.html#l00053">MasterBoard</a>, <a class="el" href="nmtMaster_8c-source.html#l00045">masterSendNMTstateChange()</a>, <a class="el" href="def_8h-source.html#l00105">NMT_Reset_Node</a>, <a class="el" href="data_8h-source.html#l00065">struct_CO_Data::operational</a>, <a class="el" href="TestMasterSlave_2getopt_8c-source.html#l00118">optarg</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#l00064">struct_CO_Data::preOperational</a>, <a class="el" href="states_8c-source.html#l00138">setState()</a>, <a class="el" href="TestMasterSlave_8c-source.html#l00052">SlaveBoard</a>, <a class="el" href="timers__unix_8c-source.html#l00062">StartTimerLoop()</a>, <a class="el" href="states_8h.html#80401a8f6d29787e07427b2baf63053853c74ac440bbf6af2cb67759d3cd8f0a">Stopped</a>, <a class="el" href="data_8h-source.html#l00066">struct_CO_Data::stopped</a>, <a class="el" href="timers__unix_8c-source.html#l00055">StopTimerLoop()</a>, <a class="el" href="data_8h-source.html#l00089">struct_CO_Data::storeODSubIndex</a>, <a class="el" href="TestMasterSlave_2TestMaster_8c-source.html#l00496">TestMaster_Data</a>, <a class="el" href="Master_8c-source.html#l00028">TestMaster_heartbeatError()</a>, <a class="el" href="Master_8c-source.html#l00038">TestMaster_initialisation()</a>, <a class="el" href="Master_8c-source.html#l00154">TestMaster_operational()</a>, <a class="el" href="Master_8c-source.html#l00164">TestMaster_post_sync()</a>, <a class="el" href="Master_8c-source.html#l00199">TestMaster_post_TPDO()</a>, <a class="el" href="Master_8c-source.html#l00146">TestMaster_preOperational()</a>, <a class="el" href="Master_8c-source.html#l00159">TestMaster_stopped()</a>, <a class="el" href="TestSlave_8c-source.html#l00572">TestSlave_Data</a>, <a class="el" href="Slave_8c-source.html#l00028">TestSlave_heartbeatError()</a>, <a class="el" href="Slave_8c-source.html#l00033">TestSlave_initialisation()</a>, <a class="el" href="Slave_8c-source.html#l00043">TestSlave_operational()</a>, <a class="el" href="Slave_8c-source.html#l00053">TestSlave_post_sync()</a>, <a class="el" href="Slave_8c-source.html#l00085">TestSlave_post_TPDO()</a>, <a class="el" href="Slave_8c-source.html#l00038">TestSlave_preOperational()</a>, <a class="el" href="Slave_8c-source.html#l00048">TestSlave_stopped()</a>, and <a class="el" href="Slave_8c-source.html#l00091">TestSlave_storeODSubIndex()</a>.
<p>
Here is the call graph for this function:<p><center><img src="TestMasterSlave_8c_24e6ce6d053864cf5fb7af941457bb0e_cgraph.png" border="0" usemap="#TestMasterSlave_8c_24e6ce6d053864cf5fb7af941457bb0e_cgraph_map" alt=""></center>
<map name="TestMasterSlave_8c_24e6ce6d053864cf5fb7af941457bb0e_cgraph_map">
<area href="unix_8c.html#6d6b692e726dee0a5726e6d3db1b1693" shape="rect" coords="156,5,225,32" alt="">
<area href="unix_8c.html#c32083e9caa1b02f7726a8b87d10ce33" shape="rect" coords="156,56,225,83" alt="">
<area href="TestMasterSlave_8c.html#3ce141bc870bf5a7cb52fa529ef2ad52" shape="rect" coords="147,107,235,133" alt="">
<area href="TestMasterSlave_2getopt_8c.html#afdf882e55974b727c64559defdc4326" shape="rect" coords="164,157,217,184" alt="">
<area href="TestMasterSlave_8c.html#c26945a412008c505d56d9c43688813c" shape="rect" coords="169,208,212,235" alt="">
<area href="TestMasterSlave_8c.html#5c2037498a2c950d815a9ad8c4ad1a51" shape="rect" coords="155,259,227,285" alt="">
<area href="states_8c.html#cfb53d66c2360cd55b1d968f0e5c270f" shape="rect" coords="329,284,391,311" alt="">
<area href="unix_8c.html#0012a2aa42ef694bd275c6b5be5c89c7" shape="rect" coords="139,360,243,387" alt="">
<area href="nmtMaster_8c.html#c1ba0feb792adfae21a4adb96593ab3b" shape="rect" coords="101,411,280,437" alt="">
<area href="timers__unix_8c.html#dd08f21a7c3fcbcd53a2c41b00879fdd" shape="rect" coords="137,461,244,488" alt="">
<area href="timers__unix_8c.html#8d52f2db8b505e53ace5dd1c2a789d94" shape="rect" coords="137,512,244,539" alt="">
<area href="Master_8c.html#ab44b8110510c170a1075227cf400caf" shape="rect" coords="108,563,273,589" alt="">
<area href="Master_8c.html#173d54878164bf1ef49845c8fffbf19f" shape="rect" coords="113,613,268,640" alt="">
<area href="Master_8c.html#c7ed44191510ba965044b347870c4ebf" shape="rect" coords="117,664,264,691" alt="">
<area href="Master_8c.html#3f440fb00a4dddf2fde3349c2bc8b2d4" shape="rect" coords="120,715,261,741" alt="">
<area href="Master_8c.html#dc95bf1be3ee99722ed0cb2009c38b18" shape="rect" coords="115,765,267,792" alt="">
<area href="Master_8c.html#9d3d58aa8fa14fe445f0fa13be678d2a" shape="rect" coords="107,816,275,843" alt="">
<area href="Master_8c.html#85ea45ff95b4b9520cc73920d08232a8" shape="rect" coords="127,867,255,893" alt="">
<area href="Slave_8c.html#feea6edbb1f58238a49c0e292410d449" shape="rect" coords="112,917,269,944" alt="">
<area href="Slave_8c.html#ee7e3cdd945d35d48890257d44afc522" shape="rect" coords="117,968,264,995" alt="">
<area href="Slave_8c.html#b3b281beb6cca9520ac6d69b057ace58" shape="rect" coords="121,1019,260,1045" alt="">
<area href="Slave_8c.html#b4e6d39d4f2b797c291976a5fcdeb061" shape="rect" coords="124,1069,257,1096" alt="">
<area href="Slave_8c.html#fc116705e79ad78a9e32ec33e5226e2d" shape="rect" coords="119,1120,263,1147" alt="">
<area href="Slave_8c.html#5e1c535a74c3aa907292c27b098a3af5" shape="rect" coords="111,1171,271,1197" alt="">
<area href="Slave_8c.html#492b2140b6577220c8f6a3ef37e7fba8" shape="rect" coords="129,1221,252,1248" alt="">
<area href="Slave_8c.html#1e047d439fd5887cc80528724fae0ca2" shape="rect" coords="103,1272,279,1299" alt="">
</map>
</div>
</div><p>
<a class="anchor" name="5357a5c72524c67e0141e51ebd001293"></a><!-- doxytag: member="TestMasterSlave.c::OnMasterMap1Update" ref="5357a5c72524c67e0141e51ebd001293" args="(CO_Data *d, const indextable *unsused_indextable, UNS8 unsused_bSubindex)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UNS32 OnMasterMap1Update </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structstruct__CO__Data.html">CO_Data</a> * </td>
<td class="paramname"> <em>d</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structtd__indextable.html">indextable</a> * </td>
<td class="paramname"> <em>unsused_indextable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">UNS8 </td>
<td class="paramname"> <em>unsused_bSubindex</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
Definition at line <a class="el" href="TestMasterSlave_8c-source.html#l00046">46</a> of file <a class="el" href="TestMasterSlave_8c-source.html">TestMasterSlave.c</a>.
<p>
References <a class="el" href="TestMasterSlave_8h-source.html#l00026">eprintf</a>, and <a class="el" href="TestSlave_8c-source.html#l00009">SlaveMap1</a>.
<p>
Referenced by <a class="el" href="TestMasterSlave_8c-source.html#l00093">InitNodes()</a>.
</div>
</div><p>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="217fe3316775036170f547ceafe4bfca"></a><!-- doxytag: member="TestMasterSlave.c::MasterBoard" ref="217fe3316775036170f547ceafe4bfca" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structstruct__s__BOARD.html">s_BOARD</a> <a class="el" href="TestMasterMicroMod_8c.html#217fe3316775036170f547ceafe4bfca">MasterBoard</a> = {"1", "125K"} </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
Definition at line <a class="el" href="TestMasterSlave_8c-source.html#l00053">53</a> of file <a class="el" href="TestMasterSlave_8c-source.html">TestMasterSlave.c</a>.
<p>
Referenced by <a class="el" href="TestMasterMicroMod_8c-source.html#l00382">InitNodes()</a>, and <a class="el" href="TestMasterMicroMod_8c-source.html#l00397">main()</a>.
</div>
</div><p>
<a class="anchor" name="bb2fe357b92adf5413dca47e85606400"></a><!-- doxytag: member="TestMasterSlave.c::SlaveBoard" ref="bb2fe357b92adf5413dca47e85606400" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structstruct__s__BOARD.html">s_BOARD</a> <a class="el" href="TestMasterSlave_8c.html#bb2fe357b92adf5413dca47e85606400">SlaveBoard</a> = {"0", "125K"} </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
Definition at line <a class="el" href="TestMasterSlave_8c-source.html#l00052">52</a> of file <a class="el" href="TestMasterSlave_8c-source.html">TestMasterSlave.c</a>.
<p>
Referenced by <a class="el" href="TestMasterSlave_8c-source.html#l00093">InitNodes()</a>, and <a class="el" href="TestMasterSlave_8c-source.html#l00119">main()</a>.
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 2 19:10:25 2007 for CanFestival by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>