Browse Source

Prepend the name of the entry in the port

Yentl Van Tendeloo 8 years ago
parent
commit
70a05c0dab
3 changed files with 18 additions and 18 deletions
  1. 9 9
      models/control_to_EPN.mvc
  2. 1 1
      models/environment_to_EPN.mvc
  3. 8 8
      models/plant_to_EPN.mvc

+ 9 - 9
models/control_to_EPN.mvc

@@ -24,7 +24,7 @@ All_RAM Control2EPN {
                     label = "10"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "cmdDown"!
+                            return "control/cmdDown"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_10, post_ports_00) {
@@ -46,7 +46,7 @@ All_RAM Control2EPN {
                     label = "11"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "cmdNeutral"!
+                            return "control/cmdNeutral"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_11, post_ports_01) {
@@ -67,7 +67,7 @@ All_RAM Control2EPN {
                     label = "12"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "cmdUp"!
+                            return "control/cmdUp"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_12, post_ports_02) {
@@ -88,7 +88,7 @@ All_RAM Control2EPN {
                     label = "13"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "objDetected"!
+                            return "control/objDetected"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_13, post_ports_03) {
@@ -109,7 +109,7 @@ All_RAM Control2EPN {
                     label = "14"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "no_objDetected"!
+                            return "control/no_objDetected"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_14, post_ports_04) {
@@ -141,7 +141,7 @@ All_RAM Control2EPN {
                     label = "15"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "up"!
+                            return "control/up"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_15, post_ports_05) {
@@ -173,7 +173,7 @@ All_RAM Control2EPN {
                     label = "16"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "neutral"!
+                            return "control/neutral"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_16, post_ports_06) {
@@ -205,7 +205,7 @@ All_RAM Control2EPN {
                     label = "17"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "down"!
+                            return "control/down"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_17, post_ports_07) {
@@ -227,7 +227,7 @@ All_RAM Control2EPN {
                     label = "18"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "interrupt"!
+                            return "control/interrupt"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_18, post_ports_08) {

+ 1 - 1
models/environment_to_EPN.mvc

@@ -36,7 +36,7 @@ A B {
                     label = "3"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return read_attribute(model, mapping["1"], "name")!
+                            return string_join("environment/", read_attribute(model, mapping["1"], "name"))!
                         $
                 }
                 Post_ENV2EPN_link (cp_evt, cp_place) {

+ 8 - 8
models/plant_to_EPN.mvc

@@ -24,7 +24,7 @@ A B {
                     label = "10"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "up"!
+                            return "plant/up"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_10, post_ports_00) {
@@ -46,7 +46,7 @@ A B {
                     label = "11"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "neutral"!
+                            return "plant/neutral"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_11, post_ports_01) {
@@ -68,7 +68,7 @@ A B {
                     label = "12"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "down"!
+                            return "plant/down"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_12, post_ports_02) {
@@ -90,7 +90,7 @@ A B {
                     label = "13"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "interrupt"!
+                            return "plant/interrupt"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_13, post_ports_03) {
@@ -123,7 +123,7 @@ A B {
                     label = "14"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "objDetected"!
+                            return "plant/objDetected"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_14, post_ports_04) {
@@ -156,7 +156,7 @@ A B {
                     label = "15"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "no_objDetected"!
+                            return "plant/no_objDetected"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_15, post_ports_05) {
@@ -178,7 +178,7 @@ A B {
                     label = "16"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "objPresent"!
+                            return "plant/objPresent"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_16, post_ports_06) {
@@ -200,7 +200,7 @@ A B {
                     label = "17"
                     value_name = $
                         String function value(model : Element, name : String, mapping : Element):
-                            return "no_objPresent"!
+                            return "plant/no_objPresent"!
                         $
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_ports_17, post_ports_07) {