1 /* 2 * Copyright (c) 2019 Vestas Wind Systems A/S 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /******************************************************************************* 8 9 File - CO_OD.c/CO_OD.h 10 CANopen Object Dictionary. 11 12 This file was automatically generated with libedssharp Object 13 Dictionary Editor v0.8-7-g2e53bbc DON'T EDIT THIS FILE MANUALLY !!!! 14 *******************************************************************************/ 15 16 17 #ifndef CO_OD_H_ 18 #define CO_OD_H_ 19 20 /******************************************************************************* 21 CANopen DATA TYPES 22 *******************************************************************************/ 23 typedef bool_t BOOLEAN; 24 typedef uint8_t UNSIGNED8; 25 typedef uint16_t UNSIGNED16; 26 typedef uint32_t UNSIGNED32; 27 typedef uint64_t UNSIGNED64; 28 typedef int8_t INTEGER8; 29 typedef int16_t INTEGER16; 30 typedef int32_t INTEGER32; 31 typedef int64_t INTEGER64; 32 typedef float32_t REAL32; 33 typedef float64_t REAL64; 34 typedef char_t VISIBLE_STRING; 35 typedef oChar_t OCTET_STRING; 36 37 #ifdef DOMAIN 38 #undef DOMAIN 39 #endif 40 41 typedef domain_t DOMAIN; 42 43 #ifndef timeOfDay_t 44 typedef union { 45 unsigned long long ullValue; 46 struct { 47 unsigned long ms : 28; 48 unsigned reserved : 4; 49 unsigned days : 16; 50 unsigned reserved2 : 16; 51 }; 52 } timeOfDay_t; 53 #endif 54 55 typedef timeOfDay_t TIME_OF_DAY; 56 typedef timeOfDay_t TIME_DIFFERENCE; 57 58 59 /******************************************************************************* 60 FILE INFO: 61 FileName: objdict.eds 62 FileVersion: 1 63 CreationTime: 2:52PM 64 CreationDate: 09-18-2019 65 CreatedBy: 66 ******************************************************************************/ 67 68 69 /******************************************************************************* 70 DEVICE INFO: 71 VendorName: 72 VendorNumber 0 73 ProductName: Zephyr RTOS CANopen sample 74 ProductNumber: 0 75 ******************************************************************************/ 76 77 78 /******************************************************************************* 79 FEATURES 80 *******************************************************************************/ 81 #define CO_NO_SYNC 1 /* Associated objects: 1005-1007 */ 82 #define CO_NO_EMERGENCY 1 /* Associated objects: 1014, 1015 */ 83 #define CO_NO_TIME 1 /* Associated objects: 1012, 1013 */ 84 #define CO_NO_SDO_SERVER 1 /* Associated objects: 1200-127F */ 85 #define CO_NO_SDO_CLIENT 0 /* Associated objects: 1280-12FF */ 86 #define CO_NO_LSS_SERVER 0 /* LSS Slave */ 87 #define CO_NO_LSS_CLIENT 0 /* LSS Master */ 88 #define CO_NO_RPDO 4 /* Associated objects: 14xx, 16xx */ 89 #define CO_NO_TPDO 4 /* Associated objects: 18xx, 1Axx */ 90 #define CO_NO_NMT_MASTER 0 91 92 93 /******************************************************************************* 94 OBJECT DICTIONARY 95 *******************************************************************************/ 96 #define CO_OD_NoOfElements 45 97 98 99 /******************************************************************************* 100 TYPE DEFINITIONS FOR RECORDS 101 *******************************************************************************/ 102 /*1018 */ typedef struct { 103 UNSIGNED8 maxSubIndex; 104 UNSIGNED32 vendorID; 105 UNSIGNED32 productCode; 106 UNSIGNED32 revisionNumber; 107 UNSIGNED32 serialNumber; 108 } OD_identity_t; 109 /*1200 */ typedef struct { 110 UNSIGNED8 maxSubIndex; 111 UNSIGNED32 COB_IDClientToServer; 112 UNSIGNED32 COB_IDServerToClient; 113 } OD_SDOServerParameter_t; 114 /*1280 */ typedef struct { 115 UNSIGNED8 maxSubIndex; 116 UNSIGNED32 COB_IDClientToServer; 117 UNSIGNED32 COB_IDServerToClient; 118 UNSIGNED8 nodeIDOfTheSDOServer; 119 } OD_SDOClientParameter_t; 120 /*1400 */ typedef struct { 121 UNSIGNED8 maxSubIndex; 122 UNSIGNED32 COB_IDUsedByRPDO; 123 UNSIGNED8 transmissionType; 124 } OD_RPDOCommunicationParameter_t; 125 /*1600 */ typedef struct { 126 UNSIGNED8 numberOfMappedObjects; 127 UNSIGNED32 mappedObject1; 128 UNSIGNED32 mappedObject2; 129 UNSIGNED32 mappedObject3; 130 UNSIGNED32 mappedObject4; 131 UNSIGNED32 mappedObject5; 132 UNSIGNED32 mappedObject6; 133 UNSIGNED32 mappedObject7; 134 UNSIGNED32 mappedObject8; 135 } OD_RPDOMappingParameter_t; 136 /*1800 */ typedef struct { 137 UNSIGNED8 maxSubIndex; 138 UNSIGNED32 COB_IDUsedByTPDO; 139 UNSIGNED8 transmissionType; 140 UNSIGNED16 inhibitTime; 141 UNSIGNED8 compatibilityEntry; 142 UNSIGNED16 eventTimer; 143 UNSIGNED8 SYNCStartValue; 144 } OD_TPDOCommunicationParameter_t; 145 /*1a00 */ typedef struct { 146 UNSIGNED8 numberOfMappedObjects; 147 UNSIGNED32 mappedObject1; 148 UNSIGNED32 mappedObject2; 149 UNSIGNED32 mappedObject3; 150 UNSIGNED32 mappedObject4; 151 UNSIGNED32 mappedObject5; 152 UNSIGNED32 mappedObject6; 153 UNSIGNED32 mappedObject7; 154 UNSIGNED32 mappedObject8; 155 } OD_TPDOMappingParameter_t; 156 157 /******************************************************************************* 158 TYPE DEFINITIONS FOR OBJECT DICTIONARY INDEXES 159 160 some of those are redundant with CO_SDO.h CO_ObjDicId_t <Common CiA301 object 161 dictionary entries> 162 *******************************************************************************/ 163 /*1000 */ 164 #define OD_1000_deviceType 0x1000 165 166 /*1001 */ 167 #define OD_1001_errorRegister 0x1001 168 169 /*1002 */ 170 #define OD_1002_manufacturerStatusRegister 0x1002 171 172 /*1003 */ 173 #define OD_1003_preDefinedErrorField 0x1003 174 175 #define OD_1003_0_preDefinedErrorField_maxSubIndex 0 176 #define OD_1003_1_preDefinedErrorField_standardErrorField 1 177 #define OD_1003_2_preDefinedErrorField_standardErrorField 2 178 #define OD_1003_3_preDefinedErrorField_standardErrorField 3 179 #define OD_1003_4_preDefinedErrorField_standardErrorField 4 180 #define OD_1003_5_preDefinedErrorField_standardErrorField 5 181 #define OD_1003_6_preDefinedErrorField_standardErrorField 6 182 #define OD_1003_7_preDefinedErrorField_standardErrorField 7 183 #define OD_1003_8_preDefinedErrorField_standardErrorField 8 184 185 /*1005 */ 186 #define OD_1005_COB_ID_SYNCMessage 0x1005 187 188 /*1006 */ 189 #define OD_1006_communicationCyclePeriod 0x1006 190 191 /*1007 */ 192 #define OD_1007_synchronousWindowLength 0x1007 193 194 /*1008 */ 195 #define OD_1008_manufacturerDeviceName 0x1008 196 197 /*1009 */ 198 #define OD_1009_manufacturerHardwareVersion 0x1009 199 200 /*100a */ 201 #define OD_100a_manufacturerSoftwareVersion 0x100a 202 203 /*1010 */ 204 #define OD_1010_storeParameters 0x1010 205 206 #define OD_1010_0_storeParameters_maxSubIndex 0 207 #define OD_1010_1_storeParameters_saveAllParameters 1 208 209 /*1011 */ 210 #define OD_1011_restoreDefaultParameters 0x1011 211 212 #define OD_1011_0_restoreDefaultParameters_maxSubIndex 0 213 #define OD_1011_1_restoreDefaultParameters_restoreAllDefaultParameters 1 214 215 /*1012 */ 216 #define OD_1012_COB_ID_TIME 0x1012 217 218 /*1014 */ 219 #define OD_1014_COB_ID_EMCY 0x1014 220 221 /*1015 */ 222 #define OD_1015_inhibitTimeEMCY 0x1015 223 224 /*1016 */ 225 #define OD_1016_consumerHeartbeatTime 0x1016 226 227 #define OD_1016_0_consumerHeartbeatTime_maxSubIndex 0 228 #define OD_1016_1_consumerHeartbeatTime_consumerHeartbeatTime 1 229 #define OD_1016_2_consumerHeartbeatTime_consumerHeartbeatTime 2 230 #define OD_1016_3_consumerHeartbeatTime_consumerHeartbeatTime 3 231 #define OD_1016_4_consumerHeartbeatTime_consumerHeartbeatTime 4 232 233 /*1017 */ 234 #define OD_1017_producerHeartbeatTime 0x1017 235 236 /*1018 */ 237 #define OD_1018_identity 0x1018 238 239 #define OD_1018_0_identity_maxSubIndex 0 240 #define OD_1018_1_identity_vendorID 1 241 #define OD_1018_2_identity_productCode 2 242 #define OD_1018_3_identity_revisionNumber 3 243 #define OD_1018_4_identity_serialNumber 4 244 245 /*1019 */ 246 #define OD_1019_synchronousCounterOverflowValue 0x1019 247 248 /*1029 */ 249 #define OD_1029_errorBehavior 0x1029 250 251 #define OD_1029_0_errorBehavior_maxSubIndex 0 252 #define OD_1029_1_errorBehavior_communication 1 253 #define OD_1029_2_errorBehavior_communicationOther 2 254 #define OD_1029_3_errorBehavior_communicationPassive 3 255 #define OD_1029_4_errorBehavior_generic 4 256 #define OD_1029_5_errorBehavior_deviceProfile 5 257 #define OD_1029_6_errorBehavior_manufacturerSpecific 6 258 259 /*1200 */ 260 #define OD_1200_SDOServerParameter 0x1200 261 262 #define OD_1200_0_SDOServerParameter_maxSubIndex 0 263 #define OD_1200_1_SDOServerParameter_COB_IDClientToServer 1 264 #define OD_1200_2_SDOServerParameter_COB_IDServerToClient 2 265 266 /*1400 */ 267 #define OD_1400_RPDOCommunicationParameter 0x1400 268 269 #define OD_1400_0_RPDOCommunicationParameter_maxSubIndex 0 270 #define OD_1400_1_RPDOCommunicationParameter_COB_IDUsedByRPDO 1 271 #define OD_1400_2_RPDOCommunicationParameter_transmissionType 2 272 273 /*1401 */ 274 #define OD_1401_RPDOCommunicationParameter 0x1401 275 276 #define OD_1401_0_RPDOCommunicationParameter_maxSubIndex 0 277 #define OD_1401_1_RPDOCommunicationParameter_COB_IDUsedByRPDO 1 278 #define OD_1401_2_RPDOCommunicationParameter_transmissionType 2 279 280 /*1402 */ 281 #define OD_1402_RPDOCommunicationParameter 0x1402 282 283 #define OD_1402_0_RPDOCommunicationParameter_maxSubIndex 0 284 #define OD_1402_1_RPDOCommunicationParameter_COB_IDUsedByRPDO 1 285 #define OD_1402_2_RPDOCommunicationParameter_transmissionType 2 286 287 /*1403 */ 288 #define OD_1403_RPDOCommunicationParameter 0x1403 289 290 #define OD_1403_0_RPDOCommunicationParameter_maxSubIndex 0 291 #define OD_1403_1_RPDOCommunicationParameter_COB_IDUsedByRPDO 1 292 #define OD_1403_2_RPDOCommunicationParameter_transmissionType 2 293 294 /*1600 */ 295 #define OD_1600_RPDOMappingParameter 0x1600 296 297 #define OD_1600_0_RPDOMappingParameter_maxSubIndex 0 298 #define OD_1600_1_RPDOMappingParameter_mappedObject1 1 299 #define OD_1600_2_RPDOMappingParameter_mappedObject2 2 300 #define OD_1600_3_RPDOMappingParameter_mappedObject3 3 301 #define OD_1600_4_RPDOMappingParameter_mappedObject4 4 302 #define OD_1600_5_RPDOMappingParameter_mappedObject5 5 303 #define OD_1600_6_RPDOMappingParameter_mappedObject6 6 304 #define OD_1600_7_RPDOMappingParameter_mappedObject7 7 305 #define OD_1600_8_RPDOMappingParameter_mappedObject8 8 306 307 /*1601 */ 308 #define OD_1601_RPDOMappingParameter 0x1601 309 310 #define OD_1601_0_RPDOMappingParameter_maxSubIndex 0 311 #define OD_1601_1_RPDOMappingParameter_mappedObject1 1 312 #define OD_1601_2_RPDOMappingParameter_mappedObject2 2 313 #define OD_1601_3_RPDOMappingParameter_mappedObject3 3 314 #define OD_1601_4_RPDOMappingParameter_mappedObject4 4 315 #define OD_1601_5_RPDOMappingParameter_mappedObject5 5 316 #define OD_1601_6_RPDOMappingParameter_mappedObject6 6 317 #define OD_1601_7_RPDOMappingParameter_mappedObject7 7 318 #define OD_1601_8_RPDOMappingParameter_mappedObject8 8 319 320 /*1602 */ 321 #define OD_1602_RPDOMappingParameter 0x1602 322 323 #define OD_1602_0_RPDOMappingParameter_maxSubIndex 0 324 #define OD_1602_1_RPDOMappingParameter_mappedObject1 1 325 #define OD_1602_2_RPDOMappingParameter_mappedObject2 2 326 #define OD_1602_3_RPDOMappingParameter_mappedObject3 3 327 #define OD_1602_4_RPDOMappingParameter_mappedObject4 4 328 #define OD_1602_5_RPDOMappingParameter_mappedObject5 5 329 #define OD_1602_6_RPDOMappingParameter_mappedObject6 6 330 #define OD_1602_7_RPDOMappingParameter_mappedObject7 7 331 #define OD_1602_8_RPDOMappingParameter_mappedObject8 8 332 333 /*1603 */ 334 #define OD_1603_RPDOMappingParameter 0x1603 335 336 #define OD_1603_0_RPDOMappingParameter_maxSubIndex 0 337 #define OD_1603_1_RPDOMappingParameter_mappedObject1 1 338 #define OD_1603_2_RPDOMappingParameter_mappedObject2 2 339 #define OD_1603_3_RPDOMappingParameter_mappedObject3 3 340 #define OD_1603_4_RPDOMappingParameter_mappedObject4 4 341 #define OD_1603_5_RPDOMappingParameter_mappedObject5 5 342 #define OD_1603_6_RPDOMappingParameter_mappedObject6 6 343 #define OD_1603_7_RPDOMappingParameter_mappedObject7 7 344 #define OD_1603_8_RPDOMappingParameter_mappedObject8 8 345 346 /*1800 */ 347 #define OD_1800_TPDOCommunicationParameter 0x1800 348 349 #define OD_1800_0_TPDOCommunicationParameter_maxSubIndex 0 350 #define OD_1800_1_TPDOCommunicationParameter_COB_IDUsedByTPDO 1 351 #define OD_1800_2_TPDOCommunicationParameter_transmissionType 2 352 #define OD_1800_3_TPDOCommunicationParameter_inhibitTime 3 353 #define OD_1800_4_TPDOCommunicationParameter_compatibilityEntry 4 354 #define OD_1800_5_TPDOCommunicationParameter_eventTimer 5 355 #define OD_1800_6_TPDOCommunicationParameter_SYNCStartValue 6 356 357 /*1801 */ 358 #define OD_1801_TPDOCommunicationParameter 0x1801 359 360 #define OD_1801_0_TPDOCommunicationParameter_maxSubIndex 0 361 #define OD_1801_1_TPDOCommunicationParameter_COB_IDUsedByTPDO 1 362 #define OD_1801_2_TPDOCommunicationParameter_transmissionType 2 363 #define OD_1801_3_TPDOCommunicationParameter_inhibitTime 3 364 #define OD_1801_4_TPDOCommunicationParameter_compatibilityEntry 4 365 #define OD_1801_5_TPDOCommunicationParameter_eventTimer 5 366 #define OD_1801_6_TPDOCommunicationParameter_SYNCStartValue 6 367 368 /*1802 */ 369 #define OD_1802_TPDOCommunicationParameter 0x1802 370 371 #define OD_1802_0_TPDOCommunicationParameter_maxSubIndex 0 372 #define OD_1802_1_TPDOCommunicationParameter_COB_IDUsedByTPDO 1 373 #define OD_1802_2_TPDOCommunicationParameter_transmissionType 2 374 #define OD_1802_3_TPDOCommunicationParameter_inhibitTime 3 375 #define OD_1802_4_TPDOCommunicationParameter_compatibilityEntry 4 376 #define OD_1802_5_TPDOCommunicationParameter_eventTimer 5 377 #define OD_1802_6_TPDOCommunicationParameter_SYNCStartValue 6 378 379 /*1803 */ 380 #define OD_1803_TPDOCommunicationParameter 0x1803 381 382 #define OD_1803_0_TPDOCommunicationParameter_maxSubIndex 0 383 #define OD_1803_1_TPDOCommunicationParameter_COB_IDUsedByTPDO 1 384 #define OD_1803_2_TPDOCommunicationParameter_transmissionType 2 385 #define OD_1803_3_TPDOCommunicationParameter_inhibitTime 3 386 #define OD_1803_4_TPDOCommunicationParameter_compatibilityEntry 4 387 #define OD_1803_5_TPDOCommunicationParameter_eventTimer 5 388 #define OD_1803_6_TPDOCommunicationParameter_SYNCStartValue 6 389 390 /*1a00 */ 391 #define OD_1a00_TPDOMappingParameter 0x1a00 392 393 #define OD_1a00_0_TPDOMappingParameter_maxSubIndex 0 394 #define OD_1a00_1_TPDOMappingParameter_mappedObject1 1 395 #define OD_1a00_2_TPDOMappingParameter_mappedObject2 2 396 #define OD_1a00_3_TPDOMappingParameter_mappedObject3 3 397 #define OD_1a00_4_TPDOMappingParameter_mappedObject4 4 398 #define OD_1a00_5_TPDOMappingParameter_mappedObject5 5 399 #define OD_1a00_6_TPDOMappingParameter_mappedObject6 6 400 #define OD_1a00_7_TPDOMappingParameter_mappedObject7 7 401 #define OD_1a00_8_TPDOMappingParameter_mappedObject8 8 402 403 /*1a01 */ 404 #define OD_1a01_TPDOMappingParameter 0x1a01 405 406 #define OD_1a01_0_TPDOMappingParameter_maxSubIndex 0 407 #define OD_1a01_1_TPDOMappingParameter_mappedObject1 1 408 #define OD_1a01_2_TPDOMappingParameter_mappedObject2 2 409 #define OD_1a01_3_TPDOMappingParameter_mappedObject3 3 410 #define OD_1a01_4_TPDOMappingParameter_mappedObject4 4 411 #define OD_1a01_5_TPDOMappingParameter_mappedObject5 5 412 #define OD_1a01_6_TPDOMappingParameter_mappedObject6 6 413 #define OD_1a01_7_TPDOMappingParameter_mappedObject7 7 414 #define OD_1a01_8_TPDOMappingParameter_mappedObject8 8 415 416 /*1a02 */ 417 #define OD_1a02_TPDOMappingParameter 0x1a02 418 419 #define OD_1a02_0_TPDOMappingParameter_maxSubIndex 0 420 #define OD_1a02_1_TPDOMappingParameter_mappedObject1 1 421 #define OD_1a02_2_TPDOMappingParameter_mappedObject2 2 422 #define OD_1a02_3_TPDOMappingParameter_mappedObject3 3 423 #define OD_1a02_4_TPDOMappingParameter_mappedObject4 4 424 #define OD_1a02_5_TPDOMappingParameter_mappedObject5 5 425 #define OD_1a02_6_TPDOMappingParameter_mappedObject6 6 426 #define OD_1a02_7_TPDOMappingParameter_mappedObject7 7 427 #define OD_1a02_8_TPDOMappingParameter_mappedObject8 8 428 429 /*1a03 */ 430 #define OD_1a03_TPDOMappingParameter 0x1a03 431 432 #define OD_1a03_0_TPDOMappingParameter_maxSubIndex 0 433 #define OD_1a03_1_TPDOMappingParameter_mappedObject1 1 434 #define OD_1a03_2_TPDOMappingParameter_mappedObject2 2 435 #define OD_1a03_3_TPDOMappingParameter_mappedObject3 3 436 #define OD_1a03_4_TPDOMappingParameter_mappedObject4 4 437 #define OD_1a03_5_TPDOMappingParameter_mappedObject5 5 438 #define OD_1a03_6_TPDOMappingParameter_mappedObject6 6 439 #define OD_1a03_7_TPDOMappingParameter_mappedObject7 7 440 #define OD_1a03_8_TPDOMappingParameter_mappedObject8 8 441 442 /*1f50 */ 443 #define OD_1f50_programData 0x1f50 444 445 #define OD_1f50_0_programData_maxSubIndex 0 446 #define OD_1f50_1_programData_ 1 447 448 /*1f51 */ 449 #define OD_1f51_programControl 0x1f51 450 451 #define OD_1f51_0_programControl_maxSubIndex 0 452 #define OD_1f51_1_programControl_ 1 453 454 /*1f56 */ 455 #define OD_1f56_programSoftwareIdentification 0x1f56 456 457 #define OD_1f56_0_programSoftwareIdentification_maxSubIndex 0 458 #define OD_1f56_1_programSoftwareIdentification_ 1 459 460 /*1f57 */ 461 #define OD_1f57_flashStatusIdentification 0x1f57 462 463 #define OD_1f57_0_flashStatusIdentification_maxSubIndex 0 464 #define OD_1f57_1_flashStatusIdentification_ 1 465 466 /*1f80 */ 467 #define OD_1f80_NMTStartup 0x1f80 468 469 /*2100 */ 470 #define OD_2100_errorStatusBits 0x2100 471 472 /*2101 */ 473 #define OD_2101_powerOnCounter 0x2101 474 475 /*2102 */ 476 #define OD_2102_buttonPressCounter 0x2102 477 478 /******************************************************************************* 479 STRUCTURES FOR VARIABLES IN DIFFERENT MEMORY LOCATIONS 480 *******************************************************************************/ 481 #define CO_OD_FIRST_LAST_WORD 0x55 /* Any value from 0x01 to 0xFE. If changed, EEPROM will be reinitialized. */ 482 483 /***** Structure for ROM variables ********************************************/ 484 struct sCO_OD_ROM { 485 UNSIGNED32 FirstWord; 486 487 /*1000 */ UNSIGNED32 deviceType; 488 /*1005 */ UNSIGNED32 COB_ID_SYNCMessage; 489 /*1006 */ UNSIGNED32 communicationCyclePeriod; 490 /*1007 */ UNSIGNED32 synchronousWindowLength; 491 /*1008 */ VISIBLE_STRING manufacturerDeviceName[23]; 492 /*1009 */ VISIBLE_STRING manufacturerHardwareVersion[4]; 493 /*100a */ VISIBLE_STRING manufacturerSoftwareVersion[4]; 494 /*1012 */ UNSIGNED32 COB_ID_TIME; 495 /*1014 */ UNSIGNED32 COB_ID_EMCY; 496 /*1015 */ UNSIGNED16 inhibitTimeEMCY; 497 /*1016 */ UNSIGNED32 consumerHeartbeatTime[4]; 498 /*1017 */ UNSIGNED16 producerHeartbeatTime; 499 /*1018 */ OD_identity_t identity; 500 /*1019 */ UNSIGNED8 synchronousCounterOverflowValue; 501 /*1029 */ UNSIGNED8 errorBehavior[6]; 502 /*1200 */ OD_SDOServerParameter_t SDOServerParameter[1]; 503 /*1400 */ OD_RPDOCommunicationParameter_t RPDOCommunicationParameter[4]; 504 /*1600 */ OD_RPDOMappingParameter_t RPDOMappingParameter[4]; 505 /*1800 */ OD_TPDOCommunicationParameter_t TPDOCommunicationParameter[4]; 506 /*1a00 */ OD_TPDOMappingParameter_t TPDOMappingParameter[4]; 507 /*1f80 */ UNSIGNED32 NMTStartup; 508 509 UNSIGNED32 LastWord; 510 }; 511 512 /***** Structure for RAM variables ********************************************/ 513 struct sCO_OD_RAM { 514 UNSIGNED32 FirstWord; 515 516 /*1001 */ UNSIGNED8 errorRegister; 517 /*1002 */ UNSIGNED32 manufacturerStatusRegister; 518 /*1003 */ UNSIGNED32 preDefinedErrorField[8]; 519 /*1010 */ UNSIGNED32 storeParameters[1]; 520 /*1011 */ UNSIGNED32 restoreDefaultParameters[1]; 521 /*1f50 */ DOMAIN programData[1]; 522 /*1f51 */ UNSIGNED8 programControl[1]; 523 /*1f56 */ UNSIGNED32 programSoftwareIdentification[1]; 524 /*1f57 */ UNSIGNED32 flashStatusIdentification[1]; 525 /*2100 */ OCTET_STRING errorStatusBits[10]; 526 /*2102 */ UNSIGNED32 buttonPressCounter; 527 528 UNSIGNED32 LastWord; 529 }; 530 531 /***** Structure for EEPROM variables ********************************************/ 532 struct sCO_OD_EEPROM { 533 UNSIGNED32 FirstWord; 534 535 /*2101 */ UNSIGNED32 powerOnCounter; 536 537 UNSIGNED32 LastWord; 538 }; 539 540 /***** Declaration of Object Dictionary variables *****************************/ 541 extern struct sCO_OD_ROM CO_OD_ROM; 542 543 extern struct sCO_OD_RAM CO_OD_RAM; 544 545 extern struct sCO_OD_EEPROM CO_OD_EEPROM; 546 547 /******************************************************************************* 548 ALIASES FOR OBJECT DICTIONARY VARIABLES 549 *******************************************************************************/ 550 /*1000, Data Type: UNSIGNED32 */ 551 #define OD_deviceType CO_OD_ROM.deviceType 552 553 /*1001, Data Type: UNSIGNED8 */ 554 #define OD_errorRegister CO_OD_RAM.errorRegister 555 556 /*1002, Data Type: UNSIGNED32 */ 557 #define OD_manufacturerStatusRegister CO_OD_RAM.manufacturerStatusRegister 558 559 /*1003, Data Type: UNSIGNED32, Array[8] */ 560 #define OD_preDefinedErrorField CO_OD_RAM.preDefinedErrorField 561 #define ODL_preDefinedErrorField_arrayLength 8 562 #define ODA_preDefinedErrorField_standardErrorField 0 563 564 /*1005, Data Type: UNSIGNED32 */ 565 #define OD_COB_ID_SYNCMessage CO_OD_ROM.COB_ID_SYNCMessage 566 567 /*1006, Data Type: UNSIGNED32 */ 568 #define OD_communicationCyclePeriod CO_OD_ROM.communicationCyclePeriod 569 570 /*1007, Data Type: UNSIGNED32 */ 571 #define OD_synchronousWindowLength CO_OD_ROM.synchronousWindowLength 572 573 /*1008, Data Type: VISIBLE_STRING */ 574 #define OD_manufacturerDeviceName CO_OD_ROM.manufacturerDeviceName 575 #define ODL_manufacturerDeviceName_stringLength 23 576 577 /*1009, Data Type: VISIBLE_STRING */ 578 #define OD_manufacturerHardwareVersion CO_OD_ROM.manufacturerHardwareVersion 579 #define ODL_manufacturerHardwareVersion_stringLength 4 580 581 /*100a, Data Type: VISIBLE_STRING */ 582 #define OD_manufacturerSoftwareVersion CO_OD_ROM.manufacturerSoftwareVersion 583 #define ODL_manufacturerSoftwareVersion_stringLength 4 584 585 /*1010, Data Type: UNSIGNED32, Array[1] */ 586 #define OD_storeParameters CO_OD_RAM.storeParameters 587 #define ODL_storeParameters_arrayLength 1 588 #define ODA_storeParameters_saveAllParameters 0 589 590 /*1011, Data Type: UNSIGNED32, Array[1] */ 591 #define OD_restoreDefaultParameters CO_OD_RAM.restoreDefaultParameters 592 #define ODL_restoreDefaultParameters_arrayLength 1 593 #define ODA_restoreDefaultParameters_restoreAllDefaultParameters 0 594 595 /*1012, Data Type: UNSIGNED32 */ 596 #define OD_COB_ID_TIME CO_OD_ROM.COB_ID_TIME 597 598 /*1014, Data Type: UNSIGNED32 */ 599 #define OD_COB_ID_EMCY CO_OD_ROM.COB_ID_EMCY 600 601 /*1015, Data Type: UNSIGNED16 */ 602 #define OD_inhibitTimeEMCY CO_OD_ROM.inhibitTimeEMCY 603 604 /*1016, Data Type: UNSIGNED32, Array[4] */ 605 #define OD_consumerHeartbeatTime CO_OD_ROM.consumerHeartbeatTime 606 #define ODL_consumerHeartbeatTime_arrayLength 4 607 #define ODA_consumerHeartbeatTime_consumerHeartbeatTime 0 608 609 /*1017, Data Type: UNSIGNED16 */ 610 #define OD_producerHeartbeatTime CO_OD_ROM.producerHeartbeatTime 611 612 /*1018, Data Type: identity_t */ 613 #define OD_identity CO_OD_ROM.identity 614 615 /*1019, Data Type: UNSIGNED8 */ 616 #define OD_synchronousCounterOverflowValue CO_OD_ROM.synchronousCounterOverflowValue 617 618 /*1029, Data Type: UNSIGNED8, Array[6] */ 619 #define OD_errorBehavior CO_OD_ROM.errorBehavior 620 #define ODL_errorBehavior_arrayLength 6 621 #define ODA_errorBehavior_communication 0 622 #define ODA_errorBehavior_communicationOther 1 623 #define ODA_errorBehavior_communicationPassive 2 624 #define ODA_errorBehavior_generic 3 625 #define ODA_errorBehavior_deviceProfile 4 626 #define ODA_errorBehavior_manufacturerSpecific 5 627 628 /*1200, Data Type: SDOServerParameter_t */ 629 #define OD_SDOServerParameter CO_OD_ROM.SDOServerParameter 630 631 /*1400, Data Type: RPDOCommunicationParameter_t */ 632 #define OD_RPDOCommunicationParameter CO_OD_ROM.RPDOCommunicationParameter 633 634 /*1600, Data Type: RPDOMappingParameter_t */ 635 #define OD_RPDOMappingParameter CO_OD_ROM.RPDOMappingParameter 636 637 /*1800, Data Type: TPDOCommunicationParameter_t */ 638 #define OD_TPDOCommunicationParameter CO_OD_ROM.TPDOCommunicationParameter 639 640 /*1a00, Data Type: TPDOMappingParameter_t */ 641 #define OD_TPDOMappingParameter CO_OD_ROM.TPDOMappingParameter 642 643 /*1f50, Data Type: DOMAIN, Array[1] */ 644 #define OD_programData CO_OD_RAM.programData 645 #define ODL_programData_arrayLength 1 646 #define ODA_programData_ 0 647 648 /*1f51, Data Type: UNSIGNED8, Array[1] */ 649 #define OD_programControl CO_OD_RAM.programControl 650 #define ODL_programControl_arrayLength 1 651 #define ODA_programControl_ 0 652 653 /*1f56, Data Type: UNSIGNED32, Array[1] */ 654 #define OD_programSoftwareIdentification CO_OD_RAM.programSoftwareIdentification 655 #define ODL_programSoftwareIdentification_arrayLength 1 656 #define ODA_programSoftwareIdentification_ 0 657 658 /*1f57, Data Type: UNSIGNED32, Array[1] */ 659 #define OD_flashStatusIdentification CO_OD_RAM.flashStatusIdentification 660 #define ODL_flashStatusIdentification_arrayLength 1 661 #define ODA_flashStatusIdentification_ 0 662 663 /*1f80, Data Type: UNSIGNED32 */ 664 #define OD_NMTStartup CO_OD_ROM.NMTStartup 665 666 /*2100, Data Type: OCTET_STRING */ 667 #define OD_errorStatusBits CO_OD_RAM.errorStatusBits 668 #define ODL_errorStatusBits_stringLength 10 669 670 /*2101, Data Type: UNSIGNED32 */ 671 #define OD_powerOnCounter CO_OD_EEPROM.powerOnCounter 672 673 /*2102, Data Type: UNSIGNED32 */ 674 #define OD_buttonPressCounter CO_OD_RAM.buttonPressCounter 675 676 #endif 677