diff -r 6787754b251b -r b6572d0336c3 doc/doxygen/html/example__objdict_8c-source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/doxygen/html/example__objdict_8c-source.html Mon Jun 04 17:59:50 2007 +0200 @@ -0,0 +1,597 @@ + +
+00001 /* +00002 This file is part of CanFestival, a library implementing CanOpen Stack. +00003 +00004 Copyright (C): Edouard TISSERANT and Francis DUPIN +00005 +00006 See COPYING file for copyrights details. +00007 +00008 This library is free software; you can redistribute it and/or +00009 modify it under the terms of the GNU Lesser General Public +00010 License as published by the Free Software Foundation; either +00011 version 2.1 of the License, or (at your option) any later version. +00012 +00013 This library is distributed in the hope that it will be useful, +00014 but WITHOUT ANY WARRANTY; without even the implied warranty of +00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +00016 Lesser General Public License for more details. +00017 +00018 You should have received a copy of the GNU Lesser General Public +00019 License along with this library; if not, write to the Free Software +00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +00021 */ +00022 +00023 +00024 #include <stddef.h> +00025 +00026 #include <canfestival/applicfg.h> +00027 #include "canfestival/def.h" +00028 #include "canfestival/can.h" +00029 #include "canfestival/objdictdef.h" +00030 #include "canfestival/pdo.h" +00031 #include "canfestival/sdo.h" +00032 #include "canfestival/sync.h" +00033 #include "canfestival/lifegrd.h" +00034 #include "canfestival/nmtSlave.h" +00035 +00036 /**************************************************************************/ +00037 /* Declaration of the mapped variables */ +00038 /**************************************************************************/ +00039 UNS8 seconds = 0; // Mapped at index 0x2000, subindex 0x01 +00040 UNS8 minutes = 0; // Mapped at index 0x2000, subindex 0x02 +00041 UNS8 hours = 0; // Mapped at index 0x2000, subindex 0x03 +00042 UNS8 day = 0; // Mapped at index 0x2000, subindex 0x04 +00043 UNS32 canopenErrNB = 0; // Mapped at index 0x6000, subindex 0x00 +00044 UNS32 canopenErrVAL = 0; // Mapped at index 0x6001, subindex 0x00 +00045 UNS8 strTest[10] = 0; // Mapped at index 0x6002, subindex 0x00 +00046 +00047 /**************************************************************************/ +00048 /* Declaration of the value range types */ +00049 /**************************************************************************/ +00050 +00051 +00052 +00053 UNS32 Linux_slave_valueRangeTest (UNS8 typeValue, UNS32 unsValue, REAL32 realValue) +00054 { +00055 switch (typeValue) { +00056 } +00057 return 0; +00058 } +00059 +00060 +00061 /**************************************************************************/ +00062 /* The node id */ +00063 /**************************************************************************/ +00064 /* node_id default value. +00065 This default value is deprecated. +00066 You should always overwrite this by using the function setNodeId(UNS8 nodeId) in your C code. +00067 */ +00068 #define NODE_ID 0x01 +00069 UNS8 Linux_slave_bDeviceNodeId = NODE_ID; +00070 +00071 +00072 //*****************************************************************************/ +00073 /* Array of message processing information */ +00074 /* Should not be modified */ +00075 +00076 const UNS8 Linux_slave_iam_a_slave = 1 +00077 +00078 // Macros definition +00079 +00080 /* Beware : +00081 index *must* be writen 4 numbers in hexa +00082 sub_index *must* be writen 2 numbers in hexa +00083 size_variable_in_UNS8 *must* be writen 2 numbers in hexa +00084 */ +00085 #define PDO_MAP(index, sub_index, size_variable_in_bits)\ +00086 0x ## index ## sub_index ## size_variable_in_bits +00087 +00092 #define DeclareIndexTableEntry(entryname, index) { (subindex*)entryname,sizeof(entryname)/sizeof(entryname[0]), index} +00093 +00094 //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ +00095 // +00096 // OBJECT DICTIONARY +00097 // +00098 //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ +00099 // Make your change, depending of your application +00100 +00101 +00102 /* index 0x1000 : Device type. +00103 You have to change the value below, so +00104 it fits your canopen-slave-module */ +00105 +00106 /* Not used, so, should not be modified */ +00107 +00108 UNS32 Linux_slave_obj1000 = 0; +00109 subindex Linux_slave_Index1000[] = +00110 { +00111 { RO, uint32, sizeof(UNS32), (void*)&Linux_slave_obj1000 } +00112 }; +00113 +00114 /* index 0x1001 : Error register. +00115 Change the entries to fit your application +00116 Not used, so, should not be modified */ +00117 /*const*/ UNS8 Linux_slave_obj1001 = 0x0; +00118 /*const*/ subindex Linux_slave_Index1001[] = +00119 { +00120 { RO, uint8, sizeof(UNS8), (void*)&Linux_slave_obj1001 } +00121 }; +00122 +00123 /* index 0x1005 : COB_ID SYNC */ +00124 /* Should not be modified */ +00125 UNS32 Linux_slave_obj1005 = 0x00000080; // bit 30 = 1 : device can generate a SYNC message +00126 // Beware, it is over written when the node +00127 // enters in reset mode +00128 // See initResetMode() in init.c +00129 /*const*/ subindex Linux_slave_Index1005[] = +00130 { +00131 { RW, uint32, sizeof(UNS32), (void*)&Linux_slave_obj1005 } +00132 }; +00133 +00134 /* index 0x1006 : SYNC period */ +00135 // For producing the SYNC signal every n micro-seconds. +00136 // Put 0 to not producing SYNC +00137 /*const*/ UNS32 Linux_slave_obj1006 = 0x0; +00138 // Default 0 to not produce SYNC // +00139 // Beware, it is over written when the +00140 // node enters in reset mode. +00141 // See initResetMode() in init.c +00142 /*const*/ subindex Linux_slave_Index1006[] = +00143 { +00144 { RW, uint32, sizeof(UNS32), (void*)&Linux_slave_obj1006 } +00145 }; +00146 +00147 /* index 0x1007 : Synchronous Window Length +00148 Seems to be needed by DS401 to generate the SYNC signal ! */ +00149 /*const*/ UNS32 Linux_slave_obj1007 = 0x0; /* Default 0 */ +00150 /*const*/ subindex Linux_slave_Index1007[] = +00151 { +00152 { RW, uint32, sizeof(UNS32), (void*)&Linux_slave_obj1007 } +00153 }; +00154 +00155 /* index 0x1008 : Manufacturer device name */ +00156 UNS8 Linux_slave_obj1008[] = "Appli_Slave_HC12"; /* Default 0 */ +00157 subindex Linux_slave_Index1008[] = +00158 { +00159 { RO, uint32, sizeof(Linux_slave_obj1008), (void*)&Linux_slave_obj1008 } +00160 }; +00161 +00162 /* index 0x1009 : Manufacturer hardware version */ +00163 UNS8 Linux_slave_obj1009[] = "__DATE__"; /* Default 0 */ +00164 subindex Linux_slave_Index1009[] = +00165 { +00166 { RO, uint32, sizeof(Linux_slave_obj1009), (void*)&Linux_slave_obj1009 } +00167 }; +00168 +00169 /* index 0x100A : Manufacturer software version */ +00170 UNS8 Linux_slave_obj100A[] = __TIME__; /* Default 0 */ +00171 subindex Linux_slave_Index100A[] = +00172 { +00173 { RO, uint32, Linux_slave_sizeof(obj100A), (void*)&Linux_slave_obj100A} +00174 }; +00175 +00176 +00177 TIMER_HANDLE Linux_slave_heartBeatTimers[1] = {TIMER_NONE,}; +00178 /* index 0x1016 : HeartBeat consumers +00179 The nodes which can send a heartbeat */ +00180 UNS32 Linux_slave_obj1016[] = {// Consumer time for each node +00181 0x00000000}; // Format 0x00NNTTTT (N=Node T=time in ms) +00182 +00183 UNS8 Linux_slave_obj1016_cnt = 1; // 1 nodes could send me +00184 // their heartbeat. +00185 subindex Linux_slave_Index1016[] = +00186 { +00187 { RO, uint8, sizeof(UNS8), (void*)&Linux_slave_obj1016_cnt }, +00188 { RW, uint32, sizeof(UNS32), (void*)&Linux_slave_obj1016[0] } +00189 }; +00190 +00191 /* index 0x1017 : Heartbeat producer +00192 Every HBProducerTime, the node sends its heartbeat */ +00193 UNS16 Linux_slave_obj1017 = 0; //HBProducerTime in ms. If 0 : not activated +00194 // Beware, it is over written when the +00195 // node enters in reset mode. +00196 // See initResetMode() in init.c +00197 subindex Linux_slave_Index1017[] = +00198 { +00199 { RW, uint16, sizeof(UNS16), &Linux_slave_obj1017 } +00200 }; +00201 +00202 /* index 0x1018 : Identity object */ +00205 /* Values can be modified */ +00206 +00207 s_identity Linux_slave_obj1018 = +00208 { +00209 4, // number of supported entries +00210 0, // Vendor-ID (given by the can-cia) +00211 0, // Product Code +00212 0, // Revision number +00213 0 // serial number +00214 }; +00215 +00216 subindex Linux_slave_Index1018[] = +00217 { +00218 { RO, uint8, sizeof(UNS8), (void*)&Linux_slave_obj1018.count }, +00219 { RO, uint32, sizeof(UNS32), (void*)&Linux_slave_obj1018.vendor_id}, +00220 { RO, uint32, sizeof(UNS32), (void*)&Linux_slave_obj1018.product_code}, +00221 { RO, uint32, sizeof(UNS32), (void*)&Linux_slave_obj1018.revision_number}, +00222 { RO, uint32, sizeof(UNS32), (void*)&Linux_slave_obj1018.serial_number} +00223 }; +00224 +00225 /* index 0x1200 : The SDO Server parameters */ +00226 /* BEWARE You cannot define more than one SDO server */ +00227 /* The values should not be modified here, +00228 but can be changed at runtime */ +00229 // Beware that the default values that you could put here +00230 // will be over written at the initialisation of the node. +00231 // See setNodeId() in init.c +00232 s_sdo_parameter Linux_slave_obj1200 = +00233 { 3, // Number of entries. Always 3 for the SDO +00234 0x601, // The cob_id transmited in CAN msg to the server +00235 0x581, // The cob_id received in CAN msg from the server +00236 0x01 // The node id of the client. Should not be modified +00237 }; +00238 subindex Linux_slave_Index1200[] = +00239 { +00240 { RO, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1200.count }, +00241 { RO, uint32, sizeof( UNS32), (void*)&Linux_slave_obj1200.cob_id_client }, +00242 { RO, uint32, sizeof( UNS32), (void*)&Linux_slave_obj1200.cob_id_server }, +00243 { RW, uint8, sizeof( UNS8), (void*)&Linux_slave_obj1200.node_id } +00244 }; +00245 +00246 /* index 0x1280 : SDO client parameter */ +00247 s_sdo_parameter Linux_slave_obj1280 = +00248 { 3, // Nb of entries +00249 0x600, // cobid transmited to the server. The good value should be 0x600 + server nodeId +00250 0x580, // cobid received from the server. The good value should be 0x580 + server nodeId +00251 0x01 // server NodeId +00252 }; +00253 subindex Linux_slave_Index1280[] = +00254 { +00255 { RO, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1280.count }, +00256 { RW, uint8, sizeof( UNS32 ), (void*)&Linux_slave_obj1280.cob_id_client }, +00257 { RW, uint8, sizeof( UNS32 ), (void*)&Linux_slave_obj1280.cob_id_server }, +00258 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1280.node_id } +00259 }; +00260 +00261 /* index 0x1400 : PDO receive communication parameter */ +00262 s_pdo_communication_parameter Linux_slave_obj1400 = +00263 { 2, // Largest subindex supported +00264 0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403) +00265 253 // Transmission type. See objdictdef.h +00266 }; +00267 subindex Linux_slave_Index1400[] = +00268 { +00269 { RO, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1400.count }, +00270 { RW, uint8, sizeof( UNS32 ), (void*)&Linux_slave_obj1400.cob_id }, +00271 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1400.type }, +00272 }; +00273 +00274 /* index 0x1401 : PDO receive communication parameter */ +00275 s_pdo_communication_parameter Linux_slave_obj1401 = +00276 { 2, // Largest subindex supported +00277 0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403) +00278 253 // Transmission type. See objdictdef.h +00279 }; +00280 subindex Linux_slave_Index1401[] = +00281 { +00282 { RO, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1401.count }, +00283 { RW, uint8, sizeof( UNS32 ), (void*)&Linux_slave_obj1401.cob_id }, +00284 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1401.type }, +00285 }; +00286 +00287 /* index 0x1402 : PDO receive communication parameter */ +00288 s_pdo_communication_parameter Linux_slave_obj1402 = +00289 { 2, // Largest subindex supported +00290 0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403) +00291 253 // Transmission type. See objdictdef.h +00292 }; +00293 subindex Linux_slave_Index1402[] = +00294 { +00295 { RO, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1402.count }, +00296 { RW, uint8, sizeof( UNS32 ), (void*)&Linux_slave_obj1402.cob_id }, +00297 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1402.type }, +00298 }; +00299 +00300 /* index 0x1600 : PDO receive mapping parameter of PDO communication index 0x1400 */ +00301 UNS8 Linux_slave_obj1600_cnt = 0; // Number of mapped variables +00302 UNS32 Linux_slave_obj1600_mappedVar[] = { +00303 0x00000000, +00304 0x00000000, +00305 0x00000000, +00306 0x00000000, +00307 0x00000000, +00308 0x00000000, +00309 0x00000000, +00310 0x00000000 +00311 }; +00312 subindex Linux_slave_Index1600[] = +00313 { +00314 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1600_cnt }, +00315 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1600_mappedVar[0]}, +00316 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1600_mappedVar[1]}, +00317 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1600_mappedVar[2]}, +00318 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1600_mappedVar[3]}, +00319 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1600_mappedVar[4]}, +00320 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1600_mappedVar[5]}, +00321 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1600_mappedVar[6]}, +00322 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1600_mappedVar[7]} +00323 }; +00324 +00325 /* index 0x1601 : PDO receive mapping parameter of PDO communication index 0x1401 */ +00326 UNS8 Linux_slave_obj1601_cnt = 0; // Number of mapped variables +00327 UNS32 Linux_slave_obj1601_mappedVar[] = { +00328 0x00000000, +00329 0x00000000, +00330 0x00000000, +00331 0x00000000, +00332 0x00000000, +00333 0x00000000, +00334 0x00000000, +00335 0x00000000 +00336 }; +00337 subindex Linux_slave_Index1601[] = +00338 { +00339 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1601_cnt }, +00340 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1601_mappedVar[0]}, +00341 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1601_mappedVar[1]}, +00342 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1601_mappedVar[2]}, +00343 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1601_mappedVar[3]}, +00344 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1601_mappedVar[4]}, +00345 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1601_mappedVar[5]}, +00346 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1601_mappedVar[6]}, +00347 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1601_mappedVar[7]} +00348 }; +00349 +00350 /* index 0x1602 : PDO receive mapping parameter of PDO communication index 0x1402 */ +00351 UNS8 Linux_slave_obj1602_cnt = 0; // Number of mapped variables +00352 UNS32 Linux_slave_obj1602_mappedVar[] = { +00353 0x00000000, +00354 0x00000000, +00355 0x00000000, +00356 0x00000000, +00357 0x00000000, +00358 0x00000000, +00359 0x00000000, +00360 0x00000000 +00361 }; +00362 subindex Linux_slave_Index1602[] = +00363 { +00364 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1602_cnt }, +00365 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1602_mappedVar[0]}, +00366 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1602_mappedVar[1]}, +00367 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1602_mappedVar[2]}, +00368 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1602_mappedVar[3]}, +00369 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1602_mappedVar[4]}, +00370 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1602_mappedVar[5]}, +00371 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1602_mappedVar[6]}, +00372 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1602_mappedVar[7]} +00373 }; +00374 +00375 /* index 0x1800 : PDO transmit communication parameter */ +00376 s_pdo_communication_parameter Linux_slave_obj1800 = +00377 { 2, // Largest subindex supported +00378 0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403) +00379 253 // Transmission type. See objdictdef.h +00380 }; +00381 subindex Linux_slave_Index1800[] = +00382 { +00383 { RO, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1800.count }, +00384 { RW, uint8, sizeof( UNS32 ), (void*)&Linux_slave_obj1800.cob_id }, +00385 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1800.type }, +00386 }; +00387 +00388 /* index 0x1801 : PDO transmit communication parameter */ +00389 s_pdo_communication_parameter Linux_slave_obj1801 = +00390 { 2, // Largest subindex supported +00391 0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403) +00392 253 // Transmission type. See objdictdef.h +00393 }; +00394 subindex Linux_slave_Index1801[] = +00395 { +00396 { RO, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1801.count }, +00397 { RW, uint8, sizeof( UNS32 ), (void*)&Linux_slave_obj1801.cob_id }, +00398 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1801.type }, +00399 }; +00400 +00401 /* index 0x1802 : PDO transmit communication parameter */ +00402 s_pdo_communication_parameter Linux_slave_obj1802 = +00403 { 2, // Largest subindex supported +00404 0x0, // Default COBID (overwritten at init for index 0x1400 to 0x1403) +00405 253 // Transmission type. See objdictdef.h +00406 }; +00407 subindex Linux_slave_Index1802[] = +00408 { +00409 { RO, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1802.count }, +00410 { RW, uint8, sizeof( UNS32 ), (void*)&Linux_slave_obj1802.cob_id }, +00411 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1802.type }, +00412 }; +00413 +00414 /* index 0x1A00 : PDO transmit mapping parameter of PDO communication index 0x1800 */ +00415 UNS8 Linux_slave_obj1A00_cnt = 0; // Number of mapped variables +00416 UNS32 Linux_slave_obj1A00_mappedVar[] = { +00417 0x00000000, +00418 0x00000000, +00419 0x00000000, +00420 0x00000000, +00421 0x00000000, +00422 0x00000000, +00423 0x00000000, +00424 0x00000000 +00425 }; +00426 subindex Linux_slave_Index1A00[] = +00427 { +00428 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1A00_cnt }, +00429 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A00_mappedVar[0]}, +00430 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A00_mappedVar[1]}, +00431 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A00_mappedVar[2]}, +00432 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A00_mappedVar[3]}, +00433 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A00_mappedVar[4]}, +00434 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A00_mappedVar[5]}, +00435 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A00_mappedVar[6]}, +00436 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A00_mappedVar[7]} +00437 }; +00438 +00439 /* index 0x1A01 : PDO transmit mapping parameter of PDO communication index 0x1801 */ +00440 UNS8 Linux_slave_obj1A01_cnt = 0; // Number of mapped variables +00441 UNS32 Linux_slave_obj1A01_mappedVar[] = { +00442 0x00000000, +00443 0x00000000, +00444 0x00000000, +00445 0x00000000, +00446 0x00000000, +00447 0x00000000, +00448 0x00000000, +00449 0x00000000 +00450 }; +00451 subindex Linux_slave_Index1A01[] = +00452 { +00453 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1A01_cnt }, +00454 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A01_mappedVar[0]}, +00455 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A01_mappedVar[1]}, +00456 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A01_mappedVar[2]}, +00457 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A01_mappedVar[3]}, +00458 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A01_mappedVar[4]}, +00459 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A01_mappedVar[5]}, +00460 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A01_mappedVar[6]}, +00461 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A01_mappedVar[7]} +00462 }; +00463 +00464 /* index 0x1A02 : PDO transmit mapping parameter of PDO communication index 0x1802 */ +00465 UNS8 Linux_slave_obj1A02_cnt = 0; // Number of mapped variables +00466 UNS32 Linux_slave_obj1A02_mappedVar[] = { +00467 0x00000000, +00468 0x00000000, +00469 0x00000000, +00470 0x00000000, +00471 0x00000000, +00472 0x00000000, +00473 0x00000000, +00474 0x00000000 +00475 }; +00476 subindex Linux_slave_Index1A02[] = +00477 { +00478 { RW, uint8, sizeof( UNS8 ), (void*)&Linux_slave_obj1A02_cnt }, +00479 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A02_mappedVar[0]}, +00480 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A02_mappedVar[1]}, +00481 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A02_mappedVar[2]}, +00482 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A02_mappedVar[3]}, +00483 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A02_mappedVar[4]}, +00484 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A02_mappedVar[5]}, +00485 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A02_mappedVar[6]}, +00486 { RW, uint32, sizeof( UNS32 ), (void*)&Linux_slave_obj1A02_mappedVar[7]} +00487 }; +00488 +00489 +00490 /* index 0x2000 : Mapped variable */ +00491 UNS8 Linux_slave_highestSubIndex_2000 = 4; // number of subindex - 1 +00492 subindex Linux_slave_Index2000[] = +00493 { +00494 { RO, uint8, sizeof (UNS8), (void*)&Linux_slave_highestSubIndex_2000 }, +00495 { RW, uint8, sizeof (UNS8), (void*)&seconds }, +00496 { RW, uint8, sizeof (UNS8), (void*)&minutes }, +00497 { RW, uint8, sizeof (UNS8), (void*)&hours }, +00498 { RW, uint8, sizeof (UNS8), (void*)&day } +00499 }; +00500 +00501 /* index 0x6000 : Mapped variable */ +00502 UNS8 Linux_slave_highestSubIndex_6000 = 0; // number of subindex - 1 +00503 subindex Linux_slave_Index6000[] = +00504 { +00505 { RW, uint32, sizeof (UNS32), (void*)&canopenErrNB } +00506 }; +00507 +00508 /* index 0x6001 : Mapped variable */ +00509 UNS8 Linux_slave_highestSubIndex_6001 = 0; // number of subindex - 1 +00510 subindex Linux_slave_Index6001[] = +00511 { +00512 { RW, uint32, sizeof (UNS32), (void*)&canopenErrVAL } +00513 }; +00514 +00515 /* index 0x6002 : Mapped variable */ +00516 UNS8 Linux_slave_highestSubIndex_6002 = 0; // number of subindex - 1 +00517 subindex Linux_slave_Index6002[] = +00518 { +00519 { RW, visible_string, sizeof (strTest), (void*)&strTest } +00520 }; +00521 +00522 const indextable Linux_slave_objdict[] = +00523 { +00524 DeclareIndexTableEntry(Linux_slave_Index1000, 0x1000), +00525 DeclareIndexTableEntry(Linux_slave_Index1001, 0x1001), +00526 DeclareIndexTableEntry(Linux_slave_Index1005, 0x1005), +00527 DeclareIndexTableEntry(Linux_slave_Index1006, 0x1006), +00528 DeclareIndexTableEntry(Linux_slave_Index1007, 0x1007), +00529 DeclareIndexTableEntry(Linux_slave_Index1008, 0x1008), +00530 DeclareIndexTableEntry(Linux_slave_Index1009, 0x1009), +00531 DeclareIndexTableEntry(Linux_slave_Index100A, 0x100A), +00532 DeclareIndexTableEntry(Linux_slave_Index1016, 0x1016), +00533 DeclareIndexTableEntry(Linux_slave_Index1017, 0x1017), +00534 DeclareIndexTableEntry(Linux_slave_Index1018, 0x1018), +00535 DeclareIndexTableEntry(Linux_slave_Index1200, 0x1200), +00536 DeclareIndexTableEntry(Linux_slave_Index1280, 0x1280), +00537 DeclareIndexTableEntry(Linux_slave_Index1400, 0x1400), +00538 DeclareIndexTableEntry(Linux_slave_Index1401, 0x1401), +00539 DeclareIndexTableEntry(Linux_slave_Index1402, 0x1402), +00540 DeclareIndexTableEntry(Linux_slave_Index1600, 0x1600), +00541 DeclareIndexTableEntry(Linux_slave_Index1601, 0x1601), +00542 DeclareIndexTableEntry(Linux_slave_Index1602, 0x1602), +00543 DeclareIndexTableEntry(Linux_slave_Index1800, 0x1800), +00544 DeclareIndexTableEntry(Linux_slave_Index1801, 0x1801), +00545 DeclareIndexTableEntry(Linux_slave_Index1802, 0x1802), +00546 DeclareIndexTableEntry(Linux_slave_Index1A00, 0x1A00), +00547 DeclareIndexTableEntry(Linux_slave_Index1A01, 0x1A01), +00548 DeclareIndexTableEntry(Linux_slave_Index1A02, 0x1A02), +00549 DeclareIndexTableEntry(Linux_slave_Index2000, 0x2000), +00550 DeclareIndexTableEntry(Linux_slave_Index6000, 0x6000), +00551 DeclareIndexTableEntry(Linux_slave_Index6001, 0x6001), +00552 DeclareIndexTableEntry(Linux_slave_Index6002, 0x6002), +00553 }; +00554 +00555 // To count at which received SYNC a PDO must be sent. +00556 // Even if no pdoTransmit are defined, at least one entry is computed +00557 // for compilations issues. +00558 UNS8 Linux_slave_count_sync[1] = {0, }; +00559 +00560 quick_index Linux_slave_firstIndex = { +00561 SDO_SVR : 11, +00562 SDO_CLT : 12, +00563 PDO_RCV : 13, +00564 PDO_RCV_MAP : 16, +00565 PDO_TRS : 19, +00566 PDO_TRS_MAP : 22 +00567 } +00568 +00569 quick_index Linux_slave_lastIndex{ +00570 SDO_SVR : 11, +00571 SDO_CLT : 12, +00572 PDO_RCV : 15, +00573 PDO_RCV_MAP : 18, +00574 PDO_TRS : 21, +00575 PDO_TRS_MAP : 24 +00576 } +00577 +00578 UNS16 Linux_slave_ObjdictSize = sizeof(Linux_slave_objdict)/sizeof(Linux_slave_objdict[0]); +00579 +