PLCControler.py
changeset 4059 03f007a175b5
parent 4008 f30573e98600
child 4063 6668dcbca915
equal deleted inserted replaced
4058:5472b88bbc9d 4059:03f007a175b5
  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 reference is None or typename == reference:
  1360         if typename is None or reference is None:
       
  1361             return True
       
  1362         
       
  1363         typename = typename.upper()
       
  1364         reference = reference.upper()
       
  1365         if typename == reference:
  1361             return True
  1366             return True
  1362 
  1367 
  1363         basetype = TypeHierarchy.get(typename)
  1368         basetype = TypeHierarchy.get(typename)
  1364         if basetype is not None:
  1369         if basetype is not None:
  1365             return self.IsOfType(basetype, reference)
  1370             return self.IsOfType(basetype, reference)