<!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: /home/epimerde/documents/tc11/CanFestival-3/src/states.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 id="current"><a href="files.html"><span>Files</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>
<h1>/home/epimerde/documents/tc11/CanFestival-3/src/states.c File Reference</h1><code>#include "states.h"</code><br>
<code>#include "def.h"</code><br>
<code>#include "dcf.h"</code><br>
<code>#include "nmtSlave.h"</code><br>
<p>
<a href="states_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>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#3a7cf0c586b1e467e6215396e9a439ae">StartOrStop</a>(CommType, FuncStart, FuncStop)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#f4e8bc2d192090ff502229b33c24a389">None</a></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#915991eebf7c2ac6c929c6c9cfbd7d03">switchCommunicationState</a> (CO_Data *d, s_state_communication *newCommunicationState)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">e_nodeState </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#95d835785ba564bf6d92e3224c5e3848">getState</a> (CO_Data *d)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#3f8975650604cc23582f19a43fd4e518">canDispatch</a> (CO_Data *d, Message *m)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8 </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#0a5004efd1dedbee82a4f21ec5c44fb5">setState</a> (CO_Data *d, e_nodeState newState)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">UNS8 </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#3020f2e5762f6e389a21382ec827b6a6">getNodeId</a> (CO_Data *d)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#d47a53979b9311a374d029f7923abbe1">setNodeId</a> (CO_Data *d, UNS8 nodeId)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#1ee4d5c3d5dc6f39607d414b7bf9bcc9">_initialisation</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#00113c22ed3366ee552f77862241d317">_preOperational</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#4c917142acca702f7e04e919a0b958b4">_operational</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="states_8c.html#244e9269c323e14509bea947c2729a13">_stopped</a> ()</td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="f4e8bc2d192090ff502229b33c24a389"></a><!-- doxytag: member="states.c::None" ref="f4e8bc2d192090ff502229b33c24a389" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define None </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
Definition at line <a class="el" href="states_8c-source.html#l00086">86</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
</div>
</div><p>
<a class="anchor" name="3a7cf0c586b1e467e6215396e9a439ae"></a><!-- doxytag: member="states.c::StartOrStop" ref="3a7cf0c586b1e467e6215396e9a439ae" args="(CommType, FuncStart, FuncStop)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define StartOrStop </td>
<td>(</td>
<td class="paramtype">CommType, <tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FuncStart, <tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">FuncStop </td>
<td class="paramname"> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<b>Value:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">if</span>(newCommunicationState->CommType && !d->CurrentCommunicationState.CommType){\
MSG_WAR(0x9999,#FuncStart, 9999);\
d->CurrentCommunicationState.CommType = 1;\
FuncStart;\
}<span class="keywordflow">else</span> <span class="keywordflow">if</span>(!newCommunicationState->CommType && d->CurrentCommunicationState.CommType){\
MSG_WAR(0x9999,#FuncStop, 9999);\
d->CurrentCommunicationState.CommType = 0;\
FuncStop;\
}
</pre></div>
<p>
Definition at line <a class="el" href="states_8c-source.html#l00076">76</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="1ee4d5c3d5dc6f39607d414b7bf9bcc9"></a><!-- doxytag: member="states.c::_initialisation" ref="1ee4d5c3d5dc6f39607d414b7bf9bcc9" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void _initialisation </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="states_8c-source.html#l00234">234</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
</div>
</div><p>
<a class="anchor" name="4c917142acca702f7e04e919a0b958b4"></a><!-- doxytag: member="states.c::_operational" ref="4c917142acca702f7e04e919a0b958b4" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void _operational </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="states_8c-source.html#l00236">236</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
</div>
</div><p>
<a class="anchor" name="00113c22ed3366ee552f77862241d317"></a><!-- doxytag: member="states.c::_preOperational" ref="00113c22ed3366ee552f77862241d317" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void _preOperational </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="states_8c-source.html#l00235">235</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
</div>
</div><p>
<a class="anchor" name="244e9269c323e14509bea947c2729a13"></a><!-- doxytag: member="states.c::_stopped" ref="244e9269c323e14509bea947c2729a13" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void _stopped </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="states_8c-source.html#l00237">237</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
</div>
</div><p>
<a class="anchor" name="3f8975650604cc23582f19a43fd4e518"></a><!-- doxytag: member="states.c::canDispatch" ref="3f8975650604cc23582f19a43fd4e518" args="(CO_Data *d, Message *m)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void canDispatch </td>
<td>(</td>
<td class="paramtype">CO_Data * </td>
<td class="paramname"> <em>d</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Message * </td>
<td class="paramname"> <em>m</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="states_8c-source.html#l00039">39</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
<p>
References <a class="el" href="nmtSlave_8c-source.html#l00029">proceedNMTstateChange()</a>, <a class="el" href="lifegrd_8c-source.html#l00050">proceedNODE_GUARD()</a>, <a class="el" href="pdo_8c-source.html#l00187">proceedPDO()</a>, <a class="el" href="sdo_8c-source.html#l00447">proceedSDO()</a>, and <a class="el" href="sync_8c-source.html#l00093">proceedSYNC()</a>.
</div>
</div><p>
<a class="anchor" name="3020f2e5762f6e389a21382ec827b6a6"></a><!-- doxytag: member="states.c::getNodeId" ref="3020f2e5762f6e389a21382ec827b6a6" args="(CO_Data *d)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UNS8 getNodeId </td>
<td>(</td>
<td class="paramtype">CO_Data * </td>
<td class="paramname"> <em>d</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
Definition at line <a class="el" href="states_8c-source.html#l00180">180</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
</div>
</div><p>
<a class="anchor" name="95d835785ba564bf6d92e3224c5e3848"></a><!-- doxytag: member="states.c::getState" ref="95d835785ba564bf6d92e3224c5e3848" args="(CO_Data *d)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">e_nodeState getState </td>
<td>(</td>
<td class="paramtype">CO_Data * </td>
<td class="paramname"> <em>d</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
<p>
Definition at line <a class="el" href="states_8c-source.html#l00033">33</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
</div>
</div><p>
<a class="anchor" name="d47a53979b9311a374d029f7923abbe1"></a><!-- doxytag: member="states.c::setNodeId" ref="d47a53979b9311a374d029f7923abbe1" args="(CO_Data *d, UNS8 nodeId)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void setNodeId </td>
<td>(</td>
<td class="paramtype">CO_Data * </td>
<td class="paramname"> <em>d</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">UNS8 </td>
<td class="paramname"> <em>nodeId</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="states_8c-source.html#l00186">186</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
</div>
</div><p>
<a class="anchor" name="0a5004efd1dedbee82a4f21ec5c44fb5"></a><!-- doxytag: member="states.c::setState" ref="0a5004efd1dedbee82a4f21ec5c44fb5" args="(CO_Data *d, e_nodeState newState)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">UNS8 setState </td>
<td>(</td>
<td class="paramtype">CO_Data * </td>
<td class="paramname"> <em>d</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">e_nodeState </td>
<td class="paramname"> <em>newState</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="states_8c-source.html#l00100">100</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
<p>
References <a class="el" href="dcf_8c-source.html#l00049">decompo_dcf()</a>, <a class="el" href="dcf_8c-source.html#l00033">ptrTable</a>, and <a class="el" href="states_8c-source.html#l00089">switchCommunicationState()</a>.
</div>
</div><p>
<a class="anchor" name="915991eebf7c2ac6c929c6c9cfbd7d03"></a><!-- doxytag: member="states.c::switchCommunicationState" ref="915991eebf7c2ac6c929c6c9cfbd7d03" args="(CO_Data *d, s_state_communication *newCommunicationState)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void switchCommunicationState </td>
<td>(</td>
<td class="paramtype">CO_Data * </td>
<td class="paramname"> <em>d</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">s_state_communication * </td>
<td class="paramname"> <em>newCommunicationState</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="states_8c-source.html#l00089">89</a> of file <a class="el" href="states_8c-source.html">states.c</a>.
<p>
References <a class="el" href="lifegrd_8c-source.html#l00147">heartbeatInit()</a>, <a class="el" href="lifegrd_8c-source.html#l00173">heartbeatStop()</a>, <a class="el" href="states_8c-source.html#l00086">None</a>, <a class="el" href="sdo_8c-source.html#l00131">resetSDO()</a>, <a class="el" href="nmtSlave_8c-source.html#l00076">slaveSendBootUp()</a>, <a class="el" href="states_8c-source.html#l00076">StartOrStop</a>, <a class="el" href="sync_8c-source.html#l00050">startSYNC()</a>, and <a class="el" href="sync_8c-source.html#l00071">stopSYNC()</a>.
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 4 17:09:27 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>