--- a/tests/python/c_code@c_ext/cfile.xml Wed May 08 22:53:40 2013 +0200
+++ b/tests/python/c_code@c_ext/cfile.xml Wed May 08 22:56:31 2013 +0200
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<CFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="cext_xsd.xsd">
+<CodeFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="codefile.xsd"> <![CDATA[#include "stdio.h"]]>
- <variable name="TestInput" type="SINT" class="input"/>
- <variable name="TestOutput" type="SINT" class="output"/>
+ <variable name="TestInput" type="SINT" initial="0"/> + <variable name="TestOutput" type="SINT"/> <![CDATA[volatile long Lock=0;
@@ -62,4 +62,4 @@
AtomicCompareExchange((long*)&Lock, 1, 0);
--- a/tests/python/plc.xml Wed May 08 22:53:40 2013 +0200
+++ b/tests/python/plc.xml Wed May 08 22:56:31 2013 +0200
@@ -8,7 +8,7 @@
creationDateTime="2008-12-14T16:21:19"/>
<contentHeader name="Beremiz Python Support Tests"
- modificationDateTime="2013-05-02T10:44:19">
+ modificationDateTime="2013-05-08T22:43:14"> <pageSize x="1024" y="1024"/>
@@ -102,18 +102,18 @@
- <variable name="TestInput" address="%IB1.0">
+ <variable name="TestInput"> - <variable name="TestOutput" address="%QB1.0">
+ <variable name="TestOutput">
<variable name="FromInput">
@@ -625,14 +625,14 @@
- <inVariable localId="27" height="30" width="75">
- <position x="305" y="770"/>
+ <inVariable localId="27" height="30" width="90"> + <position x="300" y="770"/> - <relPosition x="75" y="15"/>
+ <relPosition x="90" y="15"/> <expression>TestInput</expression>
- <outVariable localId="28" height="30" width="90">
+ <outVariable localId="28" height="30" width="105"> <position x="395" y="705"/>
<relPosition x="0" y="15"/>
@@ -649,7 +649,7 @@
<relPosition x="0" y="15"/>
<connection refLocalId="27">
<position x="415" y="785"/>
- <position x="380" y="785"/>
+ <position x="390" y="785"/> <expression>FromInput</expression>
--- a/tests/python/python@py_ext/py_ext.xml Wed May 08 22:53:40 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<Python xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="py_ext_xsd.xsd">
-<![CDATA[import time,sys,ctypes
-Python_to_C_Call = PLCBinary.Python_to_C_Call
-Python_to_C_Call.restype = ctypes.c_int
-Python_to_C_Call.argtypes = [ctypes.c_int, ctypes.POINTER(ctypes.c_int)]
- if(Python_to_C_Call(arg, i)):
- print "toC:", arg, "from C:", res, "FBID:", FBID
- print "Failed Python_to_C_Call failed"
-async_error_test_code = """
-from threading import Timer
-b = Timer(6, badaboomwx)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/python/python@py_ext/pyfile.xml Wed May 08 22:56:31 2013 +0200
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<CodeFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="codefile.xsd"> + <variable name="Test_Python_Var" type="INT" initial="0"/> +<![CDATA[import time,sys,ctypes +Python_to_C_Call = PLCBinary.Python_to_C_Call +Python_to_C_Call.restype = ctypes.c_int +Python_to_C_Call.argtypes = [ctypes.c_int, ctypes.POINTER(ctypes.c_int)] + if(Python_to_C_Call(arg, i)): + print "toC:", arg, "from C:", res, "FBID:", FBID + print "Failed Python_to_C_Call failed" +async_error_test_code = """ +from threading import Timer +b = Timer(6, badaboomwx)