220 value = "0x%X"%value |
220 value = "0x%X"%value |
221 strIndex += " %s%s%s\n"%(value, sep, comment) |
221 strIndex += " %s%s%s\n"%(value, sep, comment) |
222 strIndex += " };\n" |
222 strIndex += " };\n" |
223 else: |
223 else: |
224 |
224 |
|
225 texts["parent"] = FormatName(entry_infos["name"]) |
225 # Entry type is ARRAY |
226 # Entry type is ARRAY |
226 for subIndex, value in enumerate(values): |
227 for subIndex, value in enumerate(values): |
227 texts["subIndex"] = subIndex |
228 texts["subIndex"] = subIndex |
228 if subIndex > 0: |
229 if subIndex > 0: |
229 subentry_infos = Manager.GetSubentryInfos(index, subIndex) |
230 subentry_infos = Manager.GetSubentryInfos(index, subIndex) |
241 else: |
242 else: |
242 texts["value"] = "0x%X"%value |
243 texts["value"] = "0x%X"%value |
243 texts["comment"] = "\t// %s"%str(value) |
244 texts["comment"] = "\t// %s"%str(value) |
244 texts["name"] = FormatName(subentry_infos["name"]) |
245 texts["name"] = FormatName(subentry_infos["name"]) |
245 if index in variablelist: |
246 if index in variablelist: |
246 strDeclareHeader += "extern %(subIndexType)s %(name)s%(suffixe)s;\t\t// Mapped at index 0x%(index)04X, subindex 0x%(subIndex)02X\n"%texts |
247 strDeclareHeader += "extern %(subIndexType)s %(parent)s_%(name)s%(suffixe)s;\t\t// Mapped at index 0x%(index)04X, subindex 0x%(subIndex)02X\n"%texts |
247 mappedVariableContent += "%(subIndexType)s %(name)s%(suffixe)s = %(value)s;\t\t// Mapped at index 0x%(index)04X, subindex 0x%(subIndex)02X\n"%texts |
248 mappedVariableContent += "%(subIndexType)s %(parent)s_%(name)s%(suffixe)s = %(value)s;\t\t// Mapped at index 0x%(index)04X, subindex 0x%(subIndex)02X\n"%texts |
248 else: |
249 else: |
249 strIndex += " %(subIndexType)s %(NodeName)s_obj%(index)04X_%(name)s%(suffixe)s = %(value)s;%(comment)s\n"%texts |
250 strIndex += " %(subIndexType)s %(NodeName)s_obj%(index)04X_%(name)s%(suffixe)s = %(value)s;%(comment)s\n"%texts |
250 if callbacks: |
251 if callbacks: |
251 texts["name"] = FormatName(entry_infos["name"]) |
252 strDeclareHeader += "extern ODCallback_t %(parent)s_callbacks[];\t\t// Callbacks of index0x%(index)04X\n"%texts |
252 strDeclareHeader += "extern ODCallback_t %(name)s_callbacks[];\t\t// Callbacks of index0x%(index)04X\n"%texts |
|
253 |
253 |
254 # Generating Dictionary C++ entry |
254 # Generating Dictionary C++ entry |
255 if callbacks: |
255 if callbacks: |
256 if index in variablelist: |
256 if index in variablelist: |
257 name = FormatName(entry_infos["name"]) |
257 name = FormatName(entry_infos["name"]) |