etherlab/EthercatMaster.py
changeset 2370 e40f3914e55f
parent 2367 0fb54172a18b
child 2375 cfa68a06a24d
equal deleted inserted replaced
2369:24db1e592e20 2370:e40f3914e55f
    93 
    93 
    94 # --------------------------------------------------
    94 # --------------------------------------------------
    95 #                 Ethercat MASTER
    95 #                 Ethercat MASTER
    96 # --------------------------------------------------
    96 # --------------------------------------------------
    97 
    97 
       
    98 
    98 EtherCATConfigParser = GenerateParserFromXSD(os.path.join(os.path.dirname(__file__), "EtherCATConfig.xsd"))
    99 EtherCATConfigParser = GenerateParserFromXSD(os.path.join(os.path.dirname(__file__), "EtherCATConfig.xsd"))
    99 
   100 
   100 
   101 
   101 def sort_commands(x, y):
   102 def sort_commands(x, y):
   102     if x["Index"] == y["Index"]:
   103     if x["Index"] == y["Index"]:
   103         return cmp(x["Subindex"], y["Subindex"])
   104         return cmp(x["Subindex"], y["Subindex"])
   104     return cmp(x["Index"], y["Index"])
   105     return cmp(x["Index"], y["Index"])
       
   106 
   105 
   107 
   106 cls = EtherCATConfigParser.GetElementClass("Slave", "Config")
   108 cls = EtherCATConfigParser.GetElementClass("Slave", "Config")
   107 if cls:
   109 if cls:
   108 
   110 
   109     def getType(self):
   111     def getType(self):