369 indexContents[0x1014] = """\n/* index 0x1014 : %(EntryName)s */ |
369 indexContents[0x1014] = """\n/* index 0x1014 : %(EntryName)s */ |
370 UNS32 %(NodeName)s_obj1014 = 0x0; /* 0 */ |
370 UNS32 %(NodeName)s_obj1014 = 0x0; /* 0 */ |
371 """%texts |
371 """%texts |
372 |
372 |
373 if 0x1016 in communicationlist: |
373 if 0x1016 in communicationlist: |
374 texts["nombre"] = Node.GetEntry(0x1016, 0) |
374 texts["heartBeatTimers_number"] = Node.GetEntry(0x1016, 0) |
375 else: |
375 else: |
376 texts["nombre"] = 0 |
376 texts["heartBeatTimers_number"] = 0 |
377 entry_infos = Node.GetEntryInfos(0x1016) |
377 entry_infos = Node.GetEntryInfos(0x1016) |
378 texts["EntryName"] = entry_infos["name"] |
378 texts["EntryName"] = entry_infos["name"] |
379 indexContents[0x1016] = """\n/* index 0x1016 : %(EntryName)s */ |
379 indexContents[0x1016] = """\n/* index 0x1016 : %(EntryName)s */ |
380 UNS8 %(NodeName)s_highestSubIndex_obj1016 = 0; |
380 UNS8 %(NodeName)s_highestSubIndex_obj1016 = 0; |
381 UNS32 %(NodeName)s_obj1016[]={0}; |
381 UNS32 %(NodeName)s_obj1016[]={0}; |
382 """%texts |
382 """%texts |
383 if texts["nombre"] > 0: |
383 |
384 strTimers = "TIMER_HANDLE %(NodeName)s_heartBeatTimers[%(nombre)d] = {TIMER_NONE,};\n"%texts |
|
385 else: |
|
386 strTimers = "TIMER_HANDLE %(NodeName)s_heartBeatTimers[1];\n"%texts |
|
387 |
|
388 if 0x1017 not in communicationlist: |
384 if 0x1017 not in communicationlist: |
389 entry_infos = Node.GetEntryInfos(0x1017) |
385 entry_infos = Node.GetEntryInfos(0x1017) |
390 texts["EntryName"] = entry_infos["name"] |
386 texts["EntryName"] = entry_infos["name"] |
391 indexContents[0x1017] = """\n/* index 0x1017 : %(EntryName)s */ |
387 indexContents[0x1017] = """\n/* index 0x1017 : %(EntryName)s */ |
392 UNS16 %(NodeName)s_obj1017 = 0x0; /* 0 */ |
388 UNS16 %(NodeName)s_obj1017 = 0x0; /* 0 */ |
457 /* Array of message processing information */ |
453 /* Array of message processing information */ |
458 |
454 |
459 const UNS8 %(NodeName)s_iam_a_slave = %(iam_a_slave)d; |
455 const UNS8 %(NodeName)s_iam_a_slave = %(iam_a_slave)d; |
460 |
456 |
461 """%texts |
457 """%texts |
462 fileContent += strTimers |
458 if texts["heartBeatTimers_number"] > 0: |
|
459 fileContent += "TIMER_HANDLE %(NodeName)s_heartBeatTimers[%(heartBeatTimers_number)d] = {TIMER_NONE,};\n"%texts |
|
460 else: |
|
461 fileContent += "TIMER_HANDLE %(NodeName)s_heartBeatTimers[1];\n"%texts |
463 |
462 |
464 fileContent += """ |
463 fileContent += """ |
465 /* |
464 /* |
466 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ |
465 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ |
467 |
466 |