doc/doxygen/html/def_8h-source.html
author etisserant
Mon, 03 Dec 2007 11:30:38 +0100
changeset 320 f82e758840bd
parent 240 34654679f262
permissions -rw-r--r--
Some fixes suggested by Luis Jim?nez, plus some minor enhancements in DCF.
<!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: include/def.h Source File</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&nbsp;Page</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;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&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="dir_bb27f6e70a4a8ab6966321815f15a33d.html">include</a></div>
<h1>def.h</h1><a href="def_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">This file is part of CanFestival, a library implementing CanOpen Stack. </span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">Copyright (C): Edouard TISSERANT and Francis DUPIN</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">See COPYING file for copyrights details.</span>
<a name="l00007"></a>00007 <span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment">This library is free software; you can redistribute it and/or</span>
<a name="l00009"></a>00009 <span class="comment">modify it under the terms of the GNU Lesser General Public</span>
<a name="l00010"></a>00010 <span class="comment">License as published by the Free Software Foundation; either</span>
<a name="l00011"></a>00011 <span class="comment">version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">This library is distributed in the hope that it will be useful,</span>
<a name="l00014"></a>00014 <span class="comment">but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00015"></a>00015 <span class="comment">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00016"></a>00016 <span class="comment">Lesser General Public License for more details.</span>
<a name="l00017"></a>00017 <span class="comment"></span>
<a name="l00018"></a>00018 <span class="comment">You should have received a copy of the GNU Lesser General Public</span>
<a name="l00019"></a>00019 <span class="comment">License along with this library; if not, write to the Free Software</span>
<a name="l00020"></a>00020 <span class="comment">Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span>
<a name="l00021"></a>00021 <span class="comment">*/</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef __def_h__</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define __def_h__</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="config_8h.html">config.h</a>"</span>
<a name="l00028"></a>00028 
<a name="l00031"></a><a class="code" href="def_8h.html#a07aae3570321186b5b2233f4f8a9bbe">00031</a> <span class="preprocessor">#define OD_SUCCESSFUL                0x00000000</span>
<a name="l00032"></a><a class="code" href="def_8h.html#3c3bde3d6c7388638fe0cb5edc6847d6">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define OD_READ_NOT_ALLOWED          0x06010001</span>
<a name="l00033"></a><a class="code" href="def_8h.html#62e19b748b4b30514b7aaf2786eee79f">00033</a> <span class="preprocessor"></span><span class="preprocessor">#define OD_WRITE_NOT_ALLOWED         0x06010002</span>
<a name="l00034"></a><a class="code" href="def_8h.html#3f8ca223a1d0262a800f7a14fdd9794c">00034</a> <span class="preprocessor"></span><span class="preprocessor">#define OD_NO_SUCH_OBJECT            0x06020000</span>
<a name="l00035"></a><a class="code" href="def_8h.html#9cf588696fe0f6fc61f7f3e994e56c02">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define OD_NOT_MAPPABLE              0x06040041</span>
<a name="l00036"></a><a class="code" href="def_8h.html#c5da3229aec49310020be0e970995fad">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define OD_LENGTH_DATA_INVALID       0x06070010</span>
<a name="l00037"></a><a class="code" href="def_8h.html#3312005ffb5ebf43de78300d4121ed07">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define OD_NO_SUCH_SUBINDEX          0x06090011</span>
<a name="l00038"></a><a class="code" href="def_8h.html#acb70ca2577025b9b9b73d32ad97f53a">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define OD_VALUE_TOO_LOW             0x06090031 </span><span class="comment">/* Value range test result */</span>
<a name="l00039"></a><a class="code" href="def_8h.html#1ec96021b47a1d121e6050040ef9c9c3">00039</a> <span class="preprocessor">#define OD_VALUE_TOO_HIGH            0x06090032 </span><span class="comment">/* Value range test result */</span>
<a name="l00040"></a>00040 <span class="comment">/* Others SDO abort codes </span>
<a name="l00041"></a>00041 <span class="comment"> */</span>
<a name="l00042"></a><a class="code" href="def_8h.html#c28607f078e1f1a6ea89da146d855b8c">00042</a> <span class="preprocessor">#define SDOABT_TOGGLE_NOT_ALTERNED   0x05030000</span>
<a name="l00043"></a><a class="code" href="def_8h.html#fdcd11474e84209a9a7c2b879df7dd7f">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define SDOABT_TIMED_OUT             0x05040000</span>
<a name="l00044"></a><a class="code" href="def_8h.html#694c6738d3319b3755e996e8da691361">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define SDOABT_OUT_OF_MEMORY         0x05040005 </span><span class="comment">/* Size data exceed SDO_MAX_LENGTH_TRANSFERT */</span>
<a name="l00045"></a><a class="code" href="def_8h.html#a5c3f8ae5d90c25b51020352c4e1cd57">00045</a> <span class="preprocessor">#define SDOABT_GENERAL_ERROR         0x08000000 </span><span class="comment">/* Error size of SDO message */</span>
<a name="l00046"></a><a class="code" href="def_8h.html#7e5c09a17f1c7bee260b799abc64f595">00046</a> <span class="preprocessor">#define SDOABT_LOCAL_CTRL_ERROR      0x08000021 </span>
<a name="l00047"></a>00047 <span class="preprocessor"></span>
<a name="l00048"></a>00048 <span class="comment">/******************** CONSTANTS ****************/</span>
<a name="l00049"></a>00049 
<a name="l00053"></a>00053 <span class="comment">/* Should not be modified */</span>
<a name="l00054"></a><a class="code" href="def_8h.html#1ae2410a21866d38fa1aa931a88b2cb1">00054</a> <span class="preprocessor">#define REQUEST 1</span>
<a name="l00055"></a><a class="code" href="def_8h.html#b6a4c86a352c3ac564dae3767c7524f3">00055</a> <span class="preprocessor"></span><span class="preprocessor">#define NOT_A_REQUEST 0</span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>
<a name="l00057"></a>00057 <span class="comment">/* Misc constants */</span>
<a name="l00058"></a>00058 <span class="comment">/* -------------- */</span>
<a name="l00059"></a>00059 <span class="comment">/* Should not be modified */</span>
<a name="l00060"></a><a class="code" href="def_8h.html#6b38999cc96e1d4ebc107d7bbc9afd33">00060</a> <span class="preprocessor">#define Rx 0</span>
<a name="l00061"></a><a class="code" href="def_8h.html#e2277907c3ec8f42dab1b2b14a474c2a">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define Tx 1</span>
<a name="l00062"></a><a class="code" href="def_8h.html#528a67cfb212764fdec08c7c065a04f8">00062</a> <span class="preprocessor"></span><span class="preprocessor">#define TRUE  1</span>
<a name="l00063"></a><a class="code" href="def_8h.html#b5b5527380b5b259294fa10ae7e3a59b">00063</a> <span class="preprocessor"></span><span class="preprocessor">#define FALSE 0</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span>
<a name="l00065"></a>00065     
<a name="l00068"></a><a class="code" href="def_8h.html#aece677f733955fd74245baa5ff4d225">00068</a> <span class="preprocessor">#define SDO_RESET                0x0      </span><span class="comment">/* Transmission not started. Init state. */</span>
<a name="l00069"></a><a class="code" href="def_8h.html#12966f6991bcd2a375fafc8c7c877c04">00069</a> <span class="preprocessor">#define SDO_FINISHED             0x1      </span><span class="comment">/* data are available */</span>                          
<a name="l00070"></a><a class="code" href="def_8h.html#185bf68fd654c50451e246b8f58a5a38">00070</a> <span class="preprocessor">#define SDO_ABORTED_RCV          0x80     </span><span class="comment">/* Received an abort message. Data not available */</span>
<a name="l00071"></a><a class="code" href="def_8h.html#207c051b8c5c41a149125561e9a92082">00071</a> <span class="preprocessor">#define SDO_ABORTED_INTERNAL     0x85     </span><span class="comment">/* Aborted but not because of an abort message. */</span>
<a name="l00072"></a><a class="code" href="def_8h.html#727a4e64152bd92dd68ae820cb9362c4">00072</a> <span class="preprocessor">#define SDO_DOWNLOAD_IN_PROGRESS 0x2 </span>
<a name="l00073"></a><a class="code" href="def_8h.html#2b7ba4e769b81e1ec7ca14f011ab908f">00073</a> <span class="preprocessor"></span><span class="preprocessor">#define SDO_UPLOAD_IN_PROGRESS   0x3   </span>
<a name="l00074"></a>00074 <span class="preprocessor"></span>
<a name="l00075"></a>00075 <span class="comment">/* Status of the node during the SDO transfert : */</span>
<a name="l00076"></a><a class="code" href="def_8h.html#94b5fa9c0784224c8208a0f5ec86577d">00076</a> <span class="preprocessor">#define SDO_SERVER  0x1</span>
<a name="l00077"></a><a class="code" href="def_8h.html#9643ba6f5821c05629c3d60f1f911e88">00077</a> <span class="preprocessor"></span><span class="preprocessor">#define SDO_CLIENT  0x2</span>
<a name="l00078"></a><a class="code" href="def_8h.html#38b52fe46b0d49b9750785141bde0c0c">00078</a> <span class="preprocessor"></span><span class="preprocessor">#define SDO_UNKNOWN 0x3             </span>
<a name="l00079"></a>00079 <span class="preprocessor"></span>
<a name="l00080"></a>00080 <span class="comment">/*  Function Codes </span>
<a name="l00081"></a>00081 <span class="comment">   ---------------</span>
<a name="l00082"></a>00082 <span class="comment">  defined in the canopen DS301 </span>
<a name="l00083"></a>00083 <span class="comment">*/</span>
<a name="l00084"></a><a class="code" href="def_8h.html#d21112faeaa2f64d69dd82ff3f80fa76">00084</a> <span class="preprocessor">#define NMT        0x0</span>
<a name="l00085"></a><a class="code" href="def_8h.html#5121852019ece0964262f0cb39506843">00085</a> <span class="preprocessor"></span><span class="preprocessor">#define SYNC       0x1</span>
<a name="l00086"></a><a class="code" href="def_8h.html#41e214ed6a29870a04c9857cec4a0194">00086</a> <span class="preprocessor"></span><span class="preprocessor">#define TIME_STAMP 0x2</span>
<a name="l00087"></a><a class="code" href="def_8h.html#1893e40a0e6bbfe4b1770cb62046c042">00087</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO1tx     0x3</span>
<a name="l00088"></a><a class="code" href="def_8h.html#511f4300ca65ce23d8a1c4ec3b4e2076">00088</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO1rx     0x4</span>
<a name="l00089"></a><a class="code" href="def_8h.html#e9ee8504cd9f462f20ad5af48eeb22ac">00089</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO2tx     0x5</span>
<a name="l00090"></a><a class="code" href="def_8h.html#1cc8839690c21f2c76ea549ac8e5d05c">00090</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO2rx     0x6</span>
<a name="l00091"></a><a class="code" href="def_8h.html#c063668bc1bd4b58d153b4819c4983a1">00091</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO3tx     0x7</span>
<a name="l00092"></a><a class="code" href="def_8h.html#56e948b5cab3f8b3ff5adca55f6a6c3d">00092</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO3rx     0x8</span>
<a name="l00093"></a><a class="code" href="def_8h.html#dfa635524047b4d8c6fce22469d7a2e8">00093</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO4tx     0x9</span>
<a name="l00094"></a><a class="code" href="def_8h.html#d3a50d56c7316cb4a669766d7d36f6fc">00094</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO4rx     0xA</span>
<a name="l00095"></a><a class="code" href="def_8h.html#ee708deff7d007a1fe37091c13e0e897">00095</a> <span class="preprocessor"></span><span class="preprocessor">#define SDOtx      0xB</span>
<a name="l00096"></a><a class="code" href="def_8h.html#5ff06ebb22799a706652d981570159d9">00096</a> <span class="preprocessor"></span><span class="preprocessor">#define SDOrx      0xC</span>
<a name="l00097"></a><a class="code" href="def_8h.html#e7e02f70bb48a2747c6496fdcf0f1b95">00097</a> <span class="preprocessor"></span><span class="preprocessor">#define NODE_GUARD 0xE</span>
<a name="l00098"></a>00098 <span class="preprocessor"></span>
<a name="l00099"></a>00099 <span class="comment">/* NMT Command Specifier, sent by master to change a slave state */</span>
<a name="l00100"></a>00100 <span class="comment">/* ------------------------------------------------------------- */</span>
<a name="l00101"></a>00101 <span class="comment">/* Should not be modified */</span>
<a name="l00102"></a><a class="code" href="def_8h.html#4467d5b0f948367d4ecf26aa2a98c221">00102</a> <span class="preprocessor">#define NMT_Start_Node              0x01</span>
<a name="l00103"></a><a class="code" href="def_8h.html#0d1997bb9a500ca3e400bf4ca6428044">00103</a> <span class="preprocessor"></span><span class="preprocessor">#define NMT_Stop_Node               0x02</span>
<a name="l00104"></a><a class="code" href="def_8h.html#9a0e4ffea03086317e76fc1c80206197">00104</a> <span class="preprocessor"></span><span class="preprocessor">#define NMT_Enter_PreOperational    0x80</span>
<a name="l00105"></a><a class="code" href="def_8h.html#a74bd7065a5e72d9fefb3b24c239bcab">00105</a> <span class="preprocessor"></span><span class="preprocessor">#define NMT_Reset_Node              0x81</span>
<a name="l00106"></a><a class="code" href="def_8h.html#fa643307076987b713c73a755296142e">00106</a> <span class="preprocessor"></span><span class="preprocessor">#define NMT_Reset_Comunication      0x82</span>
<a name="l00107"></a>00107 <span class="preprocessor"></span>
<a name="l00108"></a>00108 <span class="comment">/* constantes used in the different state machines */</span>
<a name="l00109"></a>00109 <span class="comment">/* ----------------------------------------------- */</span>
<a name="l00110"></a>00110 <span class="comment">/* Must not be modified */</span>
<a name="l00111"></a><a class="code" href="def_8h.html#b9fd77c7944f50b395e6bb648e2c505e">00111</a> <span class="preprocessor">#define state1  0x01</span>
<a name="l00112"></a><a class="code" href="def_8h.html#c05f4cb35568d9c4627f126ef1688e4d">00112</a> <span class="preprocessor"></span><span class="preprocessor">#define state2  0x02</span>
<a name="l00113"></a><a class="code" href="def_8h.html#32583b36b084e43274f3e61d2afd67dd">00113</a> <span class="preprocessor"></span><span class="preprocessor">#define state3  0x03</span>
<a name="l00114"></a><a class="code" href="def_8h.html#9b5e8fb69ee4bc987183d203fa0d4c9b">00114</a> <span class="preprocessor"></span><span class="preprocessor">#define state4  0x04</span>
<a name="l00115"></a><a class="code" href="def_8h.html#71a32da348c22a5ed861020c2d3d0204">00115</a> <span class="preprocessor"></span><span class="preprocessor">#define state5  0x05</span>
<a name="l00116"></a><a class="code" href="def_8h.html#ab29e1fbab6336f4b30024e235c69da1">00116</a> <span class="preprocessor"></span><span class="preprocessor">#define state6  0x06</span>
<a name="l00117"></a><a class="code" href="def_8h.html#0f0f2f0f01eb90632d77963cb9ee1bb4">00117</a> <span class="preprocessor"></span><span class="preprocessor">#define state7  0x07</span>
<a name="l00118"></a><a class="code" href="def_8h.html#930978693617fa2c4469e94544f724d2">00118</a> <span class="preprocessor"></span><span class="preprocessor">#define state8  0x08</span>
<a name="l00119"></a><a class="code" href="def_8h.html#1913bca4471e94734a0e2d3efcf1a8c7">00119</a> <span class="preprocessor"></span><span class="preprocessor">#define state9  0x09</span>
<a name="l00120"></a><a class="code" href="def_8h.html#60890f106accbbcfa9c0c51c0468dcb8">00120</a> <span class="preprocessor"></span><span class="preprocessor">#define state10 0x0A</span>
<a name="l00121"></a><a class="code" href="def_8h.html#c71929345a7f1c523a13b5fccac8b5b4">00121</a> <span class="preprocessor"></span><span class="preprocessor">#define state11 0x0B</span>
<a name="l00122"></a>00122 <span class="preprocessor"></span>
<a name="l00123"></a>00123 <span class="preprocessor">#endif </span><span class="comment">/* __def_h__ */</span>
<a name="l00124"></a>00124 
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 2 19:10:16 2007 for CanFestival by&nbsp;
<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>