CO_OD.h 25 KB

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