Prevent potential problem with missing 0x1005 OD entry
authoretisserant
Thu, 30 Aug 2007 17:01:45 +0200
changeset 261 dbcd80bcab82
parent 260 1eafe582b6a1
child 262 f1c892f3f93c
Prevent potential problem with missing 0x1005 OD entry
objdictgen/gen_cfile.py
--- a/objdictgen/gen_cfile.py	Thu Aug 30 17:01:11 2007 +0200
+++ b/objdictgen/gen_cfile.py	Thu Aug 30 17:01:45 2007 +0200
@@ -317,6 +317,13 @@
 #                     Declaration of Particular Parameters
 #-------------------------------------------------------------------------------
 
+    if 0x1005 not in communicationlist:
+        entry_infos = Node.GetEntryInfos(0x1005)
+        texts["EntryName"] = entry_infos["name"]
+        indexContents[0x1005] = """\n/* index 0x1005 :   %(EntryName)s */
+                    UNS32 %(NodeName)s_obj1005 = 0x0;   /* 0 */
+"""%texts
+
     if 0x1006 not in communicationlist:
         entry_infos = Node.GetEntryInfos(0x1006)
         texts["EntryName"] = entry_infos["name"]