plcopen/pou_block_instances.ysl2
changeset 1344 2eaa84c37f10
parent 1339 6adf05c4508d
child 1345 53e51e786654
--- a/plcopen/pou_block_instances.ysl2	Thu Oct 03 19:01:28 2013 +0200
+++ b/plcopen/pou_block_instances.ysl2	Fri Oct 04 09:40:16 2013 +0200
@@ -27,22 +27,9 @@
     
     function "ConnectionInfos" {
         param "type";
-        param "modifiers";
+        param "negated";
+        param "edge";
         param "formalParameter";
-        variable "negated" {
-            choose {
-                when "$modifiers='input'" > «@negatedIn»
-                when "$modifiers='output'" > «@negatedOut»
-                otherwise > «@negated»
-            }
-        }
-        variable "edge" {
-            choose {
-                when "$modifiers='input'" > «@edgeIn»
-                when "$modifiers='output'" > «@edgeOut»
-                otherwise > «@edge»
-            }
-        }
         variable "instance_connection" {
             > «ns:AddInstanceConnection($type, $formalParameter, $negated, $edge, ppx:relPosition/@x, ppx:relPosition/@y)»
         }
@@ -62,22 +49,26 @@
     }
     
     template "ppx:connectionPointIn" {
-        param "modifiers";
+        param "negated";
+        param "edge";
         param "formalParameter";
         call "ConnectionInfos" {
             with "type" > input
-            with "modifiers" > «$modifiers»
+            with "negated" > «$negated»
+            with "edge" > «$edge»
             with "formalParameter" > «$formalParameter»
         }
         apply "ppx:connection";
     }
     
     template "ppx:connectionPointOut" {
-        param "modifiers";
+        param "negated";
+        param "edge";
         param "formalParameter";
         call "ConnectionInfos" {
             with "type" > output
-            with "modifiers" > «$modifiers»
+            with "negated" > «$negated»
+            with "edge" > «$edge»
             with "formalParameter" > «$formalParameter»
         }
     }
@@ -110,11 +101,15 @@
         }
         foreach "ppx:inputVariables/ppx:variable" {
             apply "ppx:connectionPointIn" {
+                with "negated" > «@negated»
+                with "edge" > «@edge»
                 with "formalParameter" > «@formalParameter»
             }
         }
         foreach "ppx:outputVariables/ppx:variable" {
             apply "ppx:connectionPointOut" {
+                with "negated" > «@negated»
+                with "edge" > «@edge»
                 with "formalParameter" > «@formalParameter»
             }
         }
@@ -160,20 +155,12 @@
             with "type" > «$type»
         }
         apply "ppx:connectionPointIn" {
-            with "modifiers" {
-                choose {
-                    when "$type='inout'" > input
-                    otherwise > 
-                }
-            }
+            with "negated" > «@negatedIn»
+            with "edge" > «@edgeIn»
         }
         apply "ppx:connectionPointOut" {
-            with "modifiers" {
-                choose {
-                    when "$type='inout'" > output
-                    otherwise > 
-                }
-            }
+            with "negated" > «@negatedOut»
+            with "edge" > «@edgeOut»
         }
     }
     
@@ -251,7 +238,9 @@
         variable "instance_specific_values" {
             > «ns:SetSpecificValues(@name, @initialStep)»
         }
-        apply "ppx:connectionPointOutAction";
+        apply "ppx:connectionPointOutAction" {
+            with "negated" > «@negated»
+        }
         call "add_instance" {
             with "type" > «$type»
         }
@@ -285,7 +274,9 @@
         variable "instance_specific_values" {
             > «ns:SetSpecificValues($priority, $condition_type, $condition)»
         }
-        apply "ppx:condition/ppx:connectionPointIn";
+        apply "ppx:condition/ppx:connectionPointIn" {
+            with "negated" > «ppx:condition/@negated»
+        }
         call "add_instance" {
             with "type" > «$type»
         }
@@ -359,6 +350,8 @@
         call "add_instance" {
             with "type" > «$type»
         }
-        apply "ppx:connectionPointIn";
+        apply "ppx:connectionPointIn" {
+            with "negated" > «@negated»
+        }
     }
 }
\ No newline at end of file