doc/doxygen/html/def_8h-source.html
author lbessard
Thu, 21 Jun 2007 17:03:33 +0200
changeset 222 cc20bc3d1287
parent 215 f49e5a6b7804
child 240 34654679f262
permissions -rw-r--r--
Mistake on a RPDO CobID corrected
<!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_2209bfb26110ae52d50da4cefad5e72f.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#cb82b94eb8e368e8c347b2273b6e514e">00031</a> <span class="preprocessor">#define OD_SUCCESSFUL                0x00000000</span>
<a name="l00032"></a><a class="code" href="def_8h.html#b83689b7bd34aa05b35545f3fdebbf2b">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#53e6ac773b19b6d22d423eed2aeaa2af">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#c52e3a6802662a7fe61a4efdc5b12e52">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#4c29f0a96ace19f670f469540c554fd5">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#61ccafe5e75997254b97211672886fa8">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#d5e7c0b1fe309d9d2f71a0eceb905d32">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#f483b080738d035e89f41e199f79c44e">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#8fd6804c3f6d1de461233025389396cb">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#d80b624c5c5760190d82246e7b04d239">00042</a> <span class="preprocessor">#define SDOABT_TOGGLE_NOT_ALTERNED   0x05030000</span>
<a name="l00043"></a><a class="code" href="def_8h.html#49351f44f9d88d66d47c221c7a0989c3">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#0b71ae8593fb9b65a2028509ed6b2128">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#467b188db8d383136b771267dcc22e68">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#192178577e5164ef0985d49522338c80">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#6baece8be8f9ab55223d41b535511b6f">00054</a> <span class="preprocessor">#define REQUEST 1</span>
<a name="l00055"></a><a class="code" href="def_8h.html#0c43b00ce49efc3586ad17dd80d73940">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#1803853d40a775230d2bd01a8a15ea91">00060</a> <span class="preprocessor">#define Rx 0</span>
<a name="l00061"></a><a class="code" href="def_8h.html#bbb96fbbe5d24b8f12a1fae621ced4d3">00061</a> <span class="preprocessor"></span><span class="preprocessor">#define Tx 1</span>
<a name="l00062"></a><a class="code" href="def_8h.html#a8cecfc5c5c054d2875c03e77b7be15d">00062</a> <span class="preprocessor"></span><span class="preprocessor">#define TRUE  1</span>
<a name="l00063"></a><a class="code" href="def_8h.html#a93f0eb578d23995850d61f7d61c55c1">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 <span class="comment">/* TODO: remove this limitation. do bit granularity mapping */</span>
<a name="l00066"></a><a class="code" href="def_8h.html#53c0d55da6d9ed06d7f55c595611eccc">00066</a> <span class="preprocessor">#define PDO_MAX_LEN 8    </span>
<a name="l00067"></a>00067 <span class="preprocessor"></span>                               
<a name="l00070"></a><a class="code" href="def_8h.html#b97393c9473837a2886583a1d5f69cf9">00070</a> <span class="preprocessor">#define SDO_RESET                0x0      </span><span class="comment">/* Transmission not started. Init state. */</span>
<a name="l00071"></a><a class="code" href="def_8h.html#7d9dad1485ed532424092d21b1e22ad2">00071</a> <span class="preprocessor">#define SDO_FINISHED             0x1      </span><span class="comment">/* data are available */</span>                          
<a name="l00072"></a><a class="code" href="def_8h.html#fbea04ded6a0ca1dfd63637bce9e0200">00072</a> <span class="preprocessor">#define SDO_ABORTED_RCV          0x80     </span><span class="comment">/* Received an abort message. Data not available */</span>
<a name="l00073"></a><a class="code" href="def_8h.html#2acbeebb18a23287a9fe30f1f9e3f964">00073</a> <span class="preprocessor">#define SDO_ABORTED_INTERNAL     0x85     </span><span class="comment">/* Aborted but not because of an abort message. */</span>
<a name="l00074"></a><a class="code" href="def_8h.html#749536d7d8c9a60beb8d3c8d1210b6d2">00074</a> <span class="preprocessor">#define SDO_DOWNLOAD_IN_PROGRESS 0x2 </span>
<a name="l00075"></a><a class="code" href="def_8h.html#f05e95a564b579b94d14a218264d13e1">00075</a> <span class="preprocessor"></span><span class="preprocessor">#define SDO_UPLOAD_IN_PROGRESS   0x3   </span>
<a name="l00076"></a>00076 <span class="preprocessor"></span>
<a name="l00077"></a>00077 <span class="comment">/* Status of the node during the SDO transfert : */</span>
<a name="l00078"></a><a class="code" href="def_8h.html#ee9faae3a3109b64e4987acb6eaa38b1">00078</a> <span class="preprocessor">#define SDO_SERVER  0x1</span>
<a name="l00079"></a><a class="code" href="def_8h.html#b1dccfddc653c2a7c4eaf3e1cc8d8e57">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define SDO_CLIENT  0x2</span>
<a name="l00080"></a><a class="code" href="def_8h.html#5c0ec02d3f240083717a69a83b71a882">00080</a> <span class="preprocessor"></span><span class="preprocessor">#define SDO_UNKNOWN 0x3             </span>
<a name="l00081"></a>00081 <span class="preprocessor"></span>
<a name="l00082"></a>00082 <span class="comment">/*  Function Codes </span>
<a name="l00083"></a>00083 <span class="comment">   ---------------</span>
<a name="l00084"></a>00084 <span class="comment">  defined in the canopen DS301 </span>
<a name="l00085"></a>00085 <span class="comment">*/</span>
<a name="l00086"></a><a class="code" href="def_8h.html#adbe0bb038acafa1c8adb0f98c870233">00086</a> <span class="preprocessor">#define NMT        0x0</span>
<a name="l00087"></a><a class="code" href="def_8h.html#9ac82e856c7683e23553431e5224d5f4">00087</a> <span class="preprocessor"></span><span class="preprocessor">#define SYNC       0x1</span>
<a name="l00088"></a><a class="code" href="def_8h.html#5a63bf5566f66e30f56bc17eea0e5e4b">00088</a> <span class="preprocessor"></span><span class="preprocessor">#define TIME_STAMP 0x2</span>
<a name="l00089"></a><a class="code" href="def_8h.html#0a250614ba4dca3e87f768efcb58f238">00089</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO1tx     0x3</span>
<a name="l00090"></a><a class="code" href="def_8h.html#17c7ee302d491b1ef74d2a4a795f82c6">00090</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO1rx     0x4</span>
<a name="l00091"></a><a class="code" href="def_8h.html#67f4224b2c072a82b37a4835ca1c75e1">00091</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO2tx     0x5</span>
<a name="l00092"></a><a class="code" href="def_8h.html#b23848999420738438097816fee3f25d">00092</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO2rx     0x6</span>
<a name="l00093"></a><a class="code" href="def_8h.html#00ef0f6ae698f9cb944b4302e66e6c83">00093</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO3tx     0x7</span>
<a name="l00094"></a><a class="code" href="def_8h.html#239d135abea5ec798461cad43f9286b5">00094</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO3rx     0x8</span>
<a name="l00095"></a><a class="code" href="def_8h.html#bda4cc9ec44d1fc524bfdcae030df4be">00095</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO4tx     0x9</span>
<a name="l00096"></a><a class="code" href="def_8h.html#282f714f745dd28e9a017044020aa3dc">00096</a> <span class="preprocessor"></span><span class="preprocessor">#define PDO4rx     0xA</span>
<a name="l00097"></a><a class="code" href="def_8h.html#74331e9b1d102bd0a3d5d9c1fc4f8212">00097</a> <span class="preprocessor"></span><span class="preprocessor">#define SDOtx      0xB</span>
<a name="l00098"></a><a class="code" href="def_8h.html#44318f0cf5176db0eedd1c8519bd8f35">00098</a> <span class="preprocessor"></span><span class="preprocessor">#define SDOrx      0xC</span>
<a name="l00099"></a><a class="code" href="def_8h.html#78d5d3f71db9f360c9e3d3953707b0c1">00099</a> <span class="preprocessor"></span><span class="preprocessor">#define NODE_GUARD 0xE</span>
<a name="l00100"></a>00100 <span class="preprocessor"></span>
<a name="l00101"></a>00101 <span class="comment">/* NMT Command Specifier, sent by master to change a slave state */</span>
<a name="l00102"></a>00102 <span class="comment">/* ------------------------------------------------------------- */</span>
<a name="l00103"></a>00103 <span class="comment">/* Should not be modified */</span>
<a name="l00104"></a><a class="code" href="def_8h.html#9654207fdc32413aa792c8a2dc9d414f">00104</a> <span class="preprocessor">#define NMT_Start_Node              0x01</span>
<a name="l00105"></a><a class="code" href="def_8h.html#7aae99c67e9ebd9491a246baf92570fa">00105</a> <span class="preprocessor"></span><span class="preprocessor">#define NMT_Stop_Node               0x02</span>
<a name="l00106"></a><a class="code" href="def_8h.html#bdbbb7ecbe41058f60f684c10e07e08e">00106</a> <span class="preprocessor"></span><span class="preprocessor">#define NMT_Enter_PreOperational    0x80</span>
<a name="l00107"></a><a class="code" href="def_8h.html#b349b5574a1ea67ff0ef76b9f9b6319e">00107</a> <span class="preprocessor"></span><span class="preprocessor">#define NMT_Reset_Node              0x81</span>
<a name="l00108"></a><a class="code" href="def_8h.html#fd16bdbe636d7c761a9e015a7d7653ce">00108</a> <span class="preprocessor"></span><span class="preprocessor">#define NMT_Reset_Comunication      0x82</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span>
<a name="l00110"></a>00110 <span class="comment">/* constantes used in the different state machines */</span>
<a name="l00111"></a>00111 <span class="comment">/* ----------------------------------------------- */</span>
<a name="l00112"></a>00112 <span class="comment">/* Must not be modified */</span>
<a name="l00113"></a><a class="code" href="def_8h.html#5191a3bccf57126087e6ec2cca448c32">00113</a> <span class="preprocessor">#define state1  0x01</span>
<a name="l00114"></a><a class="code" href="def_8h.html#9f640b93661d9249bd7bd6559f397ca5">00114</a> <span class="preprocessor"></span><span class="preprocessor">#define state2  0x02</span>
<a name="l00115"></a><a class="code" href="def_8h.html#07ae7798ee670d4db12e71b373c60e0a">00115</a> <span class="preprocessor"></span><span class="preprocessor">#define state3  0x03</span>
<a name="l00116"></a><a class="code" href="def_8h.html#b92f9ec8f5b287c274ebe9c91fda5154">00116</a> <span class="preprocessor"></span><span class="preprocessor">#define state4  0x04</span>
<a name="l00117"></a><a class="code" href="def_8h.html#9c791e43dcf77cb119f7d79db324d1f8">00117</a> <span class="preprocessor"></span><span class="preprocessor">#define state5  0x05</span>
<a name="l00118"></a><a class="code" href="def_8h.html#7e97b68eb7a2d1d418638e8e6af0ed6b">00118</a> <span class="preprocessor"></span><span class="preprocessor">#define state6  0x06</span>
<a name="l00119"></a><a class="code" href="def_8h.html#b05e63de91a6e1268f15c0939cfdea8b">00119</a> <span class="preprocessor"></span><span class="preprocessor">#define state7  0x07</span>
<a name="l00120"></a><a class="code" href="def_8h.html#8894c53332e89c6588e84f5dc15c7584">00120</a> <span class="preprocessor"></span><span class="preprocessor">#define state8  0x08</span>
<a name="l00121"></a><a class="code" href="def_8h.html#df53b1fe0dcea7b0f27d351da8cb2c96">00121</a> <span class="preprocessor"></span><span class="preprocessor">#define state9  0x09</span>
<a name="l00122"></a><a class="code" href="def_8h.html#865105d41739f49a0419502cb2683be1">00122</a> <span class="preprocessor"></span><span class="preprocessor">#define state10 0x0A</span>
<a name="l00123"></a><a class="code" href="def_8h.html#be94c50e18055692ad2e0d220f09aea5">00123</a> <span class="preprocessor"></span><span class="preprocessor">#define state11 0x0B</span>
<a name="l00124"></a>00124 <span class="preprocessor"></span>
<a name="l00125"></a>00125 <span class="preprocessor">#endif </span><span class="comment">/* __def_h__ */</span>
<a name="l00126"></a>00126 
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Jun 8 08:51:39 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>