NNP STM Generic Remote Module git-main
Loading...
Searching...
No Matches
ObjDict.c
Go to the documentation of this file.
1
15/*This object dictionary file should only be modified by the Object Dictionary Editor */
16
17#include "ObjDict.h"
18
19/**************************************************************************/
20/* Declaration of mapped variables */
21/**************************************************************************/
22
23UNS8 clockRate = 0x0; /* Mapped at index 0x2000, subindex 0x00 */
24UNS8 X_Network = 0x0; /* Mapped at index 0x2002, subindex 0x00 */
25UNS16 Temperature = 0x0; /* Mapped at index 0x2003, subindex 0x00 */
26UNS8 TemperatureIMU[2] =
27{ 0x00, 0x00 };
28UNS8 Status_modeSelect = 0x0; /* Mapped at index 0x2010, subindex 0x01 */
29UNS8 Status_numTPDO = 1; /* Mapped at index 0x2010, subindex 0x02 */
30UNS8 Status_numRPDO = 1; /* Mapped at index 0x2010, subindex 0x03 */
31UNS8 Status_channelSelect = 0x0; /* Mapped at index 0x2010, subindex 0x04 */
32UNS8 Status_profileSelect = 0x0; /* Mapped at index 0x2010, subindex 0x05 */
33UNS8 Status_profileWrite = 0x0; /* Mapped at index 0x2010, subindex 0x06 */
34UNS8 Status_NodeId = 0x73;
35UNS16 Status_TestValue = 0x00;
36UNS16 Status_NodeTest = 0;
37UNS8 Accelerometers[4] =
38{ 0x00, 0x00, 0x00, 0x00 }; /* Mapped at index 0x2011, subindex 0x00 */
39UNS8 AccelerometersFiltered[4] =
40{ 0x00, 0x00, 0x00, 0x00 }; /* Mapped at index 0x2011, subindex 0x01 */
41INTEGER8 AccelerometersTilt[4] =
42{ 0x00, 0x00, 0x00, 0x00 }; /* Mapped at index 0x2011, subindex 0x02 */
43UNS8 Gyroscopes[6] =
44{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
45UNS8 Quaternion[16] =
46{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
47 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
48UNS8 AccelerometerSettings = 0; /* Mapped at index 0x2012, subindex 0x01 */
49UNS32 AddressRequest = 0x00000000;
50UNS8 memorySelect = 0x00;
51UNS8 triggerReadMemory = 0x00;
52UNS8 writeByteMemory = 0x00;
53UNS8 statusByteMemory = 0x00;
54UNS8 ReadMemoryData[36] =
55{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
56 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
57 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 , 0x00, 0x00, 0x00 };
58UNS16 addressCounter = 0x0000;
59UNS16 CAN_FormErrors = 0x00;
60UNS16 CAN_StuffErrors = 0x00;
61UNS16 CAN_BitErrors = 0x00;
62UNS16 CAN_OtherErrors = 0x00;
63UNS16 CAN_TotalErrors = 0x00;
64UNS16 CAN_Rx_ErrCounter = 0x00;
65UNS16 CAN_Tx_ErrCounter = 0x00;
66UNS16 CAN_Receive_BEI = 0x00;
67UNS16 CAN_Receive_Messages = 0x00;
68UNS16 CAN_Transmit_Messages = 0x00;
69UNS16 CAN_Interrupts_Off = 0x00;
70UNS8 DiagnosticsEnabled = 0x01;
71UNS8 Diagnostic_VIN = 0x00;
72UNS8 Diagnostic_VIC = 0x00;
73UNS8 Diagnostic_VOS = 0x00;
74UNS8 Diagnostic_VDD = 0x00;
75
76/**************************************************************************/
77/* Declaration of value range types */
78/**************************************************************************/
79
80#define valueRange_EMC 0x9F /* Type for index 0x1003 subindex 0x00 (only set of value 0 is possible) */
81UNS32 ObjDict_valueRangeTest (UNS8 typeValue, void * value)
82{
83 switch (typeValue) {
84 case valueRange_EMC:
85 if (*(UNS8*)value != (UNS8)0) return OD_VALUE_RANGE_EXCEEDED;
86 break;
87 }
88 return 0;
89}
90
91/**************************************************************************/
92/* The node id */
93/**************************************************************************/
94/* node_id default value.*/
95UNS8 ObjDict_bDeviceNodeId = 0x73;
96
97/**************************************************************************/
98/* Array of message processing information */
99
100const UNS8 ObjDict_iam_a_slave = 1;
101
102TIMER_HANDLE ObjDict_heartBeatTimers[1];
103
104/*
105$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
106
107 OBJECT DICTIONARY
108
109$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
110*/
111
112/* index 0x1000 : Device Type. */
113 UNS32 ObjDict_obj1000 = 0x53504E4E; /* 1397771854 */
114 const subindex ObjDict_Index1000[] =
115 {
116 { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1000 }
117 };
118
119/* index 0x1001 : Error Register. */
120 UNS8 ObjDict_obj1001 = 0x0; /* 0 */
121 const subindex ObjDict_Index1001[] =
122 {
123 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_obj1001 }
124 };
125
126/* index 0x1003 : Pre-defined Error Field */
127 UNS8 ObjDict_highestSubIndex_obj1003 = 0; /* number of subindex - 1*/
128 UNS32 ObjDict_obj1003[] =
129 {
130 0x0 /* 0 */
131 };
132 ODCallback_t ObjDict_Index1003_callbacks[] =
133 {
134 NULL,
135 NULL,
136 };
137 const subindex ObjDict_Index1003[] =
138 {
139 { RW, valueRange_EMC, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1003 },
140 { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1003[0] }
141 };
142
143/* index 0x1005 : SYNC COB ID */
144 UNS32 ObjDict_obj1005 = 0x0; /* 0 */
145
146/* index 0x1006 : Communication / Cycle Period */
147 UNS32 ObjDict_obj1006 = 0xFF; /* 0 */
148 const subindex ObjDict_Index1006[] =
149 {
150 { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1006 }
151 };
152
153
154/* index 0x1008 : Manufacturer Device Name. */
155 INTEGER8 ObjDict_obj1008[25] = "Generic NNP Remote Module";
156 const subindex ObjDict_Index1008[] =
157 {
158 { RO, visible_string, 25, (void*)&ObjDict_obj1008 }
159 };
160
161/* index 0x1014 : Emergency COB ID */
162 UNS32 ObjDict_obj1014 = 0x80 + 0x02; /* 128 + NodeID */
163
164/* index 0x1016 : Consumer Heartbeat Time */
165 UNS8 ObjDict_highestSubIndex_obj1016 = 0;
166 UNS32 ObjDict_obj1016[]={0};
167
168/* index 0x1017 : Producer Heartbeat Time. */
169 UNS16 ObjDict_obj1017 = 2311; /* - 2.3 sec prime update*/
170 ODCallback_t ObjDict_Index1017_callbacks[] =
171 {
172 NULL,
173 };
174 const subindex ObjDict_Index1017[] =
175 {
176 { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1017 }
177 };
178
179/* index 0x1018 : Identity. */
180 UNS8 ObjDict_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/
181 INTEGER8 ObjDict_obj1018_Vendor_ID[10] = "NNPS";
182 UNS8 ObjDict_obj1018_Product_Code = 0x4;
183 UNS32 ObjDict_obj1018_Revision_Number = APP_REV;
184 UNS32 ObjDict_obj1018_Serial_Number = 0x0000; /* 152592 */
185 const subindex ObjDict_Index1018[] =
186 {
187 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1018 },
188 { RO, visible_string, 10, (void*)&ObjDict_obj1018_Vendor_ID },
189 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_obj1018_Product_Code },
190 { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Revision_Number },
191 { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Serial_Number }
192 };
193
194/* index 0x1200 : Server SDO Parameter. */
195 UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/
196 UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x602; /* 1538 */
197 UNS32 ObjDict_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x582; /* 1410 */
198 const subindex ObjDict_Index1200[] =
199 {
200 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1200 },
201 { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO },
202 { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1200_COB_ID_Server_to_Client_Transmit_SDO }
203 };
204
205/* index 0x1400 : Receive PDO 1 Parameter. */
206 UNS8 ObjDict_highestSubIndex_obj1400 = 5; /* number of subindex - 1*/
207 UNS32 ObjDict_obj1400_Source_Address = 0x0; /* 387 */
208 UNS8 ObjDict_obj1400_Transmission_Type = 0xFF; /* 255 */
209 UNS16 ObjDict_obj1400_Inhibit_Time = 0x0; /* 0 */
210 UNS8 ObjDict_obj1400_Compatibility_Entry = 0x0; /* 0 */
211 UNS16 ObjDict_obj1400_Event_Timer = 0x0; /* 0 */
212 const subindex ObjDict_Index1400[] =
213 {
214 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1400 },
215 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1400_Source_Address },
216 { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1400_Transmission_Type },
217 { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1400_Inhibit_Time },
218 { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1400_Compatibility_Entry },
219 { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1400_Event_Timer }
220 };
221
222
223/* index 0x1600 : Receive PDO 1 Mapping. */
224 UNS8 ObjDict_highestSubIndex_obj1600 = 8; /* number of subindex - 1*/
225 UNS32 ObjDict_obj1600[] =
226 {
227 0x00, /* 0 */
228 0x00, /* 0 */
229 0x00, /* 0 */
230 0x00, /* 0 */
231 0x00, /* 0 */
232 0x00, /* 0 */
233 0x00, /* 0 */
234 0x00 /* 0 */
235 };
236 subindex ObjDict_Index1600[] =
237 {
238 { RW, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1600 },
239 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1600[0] },
240 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1600[1] },
241 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1600[2] },
242 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1600[3] },
243 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1600[4] },
244 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1600[5] },
245 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1600[6] },
246 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1600[7] }
247 };
248
249
250/* index 0x1800 : Transmit PDO 1 Parameter. */
251 UNS8 ObjDict_highestSubIndex_obj1800 = 5; /* number of subindex - 1*/
252 UNS32 ObjDict_obj1800_COB_ID_used_by_PDO = 0x182; /* use 0x80000182 to disable PDO */
253 UNS8 ObjDict_obj1800_Transmission_Type = 0xFD; /* use 0xFD to disable */
254 UNS16 ObjDict_obj1800_Inhibit_Time = 0x0; /* 0 */
255 UNS8 ObjDict_obj1800_Compatibility_Entry = 0x0; /* 0 */
256 UNS16 ObjDict_obj1800_Event_Timer = 0x0; /* 0 */
257 ODCallback_t ObjDict_Index1800_callbacks[] =
258 {
259 NULL,
260 NULL,
261 NULL,
262 NULL,
263 NULL,
264 NULL,
265 };
266 subindex ObjDict_Index1800[] =
267 {
268 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1800 },
269 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1800_COB_ID_used_by_PDO },
270 { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1800_Transmission_Type },
271 { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1800_Inhibit_Time },
272 { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1800_Compatibility_Entry },
273 { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1800_Event_Timer }
274 };
275
276
277/* index 0x1A00 : Transmit PDO 1 Mapping. */
278 UNS8 ObjDict_highestSubIndex_obj1A00 = 8; /* number of subindex - 1*/
279 UNS32 ObjDict_obj1A00[] =
280 {
281 0x00, /* 0 */
282 0x00, /* 0 */
283 0x00, /* 0 */
284 0x00, /* 0 */
285 0x00, /* 0 */
286 0x00, /* 0 */
287 0x00, /* 0 */
288 0x00 /* 0 */
289 };
290 const subindex ObjDict_Index1A00[] =
291 {
292 { RW, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1A00 },
293 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A00[0] },
294 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A00[1] },
295 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A00[2] },
296 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A00[3] },
297 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A00[4] },
298 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A00[5] },
299 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A00[6] },
300 { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A00[7] }
301 };
302
303
304/* index 0x2000 : Mapped variable Clock */
305 UNS8 ObjDict_highestSubIndex_obj2000 = 1; /* number of subindex - 1*/
306 ODCallback_t Clock_callbacks[] =
307 {
308 NULL,
309 NULL,
310 };
311 const subindex ObjDict_Index2000[] =
312 {
313 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj2000 },
314 { RW, uint8, sizeof (UNS8), (void*)&clockRate }
315 };
316
317/* index 0x2002 : Mapped variable X-Network */
318 UNS8 ObjDict_highestSubIndex_obj2002 = 1; /* number of subindex - 1*/
319 const subindex ObjDict_Index2002[] =
320 {
321 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj2002 },
322 { RW, uint8, sizeof (UNS8), (void*)&X_Network }
323 };
324
325/* index 0x2003 : Mapped variable Temperature */
326 UNS8 ObjDict_highestSubIndex_obj2003 = 1; /* number of subindex - 1*/
327 const subindex ObjDict_Index2003[] =
328 {
329 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj2003 },
330 { RO, uint16, sizeof (UNS16), (void*)&Temperature }
331 };
332
333
334
335/* index 0x2010 : Mapped variable Status */
336 UNS8 ObjDict_highestSubIndex_obj2010 = 9; /* number of subindex - 1*/
337 const subindex ObjDict_Index2010[] =
338 {
339 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj2010 },
340 { RW, uint8, sizeof (UNS8), (void*)&Status_modeSelect },
341 { RO, uint8, sizeof (UNS8), (void*)&Status_numTPDO },
342 { RO, uint8, sizeof (UNS8), (void*)&Status_numRPDO },
343 { RW, uint8, sizeof (UNS8), (void*)&Status_channelSelect },
344 { RW, uint8, sizeof (UNS8), (void*)&Status_profileSelect },
345 { RW, uint8, sizeof (UNS8), (void*)&Status_profileWrite },
346 { RO, uint8, sizeof (UNS8), (void*)&Status_NodeId },
347 { RW, uint16, sizeof (UNS16), (void*)&Status_TestValue },
348 { RW, uint16, sizeof (UNS16), (void*)&Status_NodeTest }
349
350 };
351
352/* index 0x2011 : Mapped variable Accelerometer Values */
353 UNS8 ObjDict_highestSubIndex_obj2011 = 4; /* number of subindex - 1*/
354 const subindex ObjDict_Index2011[] =
355 {
356 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj2011 },
357 { RO, uint8, 4, (void*)&Accelerometers[0] },
358 { RO, uint8, 4, (void*) &AccelerometersFiltered[0] },
359 { RO, int8, 4, (void*) &AccelerometersTilt[0] },
360 { RO, uint8, 16, (void*) &Quaternion[0] }
361 };
362
363/* index 0x2012 : Mapped variable Accelerometer Settings */
364 UNS8 ObjDict_highestSubIndex_obj2012 = 1; /* number of subindex - 1*/
365 const subindex ObjDict_Index2012[] =
366 {
367 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj2012 },
368 { RW, uint8, sizeof (UNS8), (void*) &AccelerometerSettings }
369 };
370
371
372/* index 0x2020 : Mapped variable RecordTransfer */
373 UNS8 ObjDict_highestSubIndex_obj2020 = 7;
374 const subindex ObjDict_Index2020[] =
375 {
376 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj2020 },
377 { RW, uint32, sizeof (UNS32), (void*)&AddressRequest }, // 1
378 { RW, uint8, 36, (void*)&ReadMemoryData[0] }, // 19
379 { RW, uint32, sizeof (UNS32), (void*)&addressCounter }, // 21
380 { RW, uint8, sizeof (UNS8), (void*)&memorySelect },
381 { RW, uint8, sizeof (UNS8), (void*)&triggerReadMemory },
382 { RW, uint8, sizeof (UNS8), (void*)&writeByteMemory },
383 { RW, uint8, sizeof (UNS8), (void*)&statusByteMemory }
384
385 };
386
387/* index 0x2500 : Mapped variable CAN */
388 UNS8 ObjDict_highestSubIndex_obj2500 = 11; /* number of subindex - 1*/
389 const subindex ObjDict_Index2500[] =
390 {
391 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj2500 },
392 { RO, uint16, sizeof (UNS16), (void*)&CAN_TotalErrors },
393 { RO, uint16, sizeof (UNS16), (void*)&CAN_BitErrors },
394 { RO, uint16, sizeof (UNS16), (void*)&CAN_StuffErrors },
395 { RO, uint16, sizeof (UNS16), (void*)&CAN_FormErrors },
396 { RO, uint16, sizeof (UNS16), (void*)&CAN_OtherErrors },
397 { RO, uint16, sizeof (UNS16), (void*)&CAN_Rx_ErrCounter },
398 { RO, uint16, sizeof (UNS16), (void*)&CAN_Tx_ErrCounter },
399 { RO, uint16, sizeof (UNS16), (void*)&CAN_Receive_BEI },
400 { RO, uint16, sizeof (UNS16), (void*)&CAN_Receive_Messages },
401 { RO, uint16, sizeof (UNS16), (void*)&CAN_Transmit_Messages },
402 { RO, uint16, sizeof (UNS16), (void*)&CAN_Interrupts_Off }
403 };
404
405/* index 0x2900 : Mapped variable RestoreList */
406 UNS8 ObjDict_highestSubIndex_obj2900 = 1; /* number of subindex - 1*/
407 UNS16 RestoreList[RESTORE_COUNT] = { 0x1400, /*RPDO Params(10)*/ \
408 0x1600, /*RPDO Mapping(32)*/ \
409 0x1800, /*TPDO Params(10)*/ \
410 0x1A00, /*TPDO Mapping(32)*/ \
411 0x2012, /*Accelerometer Settings*/};
412
413 const subindex ObjDict_Index2900[] =
414 {
415 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj2900 },
416 { RO, uint16, sizeof(RestoreList), (void*)&RestoreList[0] }
417 };
418
419/* index 0x3000 : Mapped variable Diagnostics */
420 UNS8 ObjDict_highestSubIndex_obj3000 = 5; /* number of subindex - 1*/
421 const subindex ObjDict_Index3000[] =
422 {
423 { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj3000 },
424 { RW, uint8, sizeof (UNS8), (void*)&DiagnosticsEnabled },
425 { RO, uint8, sizeof (UNS8), (void*)&Diagnostic_VIN },
426 { RO, uint8, sizeof (UNS8), (void*)&Diagnostic_VIC },
427 { RO, uint8, sizeof (UNS8), (void*)&Diagnostic_VOS },
428 { RO, uint8, sizeof (UNS8), (void*)&Diagnostic_VDD }
429 };
430
431/**************************************************************************/
432/* Declaration of variables */
433/**************************************************************************/
434
435const indextable ObjDict_objdict[] =
436{
437 { (subindex*)ObjDict_Index1000,sizeof(ObjDict_Index1000)/sizeof(ObjDict_Index1000[0]), 0x1000},
438 { (subindex*)ObjDict_Index1001,sizeof(ObjDict_Index1001)/sizeof(ObjDict_Index1001[0]), 0x1001},
439 { (subindex*)ObjDict_Index1006,sizeof(ObjDict_Index1006)/sizeof(ObjDict_Index1006[0]), 0x1006},
440 { (subindex*)ObjDict_Index1008,sizeof(ObjDict_Index1008)/sizeof(ObjDict_Index1008[0]), 0x1008},
441 { (subindex*)ObjDict_Index1017,sizeof(ObjDict_Index1017)/sizeof(ObjDict_Index1017[0]), 0x1017},
442 { (subindex*)ObjDict_Index1018,sizeof(ObjDict_Index1018)/sizeof(ObjDict_Index1018[0]), 0x1018},
443 { (subindex*)ObjDict_Index1200,sizeof(ObjDict_Index1200)/sizeof(ObjDict_Index1200[0]), 0x1200},
444 { (subindex*)ObjDict_Index1400,sizeof(ObjDict_Index1400)/sizeof(ObjDict_Index1400[0]), 0x1400},
445 { (subindex*)ObjDict_Index1600,sizeof(ObjDict_Index1600)/sizeof(ObjDict_Index1600[0]), 0x1600},
446 { (subindex*)ObjDict_Index1800,sizeof(ObjDict_Index1800)/sizeof(ObjDict_Index1800[0]), 0x1800},
447 { (subindex*)ObjDict_Index1A00,sizeof(ObjDict_Index1A00)/sizeof(ObjDict_Index1A00[0]), 0x1A00},
448 { (subindex*)ObjDict_Index2000,sizeof(ObjDict_Index2000)/sizeof(ObjDict_Index2000[0]), 0x2000},
449 { (subindex*)ObjDict_Index2002,sizeof(ObjDict_Index2002)/sizeof(ObjDict_Index2002[0]), 0x2002},
450 { (subindex*)ObjDict_Index2003,sizeof(ObjDict_Index2003)/sizeof(ObjDict_Index2003[0]), 0x2003},
451 { (subindex*)ObjDict_Index2010,sizeof(ObjDict_Index2010)/sizeof(ObjDict_Index2010[0]), 0x2010},
452 { (subindex*)ObjDict_Index2011,sizeof(ObjDict_Index2011)/sizeof(ObjDict_Index2011[0]), 0x2011},
453 { (subindex*)ObjDict_Index2012,sizeof(ObjDict_Index2012)/sizeof(ObjDict_Index2012[0]), 0x2012},
454 { (subindex*)ObjDict_Index2020,sizeof(ObjDict_Index2020)/sizeof(ObjDict_Index2020[0]), 0x2020},
455 { (subindex*)ObjDict_Index2500,sizeof(ObjDict_Index2500)/sizeof(ObjDict_Index2500[0]), 0x2500},
456 { (subindex*)ObjDict_Index2900,sizeof(ObjDict_Index2900)/sizeof(ObjDict_Index2900[0]), 0x2900},
457 { (subindex*)ObjDict_Index3000,sizeof(ObjDict_Index3000)/sizeof(ObjDict_Index3000[0]), 0x3000}
458};
459
460const indextable * ObjDict_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks)
461{
462 int i;
463 *callbacks = NULL;
464 switch(wIndex){
465 case 0x1000: i = 0;break;
466 case 0x1001: i = 1;break;
467 case 0x1006: i = 2;break;
468 case 0x1008: i = 3;break;
469 case 0x1017: i = 4;*callbacks = ObjDict_Index1017_callbacks; break;
470 case 0x1018: i = 5;break;
471 case 0x1200: i = 6;break;
472 case 0x1400: i = 7;break;
473 case 0x1600: i = 8;break;
474 case 0x1800: i = 9;*callbacks = ObjDict_Index1800_callbacks; break;
475 case 0x1A00: i = 10;break;
476 case 0x2000: i = 11;break;
477 case 0x2002: i = 12;break;
478 case 0x2003: i = 13;break;
479 case 0x2010: i = 14;break;
480 case 0x2011: i = 15;break;
481 case 0x2012: i = 16;break;
482 case 0x2020: i = 17;break;
483 case 0x2500: i = 18;break;
484 case 0x2900: i = 19;break;
485 case 0x3000: i = 20;break;
486 default:
487 *errorCode = OD_NO_SUCH_OBJECT;
488 return NULL;
489 }
490 *errorCode = OD_SUCCESSFUL;
491 return &ObjDict_objdict[i];
492}
493
494/*
495 * To count at which received SYNC a PDO must be sent.
496 * Even if no pdoTransmit are defined, at least one entry is computed
497 * for compilations issues.
498 */
499//Should match number of TPDOs!
500s_PDO_status ObjDict_PDO_status[1] = {s_PDO_status_Initializer};
501
502const quick_index ObjDict_firstIndex = {
503 6, /* SDO_SVR */
504 0, /* SDO_CLT */
505 7, /* PDO_RCV */
506 8, /* PDO_RCV_MAP */
507 9, /* PDO_TRS */
508 10 /* PDO_TRS_MAP */
509};
510
511const quick_index ObjDict_lastIndex = {
512 6, /* SDO_SVR */
513 0, /* SDO_CLT */
514 7, /* PDO_RCV */
515 8, /* PDO_RCV_MAP */
516 9, /* PDO_TRS */
517 10 /* PDO_TRS_MAP */
518};
519
520const UNS16 ObjDict_ObjdictSize = sizeof(ObjDict_objdict)/sizeof(ObjDict_objdict[0]);
521
522CO_Data ObjDict_Data = CANOPEN_NODE_DATA_INITIALIZER(ObjDict);
This file is generated by the NNP Tool – Object Dictionary Editor, as originally developed by CAN Fes...
#define UNS8
Unsigned int8 representation in CANFest.
Definition applicfg.h:25
#define UNS16
Unsigned int16 representation in CANFest.
Definition applicfg.h:26
#define INTEGER8
Signed int8 representation in CANFest.
Definition applicfg.h:15
#define UNS32
Unsigned int32 representation in CANFest.
Definition applicfg.h:27
#define OD_SUCCESSFUL
Definition def.h:16
#define RW
Definition objdictdef.h:60
This structure contains all necessary informations to define a CANOpen node.
Definition data.h:44