PLCControler.py
changeset 4063 6668dcbca915
parent 4059 03f007a175b5
equal deleted inserted replaced
4062:1994928ce3d2 4063:6668dcbca915
  1355         which makes it easy for a user to find a type in a menu.
  1355         which makes it easy for a user to find a type in a menu.
  1356         '''
  1356         '''
  1357         return [x for x, _y in TypeHierarchy_list if not x.startswith("ANY")]
  1357         return [x for x, _y in TypeHierarchy_list if not x.startswith("ANY")]
  1358 
  1358 
  1359     def IsOfType(self, typename, reference, debug=False):
  1359     def IsOfType(self, typename, reference, debug=False):
  1360         if typename is None or reference is None:
  1360         if reference is None or typename == reference:
  1361             return True
       
  1362         
       
  1363         typename = typename.upper()
       
  1364         reference = reference.upper()
       
  1365         if typename == reference:
       
  1366             return True
  1361             return True
  1367 
  1362 
  1368         basetype = TypeHierarchy.get(typename)
  1363         basetype = TypeHierarchy.get(typename)
  1369         if basetype is not None:
  1364         if basetype is not None:
  1370             return self.IsOfType(basetype, reference)
  1365             return self.IsOfType(basetype, reference)