PLCControler.py
changeset 1751 c28db6f7616b
parent 1749 d73b64672238
child 1753 19f19c66b67e
equal deleted inserted replaced
1750:acf02488f37f 1751:c28db6f7616b
   153 
   153 
   154 
   154 
   155 class _VariableInfos(object):
   155 class _VariableInfos(object):
   156     __slots__ = ["Name", "Class", "Option", "Location", "InitialValue",
   156     __slots__ = ["Name", "Class", "Option", "Location", "InitialValue",
   157                  "Edit", "Documentation", "Type", "Tree", "Number"]
   157                  "Edit", "Documentation", "Type", "Tree", "Number"]
       
   158 
   158     def __init__(self, *args):
   159     def __init__(self, *args):
   159         for attr, value in zip(self.__slots__, args):
   160         for attr, value in zip(self.__slots__, args):
   160             setattr(self, attr, value if value is not None else "")
   161             setattr(self, attr, value if value is not None else "")
       
   162 
   161     def copy(self):
   163     def copy(self):
   162         return _VariableInfos(*[getattr(self, attr) for attr in self.__slots__])
   164         return _VariableInfos(*[getattr(self, attr) for attr in self.__slots__])
   163 
   165 
   164 
   166 
   165 class VariablesInfosFactory:
   167 class VariablesInfosFactory:
   224     return None
   226     return None
   225 
   227 
   226 
   228 
   227 class _VariablesTreeItemInfos(object):
   229 class _VariablesTreeItemInfos(object):
   228     __slots__ = ["name", "var_class", "type", "edit", "debug", "variables"]
   230     __slots__ = ["name", "var_class", "type", "edit", "debug", "variables"]
       
   231 
   229     def __init__(self, *args):
   232     def __init__(self, *args):
   230         for attr, value in zip(self.__slots__, args):
   233         for attr, value in zip(self.__slots__, args):
   231             setattr(self, attr, value if value is not None else "")
   234             setattr(self, attr, value if value is not None else "")
       
   235 
   232     def copy(self):
   236     def copy(self):
   233         return _VariableTreeItem(*[getattr(self, attr) for attr in self.__slots__])
   237         return _VariableTreeItem(*[getattr(self, attr) for attr in self.__slots__])
   234 
   238 
   235 
   239 
   236 class VariablesTreeInfosFactory:
   240 class VariablesTreeInfosFactory:
   370     ["refLocalId", "formalParameter", "points"])
   374     ["refLocalId", "formalParameter", "points"])
   371 
   375 
   372 
   376 
   373 class _ActionInfos(object):
   377 class _ActionInfos(object):
   374     __slots__ = ["qualifier", "type", "value", "duration", "indicator"]
   378     __slots__ = ["qualifier", "type", "value", "duration", "indicator"]
       
   379 
   375     def __init__(self, *args):
   380     def __init__(self, *args):
   376         for attr, value in zip(self.__slots__, args):
   381         for attr, value in zip(self.__slots__, args):
   377             setattr(self, attr, value if value is not None else "")
   382             setattr(self, attr, value if value is not None else "")
       
   383 
   378     def copy(self):
   384     def copy(self):
   379         return _ActionInfos(*[getattr(self, attr) for attr in self.__slots__])
   385         return _ActionInfos(*[getattr(self, attr) for attr in self.__slots__])
   380 
   386 
   381 
   387 
   382 class BlockInstanceFactory:
   388 class BlockInstanceFactory: