# HG changeset patch # User Laurent Bessard # Date 1380872416 -7200 # Node ID 2eaa84c37f1054349abc41526665b431109862d8 # Parent a76a020b8822f55b0c0f511227c2c6c3e563993d Fixed bug when loading connectors modifier diff -r a76a020b8822 -r 2eaa84c37f10 plcopen/pou_block_instances.xslt --- a/plcopen/pou_block_instances.xslt Thu Oct 03 19:01:28 2013 +0200 +++ b/plcopen/pou_block_instances.xslt Fri Oct 04 09:40:16 2013 +0200 @@ -1,1 +1,1 @@ -0inputoutputoutputSTRINGWSTRINGBOOLinputoutput0connectionreferenceinlinejumpreferenceinlineN \ No newline at end of file +0inputoutputoutputSTRINGWSTRINGBOOL0connectionreferenceinlinejumpreferenceinlineN \ No newline at end of file diff -r a76a020b8822 -r 2eaa84c37f10 plcopen/pou_block_instances.ysl2 --- 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