PLCControler.py
changeset 491 d22a4a95fd5e
parent 484 acef952101a5
child 500 b3499ff87178
equal deleted inserted replaced
490:c47a09e1da3e 491:d22a4a95fd5e
  1243         if project is not None:
  1243         if project is not None:
  1244             blocktypes.extend(project.GetCustomBlockResource())
  1244             blocktypes.extend(project.GetCustomBlockResource())
  1245         return blocktypes
  1245         return blocktypes
  1246 
  1246 
  1247     # Return Data Types checking for recursion
  1247     # Return Data Types checking for recursion
  1248     def GetDataTypes(self, tagname = "", basetypes = True, complextypes = True, debug = False):
  1248     def GetDataTypes(self, tagname = "", basetypes = True, debug = False):
  1249         if basetypes:
  1249         if basetypes:
  1250             datatypes = self.GetBaseTypes()
  1250             datatypes = self.GetBaseTypes()
  1251         else:
  1251         else:
  1252             datatypes = []
  1252             datatypes = []
  1253         project = self.GetProject(debug)
  1253         project = self.GetProject(debug)
  1254         if project is not None:
  1254         if project is not None:
  1255             name = ""
  1255             name = ""
  1256             words = tagname.split("::")
  1256             words = tagname.split("::")
  1257             if words[0] in ["D"]:
  1257             if words[0] in ["D"]:
  1258                 name = words[1]
  1258                 name = words[1]
  1259             datatypes.extend(project.GetCustomDataTypes(name, complextypes=complextypes))
  1259             datatypes.extend(project.GetCustomDataTypes(name))
  1260         return datatypes
  1260         return datatypes
  1261 
  1261 
  1262     # Return Base Type of given possible derived type
  1262     # Return Base Type of given possible derived type
  1263     def GetBaseType(self, type, debug = False):
  1263     def GetBaseType(self, type, debug = False):
  1264         project = self.GetProject(debug)
  1264         project = self.GetProject(debug)