# HG changeset patch
# User Edouard Tisserant
# Date 1350641664 -7200
# Node ID 980800a5aad0c139c370bcecccf7cae6b4c3f6c1
# Parent 8a51046010d74cd2d5ed9a697283112fa46cc6df
Now test/python also demonstrate large C pragmas in ST, accessing complex types
diff -r 8a51046010d7 -r 980800a5aad0 tests/python/plc.xml
--- a/tests/python/plc.xml Thu Oct 18 20:40:12 2012 +0200
+++ b/tests/python/plc.xml Fri Oct 19 12:14:24 2012 +0200
@@ -8,7 +8,7 @@
productVersion="0.0"
creationDateTime="2008-12-14T16:21:19"/>
+ modificationDateTime="2012-10-19T11:54:13">
@@ -23,7 +23,24 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -588,15 +605,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
IN);
- if(PLC_C_Call(fromPLC, &toPLC))__SET_VAR(data__->,OUT,toPLC);
-}
+{{
+ char toPLC;
+ char fromPLC = GetFbVar(IN);
+ if(PLC_C_Call(fromPLC, &toPLC)){
+ SetFbVar(OUT, toPLC);
+ }
+ if(0){
+ /* that code demonstrate C access to complex types */
+ char somebyte = GetFbVar(COORDS, .table[3]);
+ SetFbVar(SMURF, somebyte, .FIRSTBYTE);
+ SetFbVar(COORDS, somebyte, .table[4]);
+ }
+}}
(* If you do not use __GET_VAR and _SET_VAR macro, expect unexpected *)
]]>