size = max(size, int(values[1]))
typeinfos = ("UNS8", size, "visible_string", False)
elif values[0] == "DOMAIN":
- size = default_string_size
+ size = 0
for item in items:
size = max(size, len(item))
typeinfos = ("UNS8", size, "domain", False)
subentry_infos = Node.GetSubentryInfos(index, 0)
typename = Node.GetTypeName(subentry_infos["type"])
typeinfos = GetValidTypeInfos(typename, [values])
+ if typename is "DOMAIN" and index in variablelist:
+ if not typeinfos[1]:
+ raise ValueError("\nDomain variable not initialized\nindex : 0x%04X\nsubindex 0x00"%index)
texts["subIndexType"] = typeinfos[0]
if typeinfos[1] is not None:
texts["suffixe"] = "[%d]"%typeinfos[1]
if subIndex == len(values)-1:
sep = ""
value, comment = ComputeValue(typeinfos[2], value)
+ if len(value) is 2 and typename is "DOMAIN":
+ raise ValueError("\nDomain variable not initialized\nindex : 0x%04X\nsubindex 0x%02X"%(index, subIndex))
mappedVariableContent += " %s%s%s\n"%(value, sep, comment)
mappedVariableContent += " };\n"
else:
from types import *
import os, re, platform, sys, time, traceback, getopt
-__version__ = "$Revision: 1.45 $"
+__version__ = "$Revision: 1.46 $"
from node import OD_Subindex, OD_MultipleSubindexes, OD_IdenticalSubindexes, OD_IdenticalIndexes
if self.ModeSolo:
self.Manager = NodeManager()
for filepath in filesOpen:
- result = self.Manager.OpenFileInCurrent(filepath)
+ result = self.Manager.OpenFileInCurrent(os.path.abspath(filepath))
if isinstance(result, (IntType, LongType)):
new_editingpanel = EditingPanel(self.FileOpened, self, self.Manager)
new_editingpanel.SetIndex(result)