diff -r e945fcb54cd4 -r 2a3d022a7dac etherlab/EthercatMaster.py --- a/etherlab/EthercatMaster.py Fri Sep 28 18:00:50 2018 +0300 +++ b/etherlab/EthercatMaster.py Fri Sep 28 18:04:28 2018 +0300 @@ -68,9 +68,11 @@ # Etherlab Specific Blocks Library # -------------------------------------------------- + def GetLocalPath(filename): return os.path.join(os.path.split(__file__)[0], filename) + class EtherlabLibrary(POULibrary): def GetLibraryPath(self): return GetLocalPath("pous.xml") @@ -95,6 +97,7 @@ EtherCATConfigParser = GenerateParserFromXSD(os.path.join(os.path.dirname(__file__), "EtherCATConfig.xsd")) + def sort_commands(x, y): if x["Index"] == y["Index"]: return cmp(x["Subindex"], y["Subindex"]) @@ -220,6 +223,7 @@ ProcessVariablesParser = GenerateParserFromXSDstring(ProcessVariablesXSD) + class _EthercatCTN: CTNChildrenTypes = [("EthercatSlave", _EthercatSlaveCTN, "Ethercat Slave")]