merge
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 10 Aug 2018 18:07:38 +0300
changeset 2279 70143c20d2c0
parent 2278 a3ac46366b86 (diff)
parent 2260 74205edac761 (current diff)
child 2280 dcdeb5ad7d55
merge
tests/wamp/.crossbar/config.json
tests/wamp/README
tests/wamp/py_ext_0@py_ext/baseconfnode.xml
tests/wamp/py_ext_0@py_ext/pyfile.xml
--- a/PLCGenerator.py	Thu Aug 09 09:07:09 2018 +0200
+++ b/PLCGenerator.py	Fri Aug 10 18:07:38 2018 +0300
@@ -926,6 +926,9 @@
         if blk is None:
             return None
 
+        if not hasattr(blk, "inputVariables"):
+            return None
+
         for invar in blk.inputVariables.getvariable():
             if invar.getformalParameter() == "EN":
                 if len(invar.getconnectionPointIn().getconnections()) > 0:
@@ -1343,7 +1346,7 @@
                 else:
                     paths.append(variable)
             elif isinstance(next, CoilClass):
-                paths.append(str(self.GeneratePaths(next.connectionPointIn.getconnections(), body, order)))
+                paths.append(self.GeneratePaths(next.connectionPointIn.getconnections(), body, order))
         return paths
 
     def ComputePaths(self, paths, first=False):
--- a/README.md	Thu Aug 09 09:07:09 2018 +0200
+++ b/README.md	Fri Aug 10 18:07:38 2018 +0300
@@ -45,11 +45,11 @@
 * Build CanFestival (optional)  
   Only needed for CANopen support. Please read CanFestival manual to choose CAN interface other than 'virtual'.
 
-        cd ~/Beremiz
-        hg clone http://dev.automforge.net/CanFestival-3
-        cd ~/Beremiz/CanFestival-3
-        ./configure --can=virtual
-        make
+		cd ~/Beremiz
+		hg clone http://dev.automforge.net/CanFestival-3
+		cd ~/Beremiz/CanFestival-3
+		./configure --can=virtual
+		make
 
 * Build Modbus library (optional)
   Only needed for Modbus support.
@@ -59,6 +59,14 @@
 		cd ~/Beremiz/Modbus
 		make
 
+* Build BACnet (optional)
+  Only needed for BACnet support.
+
+		cd ~/Beremiz
+		svn checkout https://svn.code.sf.net/p/bacnet/code/trunk/bacnet-stack/ BACnet
+		cd BACnet
+		make MAKE_DEFINE='-fPIC' all
+
 * Launch Beremiz IDE
 
 		cd ~/Beremiz/beremiz
--- a/etherlab/__init__.py	Thu Aug 09 09:07:09 2018 +0200
+++ b/etherlab/__init__.py	Fri Aug 10 18:07:38 2018 +0300
@@ -1,1 +1,7 @@
-from etherlab import *
\ No newline at end of file
+from __future__ import absolute_import
+
+from etherlab.etherlab import *
+from util.BitmapLibrary import AddBitmapFolder
+import util.paths as paths
+
+AddBitmapFolder(os.path.join(paths.AbsDir(__file__), "images"))
--- a/xmlclass/xmlclass.py	Thu Aug 09 09:07:09 2018 +0200
+++ b/xmlclass/xmlclass.py	Fri Aug 10 18:07:38 2018 +0300
@@ -1162,6 +1162,7 @@
             classmembers["get%s" % elmtname] = generateGetMethod(elmtname)
 
         classmembers["_init_"] = generateInitMethod(self, classinfos)
+        classmembers["_tmp_initial_"] = None
         classmembers["StructurePattern"] = GetStructurePattern(classinfos)
         classmembers["getElementAttributes"] = generateGetElementAttributes(self, classinfos)
         classmembers["getElementInfos"] = generateGetElementInfos(self, classinfos)
@@ -1581,6 +1582,10 @@
             if element["type"] != CHOICE:
                 initial = GetElementInitialValue(factory, element)
                 if initial is not None:
+                    # FIXME: this is looks like dirty hack to fix strange problem with initial[0]
+                    # changing its type after returning from _init_ method to lxml.etree._Element
+                    # As a result all methods generated by class factory are lost.
+                    object.__setattr__(self, "_tmp_initial_", initial)
                     map(self.append, initial)
     return initMethod