1385 target_info = (self.TagName, "transition", instance.getlocalId(), "to", step_infos["id"]) |
1385 target_info = (self.TagName, "transition", instance.getlocalId(), "to", step_infos["id"]) |
1386 self.SFCNetworks["Transitions"][instance]["to"].append([(step_name, target_info)]) |
1386 self.SFCNetworks["Transitions"][instance]["to"].append([(step_name, target_info)]) |
1387 |
1387 |
1388 def GenerateSFCJump(self, jump, pou): |
1388 def GenerateSFCJump(self, jump, pou): |
1389 jump_target = jump.gettargetName() |
1389 jump_target = jump.gettargetName() |
|
1390 if not pou.hasstep(jump_target): |
|
1391 pname = pou.getname() |
|
1392 msg = _("SFC jump in pou \"{a1}\" refers to non-existent SFC step \"{a2}\"").format( a1 = pname, a2 = jump_target) |
|
1393 raise PLCGenException, msg |
1390 if jump.connectionPointIn is not None: |
1394 if jump.connectionPointIn is not None: |
1391 instances = [] |
1395 instances = [] |
1392 connections = jump.connectionPointIn.getconnections() |
1396 connections = jump.connectionPointIn.getconnections() |
1393 if connections is not None and len(connections) == 1: |
1397 if connections is not None and len(connections) == 1: |
1394 instanceLocalId = connections[0].getrefLocalId() |
1398 instanceLocalId = connections[0].getrefLocalId() |