From 1d2f06baebfd54f8f3be9e2179b1401236824df8 Mon Sep 17 00:00:00 2001 From: yfr Date: Fri, 18 Jun 2004 12:37:18 +0000 Subject: [PATCH] DCQ : Merge with Ecole_Ete_a6. --- examples/GraphContainer.py | 91 + examples/GraphContainer.xml | 364 +++ examples/GraphConvertBoolCheck.py | 64 + examples/GraphConvertBoolCheck.xml | 195 ++ examples/GraphConvertBoolStringCheck.py | 64 + examples/GraphConvertBoolStringCheck.xml | 195 ++ examples/GraphConvertCharCheck.py | 64 + examples/GraphConvertCharCheck.xml | 195 ++ examples/GraphConvertCharStringCheck.py | 64 + examples/GraphConvertCharStringCheck.xml | 195 ++ examples/GraphConvertDoubleCheck.py | 112 + examples/GraphConvertDoubleCheck.xml | 368 +++ examples/GraphConvertDoubleStringCheck.py | 64 + examples/GraphConvertDoubleStringCheck.xml | 195 ++ examples/GraphConvertFloatCheck.py | 65 + examples/GraphConvertFloatCheck.xml | 196 ++ examples/GraphConvertFloatStringCheck.py | 64 + examples/GraphConvertFloatStringCheck.xml | 195 ++ examples/GraphConvertIORCheck.py | 79 + examples/GraphConvertIORCheck.xml | 234 ++ examples/GraphConvertLongCheck.py | 65 + examples/GraphConvertLongCheck.xml | 196 ++ examples/GraphConvertLongStringCheck.py | 64 + examples/GraphConvertLongStringCheck.xml | 195 ++ examples/GraphConvertObjRefCheck.py | 78 + examples/GraphConvertObjRefCheck.xml | 233 ++ examples/GraphConvertShortCheck.py | 65 + examples/GraphConvertShortCheck.xml | 196 ++ examples/GraphConvertShortStringCheck.py | 64 + examples/GraphConvertShortStringCheck.xml | 195 ++ examples/GraphConvertStringStringCheck.py | 64 + examples/GraphConvertStringStringCheck.xml | 195 ++ examples/GraphCpuUsed.py | 142 + examples/GraphCpuUsed.xml | 339 +++ examples/GraphEmptyInLinesTypesCheck.py | 176 ++ examples/GraphEmptyInLinesTypesCheck.xml | 521 ++++ examples/GraphEssai.py | 49 +- examples/GraphEssai1.py | 43 +- examples/GraphEssai1.xml | 544 ++-- examples/GraphEssai2.py | 46 +- examples/GraphEssai2.xml | 551 ++-- examples/GraphEssai3.py | 72 +- examples/GraphEssai3.xml | 813 +++--- examples/GraphFactorial.py | 39 +- examples/GraphFactorialLcc.py | 41 + examples/GraphGOTO.py | 322 ++- examples/GraphGOTO.xml | 693 ++++- examples/GraphGeomEssai.xml | 717 +++-- examples/GraphInLines.py | 20 +- examples/GraphInLines.xml | 40 +- examples/GraphInLinesParall.py | 87 + examples/GraphInLinesParall.xml | 216 ++ examples/GraphInLinesTypesCheck.py | 191 ++ examples/GraphInLinesTypesCheck.xml | 536 ++++ examples/GraphInLinesUnValid.py | 83 + examples/GraphInLinesUnValid.xml | 199 ++ examples/GraphLoop.py | 21 +- examples/GraphLoopSwitch.py | 137 + examples/GraphLoopSwitch.xml | 356 +++ examples/GraphMerge.py | 61 + examples/GraphMerge1.py | 54 + examples/GraphObjRef.py | 110 + examples/GraphObjRef.xml | 287 ++ examples/GraphPyFunctions.py | 217 ++ examples/GraphPyFunctions.xml | 647 +++++ examples/GraphRunSyr.py | 6 + examples/GraphStream.py | 221 ++ examples/GraphStream.xml | 444 +++ examples/GraphStreamInLines.py | 256 ++ examples/GraphStreamInLines.xml | 508 ++++ examples/GraphStreamInLines_1.cpl | 77 + examples/GraphStreamTopologies.py | 235 ++ examples/GraphStreamTopologies.xml | 455 ++++ examples/GraphStreamTopologies_1.cpl | 68 + examples/GraphStreamTopologies_2.cpl | 54 + examples/GraphStreamTopology.py | 244 ++ examples/GraphStreamTopology.xml | 457 ++++ examples/GraphStreamTopology_1.cpl | 101 + examples/GraphStream_1.cpl | 45 + examples/GraphStream_2.cpl | 33 + examples/GraphStream_3.cpl | 31 + examples/GraphStreams.py | 404 +++ examples/GraphStreams.xml | 973 +++++++ examples/GraphStreamsXmlTest.py | 111 + examples/GraphStreams_1.cpl | 55 + examples/GraphStreams_2.cpl | 55 + examples/GraphSwitch.py | 130 +- examples/GraphSwitch.xml | 278 +- examples/GraphSwitch1.py | 131 + examples/GraphSwitch1.xml | 348 +++ examples/GraphSwitchCrash.py | 237 ++ examples/GraphSwitchCrash.xml | 670 +++++ examples/GraphSwitchs.py | 232 ++ examples/GraphSwitchs.xml | 655 +++++ examples/GraphSyrControl.py | 83 +- examples/GraphSyrControl.xml | 204 +- examples/GraphSyrControl1.py | 237 ++ examples/GraphSyrControl1.xml | 613 +++++ examples/GraphSyrControlAve.py | 266 +- examples/GraphSyrControlAve.xml | 771 +++--- examples/GraphSyrControlDefault.py | 139 +- examples/GraphSyrControlDefault.xml | 244 +- examples/GraphSyrControlGUI.py | 161 +- examples/GraphSyrControlGUI.xml | 290 +- examples/GraphSyracuseC.py | 25 +- examples/GraphSyracuseCEv.py | 25 +- examples/GraphSyracuseC_Gate.py | 144 +- examples/GraphSyracuseC_Gate.xml | 720 +++-- examples/GraphSyracuseCpp.py | 25 +- examples/GraphTypesCheck.py | 125 + examples/GraphTypesCheck.xml | 459 ++++ examples/GraphUnValid.py | 86 + examples/GraphUnValid.xml | 253 ++ examples/Graphs.py | 93 +- examples/Graphs.xml | 1012 +++---- examples/Loop.xml | 306 +++ examples/NewGraphEssai.py | 119 +- examples/NewGraphEssai.xml | 567 ++-- examples/NewGraphGeomEssai.py | 58 +- examples/NewGraphGeomEssai.xml | 30 +- examples/SupervRheolefGraph.py | 248 +- examples/SupervRheolefGraph.xml | 2439 ++++++++--------- examples/SyrStruct.py | 403 +-- examples/SyrStruct.xml | 2717 ++++++++----------- examples/TestSupervMedfieldLoopFori.py | 159 ++ examples/TestSupervMedfieldLoopFori.xml | 438 +++ examples/TestSupervMedfieldLoopForiVisu.py | 216 ++ examples/TestSupervMedfieldLoopForiVisu.xml | 536 ++++ examples/dataflow_calculator_example.py | 211 ++ examples/dataflow_calculator_example.xml | 306 +++ examples/myFactorialPy.py | 6 + examples/newsupervisionexample.py | 45 +- examples/newsupervisionexample.xml | 12 +- examples/test_events.py | 66 + examples/test_events.xml | 167 ++ examples/test_superv_basic_loop.py | 103 + examples/test_superv_basic_loop.xml | 304 +++ examples/testvisu20.xml | 490 ++++ examples/testvisu20_multi.py | 305 +++ examples/testvisu20_multi.xml | 807 ++++++ idl/Makefile.in | 21 +- idl/SUPERV.idl | 290 +- resources/SUPERV.config | 1 + resources/SUPERV_en.xml | 2 +- 144 files changed, 30505 insertions(+), 7399 deletions(-) create mode 100755 examples/GraphContainer.py create mode 100755 examples/GraphContainer.xml create mode 100755 examples/GraphConvertBoolCheck.py create mode 100755 examples/GraphConvertBoolCheck.xml create mode 100755 examples/GraphConvertBoolStringCheck.py create mode 100755 examples/GraphConvertBoolStringCheck.xml create mode 100755 examples/GraphConvertCharCheck.py create mode 100755 examples/GraphConvertCharCheck.xml create mode 100755 examples/GraphConvertCharStringCheck.py create mode 100755 examples/GraphConvertCharStringCheck.xml create mode 100755 examples/GraphConvertDoubleCheck.py create mode 100755 examples/GraphConvertDoubleCheck.xml create mode 100755 examples/GraphConvertDoubleStringCheck.py create mode 100755 examples/GraphConvertDoubleStringCheck.xml create mode 100755 examples/GraphConvertFloatCheck.py create mode 100755 examples/GraphConvertFloatCheck.xml create mode 100755 examples/GraphConvertFloatStringCheck.py create mode 100755 examples/GraphConvertFloatStringCheck.xml create mode 100755 examples/GraphConvertIORCheck.py create mode 100755 examples/GraphConvertIORCheck.xml create mode 100755 examples/GraphConvertLongCheck.py create mode 100755 examples/GraphConvertLongCheck.xml create mode 100755 examples/GraphConvertLongStringCheck.py create mode 100755 examples/GraphConvertLongStringCheck.xml create mode 100755 examples/GraphConvertObjRefCheck.py create mode 100755 examples/GraphConvertObjRefCheck.xml create mode 100755 examples/GraphConvertShortCheck.py create mode 100755 examples/GraphConvertShortCheck.xml create mode 100755 examples/GraphConvertShortStringCheck.py create mode 100755 examples/GraphConvertShortStringCheck.xml create mode 100755 examples/GraphConvertStringStringCheck.py create mode 100755 examples/GraphConvertStringStringCheck.xml create mode 100755 examples/GraphCpuUsed.py create mode 100755 examples/GraphCpuUsed.xml create mode 100755 examples/GraphEmptyInLinesTypesCheck.py create mode 100755 examples/GraphEmptyInLinesTypesCheck.xml create mode 100755 examples/GraphFactorialLcc.py create mode 100755 examples/GraphInLinesParall.py create mode 100755 examples/GraphInLinesParall.xml create mode 100755 examples/GraphInLinesTypesCheck.py create mode 100755 examples/GraphInLinesTypesCheck.xml create mode 100755 examples/GraphInLinesUnValid.py create mode 100755 examples/GraphInLinesUnValid.xml create mode 100755 examples/GraphLoopSwitch.py create mode 100755 examples/GraphLoopSwitch.xml create mode 100755 examples/GraphMerge.py create mode 100755 examples/GraphMerge1.py create mode 100755 examples/GraphObjRef.py create mode 100755 examples/GraphObjRef.xml create mode 100755 examples/GraphPyFunctions.py create mode 100755 examples/GraphPyFunctions.xml create mode 100644 examples/GraphStream.py create mode 100644 examples/GraphStream.xml create mode 100644 examples/GraphStreamInLines.py create mode 100644 examples/GraphStreamInLines.xml create mode 100644 examples/GraphStreamInLines_1.cpl create mode 100644 examples/GraphStreamTopologies.py create mode 100644 examples/GraphStreamTopologies.xml create mode 100644 examples/GraphStreamTopologies_1.cpl create mode 100644 examples/GraphStreamTopologies_2.cpl create mode 100644 examples/GraphStreamTopology.py create mode 100644 examples/GraphStreamTopology.xml create mode 100644 examples/GraphStreamTopology_1.cpl create mode 100644 examples/GraphStream_1.cpl create mode 100644 examples/GraphStream_2.cpl create mode 100644 examples/GraphStream_3.cpl create mode 100644 examples/GraphStreams.py create mode 100644 examples/GraphStreams.xml create mode 100644 examples/GraphStreamsXmlTest.py create mode 100644 examples/GraphStreams_1.cpl create mode 100644 examples/GraphStreams_2.cpl create mode 100755 examples/GraphSwitch1.py create mode 100755 examples/GraphSwitch1.xml create mode 100755 examples/GraphSwitchCrash.py create mode 100755 examples/GraphSwitchCrash.xml create mode 100755 examples/GraphSwitchs.py create mode 100755 examples/GraphSwitchs.xml create mode 100755 examples/GraphSyrControl1.py create mode 100755 examples/GraphSyrControl1.xml create mode 100755 examples/GraphTypesCheck.py create mode 100755 examples/GraphTypesCheck.xml create mode 100755 examples/GraphUnValid.py create mode 100755 examples/GraphUnValid.xml create mode 100755 examples/Loop.xml create mode 100755 examples/TestSupervMedfieldLoopFori.py create mode 100755 examples/TestSupervMedfieldLoopFori.xml create mode 100755 examples/TestSupervMedfieldLoopForiVisu.py create mode 100755 examples/TestSupervMedfieldLoopForiVisu.xml create mode 100755 examples/dataflow_calculator_example.py create mode 100755 examples/dataflow_calculator_example.xml create mode 100644 examples/test_events.py create mode 100644 examples/test_events.xml create mode 100755 examples/test_superv_basic_loop.py create mode 100755 examples/test_superv_basic_loop.xml create mode 100644 examples/testvisu20.xml create mode 100644 examples/testvisu20_multi.py create mode 100644 examples/testvisu20_multi.xml create mode 100644 resources/SUPERV.config diff --git a/examples/GraphContainer.py b/examples/GraphContainer.py new file mode 100755 index 0000000..2fec085 --- /dev/null +++ b/examples/GraphContainer.py @@ -0,0 +1,91 @@ + +# Generated python file of Graph GraphEssai + +from SuperV import * +# Graph creation +GraphEssai = Graph( 'GraphEssai' ) +GraphEssai.SetName( 'GraphEssai' ) +GraphEssai.SetAuthor( '' ) +GraphEssai.SetComment( '' ) +GraphEssai.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +Add = GraphEssai.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) +Add.SetName( 'Add' ) +Add.SetAuthor( '' ) +Add.SetContainer( 'FactoryServer' ) +Add.SetComment( 'Add from AddComponent' ) +Add.Coords( 15 , 241 ) + +Sub = GraphEssai.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) +Sub.SetName( 'Sub' ) +Sub.SetAuthor( '' ) +Sub.SetContainer( 'FactoryServer' ) +Sub.SetComment( 'Sub from SubComponent' ) +Sub.Coords( 227 , 96 ) + +Mul = GraphEssai.FNode( 'MulComponent' , 'MulComponent' , 'Mul' ) +Mul.SetName( 'Mul' ) +Mul.SetAuthor( '' ) +Mul.SetContainer( 'FactoryServer' ) +Mul.SetComment( 'Mul from MulComponent' ) +Mul.Coords( 435 , 242 ) + +Div = GraphEssai.FNode( 'DivComponent' , 'DivComponent' , 'Div' ) +Div.SetName( 'Div' ) +Div.SetAuthor( '' ) +Div.SetContainer( 'FactoryServer' ) +Div.SetComment( 'Div from DivComponent' ) +Div.Coords( 634 , 97 ) + +# Creation of Links +Addz = Add.Port( 'z' ) +Muly = GraphEssai.Link( Addz , Mul.Port( 'y' ) ) + +Suby = GraphEssai.Link( Addz , Sub.Port( 'y' ) ) +Suby.AddCoord( 1 , 197 , 204 ) +Suby.AddCoord( 2 , 198 , 351 ) + +Subz = Sub.Port( 'z' ) +Divx = GraphEssai.Link( Subz , Div.Port( 'x' ) ) + +Mulx = GraphEssai.Link( Subz , Mul.Port( 'x' ) ) +Mulx.AddCoord( 1 , 411 , 323 ) +Mulx.AddCoord( 2 , 411 , 177 ) + +Mulz = Mul.Port( 'z' ) +Divy = GraphEssai.Link( Mulz , Div.Port( 'y' ) ) +Divy.AddCoord( 1 , 612 , 207 ) +Divy.AddCoord( 2 , 612 , 322 ) + +# Creation of Input datas +Addx = Add.Input( 'x' , 3) +Addy = Add.Input( 'y' , 4.5) +Subx = Sub.Input( 'x' , 1.5) + +# Creation of Output variables +AddFuncValue = Add.Port( 'FuncValue' ) +Divz = Div.Port( 'z' ) + +Add.Print() +Sub.Print() +Mul.Print() +Div.Print() + +GraphEssai.PrintPorts() + +nodes = GraphEssai.LevelNodes( 0 ) +i = 0 +while i < len( nodes ) : + print 'Nodes of level 0',nodes[i].Name() + i = i + 1 + +GraphEssai.Run() + +GraphEssai.DoneW() + +GraphEssai.State() + +GraphEssai.PrintPorts() + diff --git a/examples/GraphContainer.xml b/examples/GraphContainer.xml new file mode 100755 index 0000000..bd9d28a --- /dev/null +++ b/examples/GraphContainer.xml @@ -0,0 +1,364 @@ + + + + +? + ? + GraphContainer + 1 + ? + +GraphContainer + + +double + Add\x + +double + Add\y + +double + Sub\y + +double + Mul\y + + +double + Div\z + +double + AddAndCompare\FuncValue + +double + AddAndCompare\z + + + 11/3/2003 - 10:59:37 + 13/11/2003 - 14:33:24 + 1.04 + ? + ? + ? + 0 + 0 + + +AddComponent + AddComponent + Add + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 13/11/2003 - 14:29:5 + 13/11/2003 - 14:29:5 + 1.04 + ? + SuperVisionContainer + Add from AddComponent + 1 + 152 + +SubComponent + SubComponent + Sub + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 13/11/2003 - 14:29:5 + 13/11/2003 - 14:29:5 + 1.04 + ? + localhost/FactoryServer + Sub from SubComponent + 412 + 377 + +MulComponent + MulComponent + Mul + 0 + ? + +Mul + + +double + x + +double + y + + +double + z + + + 13/11/2003 - 14:29:5 + 13/11/2003 - 14:29:5 + 1.04 + ? + localhost/FactoryServer + Mul from MulComponent + 412 + 152 + +DivComponent + DivComponent + Div + 0 + ? + +Div + + +double + x + +double + y + + +double + z + + + 13/11/2003 - 14:29:5 + 13/11/2003 - 14:29:5 + 1.04 + ? + localhost/FactoryServer + Div from DivComponent + 622 + 124 + +AddComponent + AddComponent + Addition + 0 + ? + +Addition + + + +Adder + Adder + + + 13/11/2003 - 14:29:5 + 13/11/2003 - 14:29:5 + 1.04 + ? + SuperVisionContainer + Addition from AddComponent + 0 + 0 + +AddComponent + AddComponent + Addition_1 + 0 + ? + +Addition + + + +Adder + Adder + + + 13/11/2003 - 14:29:5 + 13/11/2003 - 14:29:5 + 1.04 + ? + SuperVisionContainer + Addition from AddComponent + 4 + 327 + +? + ? + AddAndCompare + 2 + ? + +AddAndCompare + + +Adder + Adder + +double + x + +double + y + +Adder + anOtherAdder + + +double + FuncValue + +double + z + + + 13/11/2003 - 14:29:5 + 13/11/2003 - 14:29:5 + 1.04 + ? + ? + ? + 233 + 0 + + +Add + FuncValue + Mul + x + + +Add + FuncValue + AddAndCompare + x + + +195 + 108 + +195 + 233 + +Add + z + Sub + x + + +187 + 459 + +186 + 262 + +Add + z + AddAndCompare + y + + +187 + 139 + +186 + 261 + +Sub + z + Div + x + + +598 + 203 + +598 + 457 + +Mul + z + Div + y + + +Addition + Adder + AddAndCompare + Adder + + +Addition_1 + Adder + AddAndCompare + anOtherAdder + + +215 + 168 + +214 + 407 + + +GraphContainer + Add\x + Add + x + +7 + 1 + + +GraphContainer + Add\y + Add + y + +7 + 2 + + +GraphContainer + Sub\y + Sub + y + +7 + 3 + + +GraphContainer + Mul\y + Mul + y + +7 + 4 + diff --git a/examples/GraphConvertBoolCheck.py b/examples/GraphConvertBoolCheck.py new file mode 100755 index 0000000..8b8d623 --- /dev/null +++ b/examples/GraphConvertBoolCheck.py @@ -0,0 +1,64 @@ + +# Generated python file of Graph GraphConvertBoolCheck + +from SuperV import * +# Graph creation +GraphConvertBoolCheck = Graph( 'GraphConvertBoolCheck' ) +GraphConvertBoolCheck.SetName( 'GraphConvertBoolCheck' ) +GraphConvertBoolCheck.SetAuthor( 'JR' ) +GraphConvertBoolCheck.SetComment( 'Check conversions of Bool' ) +GraphConvertBoolCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertBoolCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyBool = [] +PyBool.append( 'def Bool() : ' ) +PyBool.append( ' aBool = 1 ' ) +PyBool.append( ' return aBool ' ) +PyBool.append( ' ' ) +Bool = GraphConvertBoolCheck.INode( 'Bool' , PyBool ) +Bool.OutPort( 'OutBool' , 'boolean' ) +Bool.SetName( 'Bool' ) +Bool.SetAuthor( 'JR' ) +Bool.SetComment( 'InLine Node' ) +Bool.Coords( 14 , 114 ) + +# Creation of Links +BoolOutBool = Bool.Port( 'OutBool' ) +MiscTypesInString = GraphConvertBoolCheck.Link( BoolOutBool , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertBoolCheck.Link( BoolOutBool , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertBoolCheck.Link( BoolOutBool , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertBoolCheck.Link( BoolOutBool , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertBoolCheck.Link( BoolOutBool , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertBoolCheck.Link( BoolOutBool , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertBoolCheck.Link( BoolOutBool , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertBoolCheck.Link( BoolOutBool , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertBoolCheck.Run() +GraphConvertBoolCheck.DoneW() +GraphConvertBoolCheck.PrintPorts() diff --git a/examples/GraphConvertBoolCheck.xml b/examples/GraphConvertBoolCheck.xml new file mode 100755 index 0000000..d54df2b --- /dev/null +++ b/examples/GraphConvertBoolCheck.xml @@ -0,0 +1,195 @@ + + + + +? + ? + GraphConvertBoolCheck + 1 + ? + +GraphConvertStringCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 11/9/2003 - 17:12:56 + 1.04 + JR + ? + Check conversions of Bool + 0 + 0 + + +? + ? + Bool + 3 + ? + +StringString + + + +boolean + OutBool + + + +Bool + + + + + 11/9/2003 - 17:10:57 + 11/9/2003 - 17:10:57 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 11/9/2003 - 17:10:57 + 11/9/2003 - 17:10:57 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +Bool + OutBool + MiscTypes + InString + + +Bool + OutBool + MiscTypes + InBool + + +Bool + OutBool + MiscTypes + InChar + + +Bool + OutBool + MiscTypes + InShort + + +Bool + OutBool + MiscTypes + InLong + + +Bool + OutBool + MiscTypes + InFloat + + +Bool + OutBool + MiscTypes + InDouble + + +Bool + OutBool + MiscTypes + InObjRef + + diff --git a/examples/GraphConvertBoolStringCheck.py b/examples/GraphConvertBoolStringCheck.py new file mode 100755 index 0000000..d76c1e6 --- /dev/null +++ b/examples/GraphConvertBoolStringCheck.py @@ -0,0 +1,64 @@ + +# Generated python file of Graph GraphConvertBoolStringCheck + +from SuperV import * +# Graph creation +GraphConvertBoolStringCheck = Graph( 'GraphConvertBoolStringCheck' ) +GraphConvertBoolStringCheck.SetName( 'GraphConvertBoolStringCheck' ) +GraphConvertBoolStringCheck.SetAuthor( 'JR' ) +GraphConvertBoolStringCheck.SetComment( 'Check conversions of String' ) +GraphConvertBoolStringCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertBoolStringCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyBoolString = [] +PyBoolString.append( 'def StringString() : ' ) +PyBoolString.append( ' string = "1" ' ) +PyBoolString.append( ' return string ' ) +PyBoolString.append( ' ' ) +BoolString = GraphConvertBoolStringCheck.INode( 'StringString' , PyBoolString ) +BoolString.OutPort( 'OutString' , 'string' ) +BoolString.SetName( 'BoolString' ) +BoolString.SetAuthor( 'JR' ) +BoolString.SetComment( 'InLine Node' ) +BoolString.Coords( 14 , 114 ) + +# Creation of Links +BoolStringOutString = BoolString.Port( 'OutString' ) +MiscTypesInString = GraphConvertBoolStringCheck.Link( BoolStringOutString , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertBoolStringCheck.Link( BoolStringOutString , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertBoolStringCheck.Link( BoolStringOutString , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertBoolStringCheck.Link( BoolStringOutString , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertBoolStringCheck.Link( BoolStringOutString , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertBoolStringCheck.Link( BoolStringOutString , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertBoolStringCheck.Link( BoolStringOutString , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertBoolStringCheck.Link( BoolStringOutString , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertBoolStringCheck.Run() +GraphConvertBoolStringCheck.DoneW() +GraphConvertBoolStringCheck.PrintPorts() diff --git a/examples/GraphConvertBoolStringCheck.xml b/examples/GraphConvertBoolStringCheck.xml new file mode 100755 index 0000000..1f65a17 --- /dev/null +++ b/examples/GraphConvertBoolStringCheck.xml @@ -0,0 +1,195 @@ + + + + +? + ? + GraphConvertBoolStringCheck + 1 + ? + +GraphConvertBoolStringCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 11/9/2003 - 16:51:13 + 1.04 + JR + ? + Check conversions of String + 0 + 0 + + +? + ? + BoolString + 3 + ? + +StringString + + + +string + OutString + + + +StringString + + + + + 11/9/2003 - 16:49:52 + 11/9/2003 - 16:49:52 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 11/9/2003 - 16:49:52 + 11/9/2003 - 16:49:52 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +BoolString + OutString + MiscTypes + InString + + +BoolString + OutString + MiscTypes + InBool + + +BoolString + OutString + MiscTypes + InChar + + +BoolString + OutString + MiscTypes + InShort + + +BoolString + OutString + MiscTypes + InLong + + +BoolString + OutString + MiscTypes + InFloat + + +BoolString + OutString + MiscTypes + InDouble + + +BoolString + OutString + MiscTypes + InObjRef + + diff --git a/examples/GraphConvertCharCheck.py b/examples/GraphConvertCharCheck.py new file mode 100755 index 0000000..7843b7c --- /dev/null +++ b/examples/GraphConvertCharCheck.py @@ -0,0 +1,64 @@ + +# Generated python file of Graph GraphConvertCharCheck + +from SuperV import * +# Graph creation +GraphConvertCharCheck = Graph( 'GraphConvertCharCheck' ) +GraphConvertCharCheck.SetName( 'GraphConvertCharCheck' ) +GraphConvertCharCheck.SetAuthor( 'JR' ) +GraphConvertCharCheck.SetComment( 'Check conversions of Char' ) +GraphConvertCharCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertCharCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyChar = [] +PyChar.append( 'def Char() : ' ) +PyChar.append( ' aChar = 255 ' ) +PyChar.append( ' return aChar ' ) +PyChar.append( ' ' ) +Char = GraphConvertCharCheck.INode( 'Char' , PyChar ) +Char.OutPort( 'OutChar' , 'char' ) +Char.SetName( 'Char' ) +Char.SetAuthor( 'JR' ) +Char.SetComment( 'InLine Node' ) +Char.Coords( 14 , 114 ) + +# Creation of Links +CharOutChar = Char.Port( 'OutChar' ) +MiscTypesInString = GraphConvertCharCheck.Link( CharOutChar , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertCharCheck.Link( CharOutChar , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertCharCheck.Link( CharOutChar , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertCharCheck.Link( CharOutChar , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertCharCheck.Link( CharOutChar , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertCharCheck.Link( CharOutChar , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertCharCheck.Link( CharOutChar , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertCharCheck.Link( CharOutChar , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertCharCheck.Run() +GraphConvertCharCheck.DoneW() +GraphConvertCharCheck.PrintPorts() diff --git a/examples/GraphConvertCharCheck.xml b/examples/GraphConvertCharCheck.xml new file mode 100755 index 0000000..874de99 --- /dev/null +++ b/examples/GraphConvertCharCheck.xml @@ -0,0 +1,195 @@ + + + + +? + ? + GraphConvertCharCheck + 1 + ? + +GraphConvertCharCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 11/9/2003 - 17:20:24 + 1.04 + JR + ? + Check conversions of Char + 0 + 0 + + +? + ? + Char + 3 + ? + +Char + + + +char + OutChar + + + +Char + + + + + 11/9/2003 - 17:20:24 + 11/9/2003 - 17:20:24 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 11/9/2003 - 17:20:24 + 11/9/2003 - 17:20:24 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +Char + OutChar + MiscTypes + InString + + +Char + OutChar + MiscTypes + InBool + + +Char + OutChar + MiscTypes + InChar + + +Char + OutChar + MiscTypes + InShort + + +Char + OutChar + MiscTypes + InLong + + +Char + OutChar + MiscTypes + InFloat + + +Char + OutChar + MiscTypes + InDouble + + +Char + OutChar + MiscTypes + InObjRef + + diff --git a/examples/GraphConvertCharStringCheck.py b/examples/GraphConvertCharStringCheck.py new file mode 100755 index 0000000..a1bbef5 --- /dev/null +++ b/examples/GraphConvertCharStringCheck.py @@ -0,0 +1,64 @@ + +# Generated python file of Graph GraphConvertCharStringCheck + +from SuperV import * +# Graph creation +GraphConvertCharStringCheck = Graph( 'GraphConvertCharStringCheck' ) +GraphConvertCharStringCheck.SetName( 'GraphConvertCharStringCheck' ) +GraphConvertCharStringCheck.SetAuthor( 'JR' ) +GraphConvertCharStringCheck.SetComment( 'Check conversions of String' ) +GraphConvertCharStringCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertCharStringCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyCharString = [] +PyCharString.append( 'def StringString() : ' ) +PyCharString.append( ' string = "255" ' ) +PyCharString.append( ' return string ' ) +PyCharString.append( ' ' ) +CharString = GraphConvertCharStringCheck.INode( 'StringString' , PyCharString ) +CharString.OutPort( 'OutString' , 'string' ) +CharString.SetName( 'CharString' ) +CharString.SetAuthor( 'JR' ) +CharString.SetComment( 'InLine Node' ) +CharString.Coords( 14 , 114 ) + +# Creation of Links +CharStringOutString = CharString.Port( 'OutString' ) +MiscTypesInString = GraphConvertCharStringCheck.Link( CharStringOutString , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertCharStringCheck.Link( CharStringOutString , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertCharStringCheck.Link( CharStringOutString , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertCharStringCheck.Link( CharStringOutString , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertCharStringCheck.Link( CharStringOutString , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertCharStringCheck.Link( CharStringOutString , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertCharStringCheck.Link( CharStringOutString , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertCharStringCheck.Link( CharStringOutString , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertCharStringCheck.Run() +GraphConvertCharStringCheck.DoneW() +GraphConvertCharStringCheck.PrintPorts() diff --git a/examples/GraphConvertCharStringCheck.xml b/examples/GraphConvertCharStringCheck.xml new file mode 100755 index 0000000..0c6538d --- /dev/null +++ b/examples/GraphConvertCharStringCheck.xml @@ -0,0 +1,195 @@ + + + + +? + ? + GraphConvertCharStringCheck + 1 + ? + +GraphConvertStringCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 11/9/2003 - 16:52:50 + 1.04 + JR + ? + Check conversions of String + 0 + 0 + + +? + ? + CharString + 3 + ? + +StringString + + + +string + OutString + + + +StringString + + + + + 11/9/2003 - 16:52:29 + 11/9/2003 - 16:52:29 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 11/9/2003 - 16:52:29 + 11/9/2003 - 16:52:29 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +CharString + OutString + MiscTypes + InString + + +CharString + OutString + MiscTypes + InBool + + +CharString + OutString + MiscTypes + InChar + + +CharString + OutString + MiscTypes + InShort + + +CharString + OutString + MiscTypes + InLong + + +CharString + OutString + MiscTypes + InFloat + + +CharString + OutString + MiscTypes + InDouble + + +CharString + OutString + MiscTypes + InObjRef + + diff --git a/examples/GraphConvertDoubleCheck.py b/examples/GraphConvertDoubleCheck.py new file mode 100755 index 0000000..c0f2382 --- /dev/null +++ b/examples/GraphConvertDoubleCheck.py @@ -0,0 +1,112 @@ + +# Generated python file of Graph GraphConvertDoubleCheck + +from SuperV import * +# Graph creation +GraphConvertDoubleCheck = Graph( 'GraphConvertDoubleCheck' ) +GraphConvertDoubleCheck.SetName( 'GraphConvertDoubleCheck' ) +GraphConvertDoubleCheck.SetAuthor( 'JR' ) +GraphConvertDoubleCheck.SetComment( 'Check conversions of Double' ) +GraphConvertDoubleCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertDoubleCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 217 , 0 ) + +MiscTypes_1 = GraphConvertDoubleCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes_1.SetName( 'MiscTypes_1' ) +MiscTypes_1.SetAuthor( '' ) +MiscTypes_1.SetContainer( 'localhost/FactoryServer' ) +MiscTypes_1.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes_1.Coords( 433 , 131 ) + +# Creation of InLine Nodes +PyDouble = [] +PyDouble.append( 'def Double() : ' ) +PyDouble.append( ' aDouble = 3.1415926535 ' ) +PyDouble.append( ' print type(aDouble),"aDouble",aDouble,"NO double in python !!! Use Strings ?" ' ) +PyDouble.append( ' return aDouble ' ) +PyDouble.append( '' ) +Double = GraphConvertDoubleCheck.INode( 'Double' , PyDouble ) +Double.OutPort( 'OutDouble' , 'double' ) +Double.SetName( 'Double' ) +Double.SetAuthor( 'JR' ) +Double.SetComment( 'InLine Node' ) +Double.Coords( 9 , 87 ) + +PyDoubleString = [] +PyDoubleString.append( 'def DoubleString() : ' ) +PyDoubleString.append( ' aDouble = 3.1415926535 ' ) +PyDoubleString.append( ' print type(aDouble),"aDouble",aDouble,"NO double in python !!! Use Strings ?" ' ) +PyDoubleString.append( ' aDoubleString = str( aDouble ) ' ) +PyDoubleString.append( ' print type(aDoubleString),"aDoubleString",aDoubleString ' ) +PyDoubleString.append( ' return aDoubleString ' ) +PyDoubleString.append( ' ' ) +DoubleString = GraphConvertDoubleCheck.INode( 'DoubleString' , PyDoubleString ) +DoubleString.OutPort( 'OutDoubleString' , 'string' ) +DoubleString.SetName( 'DoubleString' ) +DoubleString.SetAuthor( 'JR' ) +DoubleString.SetComment( 'InLine Node' ) +DoubleString.Coords( 217 , 334 ) + +# Creation of Links +DoubleOutDouble = Double.Port( 'OutDouble' ) +MiscTypesInString = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertDoubleCheck.Link( DoubleOutDouble , MiscTypes.Port( 'InObjRef' ) ) + +DoubleStringOutDoubleString = DoubleString.Port( 'OutDoubleString' ) +MiscTypes_1InString = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InString' ) ) + +MiscTypes_1InBool = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InBool' ) ) + +MiscTypes_1InChar = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InChar' ) ) + +MiscTypes_1InShort = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InShort' ) ) + +MiscTypes_1InLong = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InLong' ) ) + +MiscTypes_1InFloat = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InFloat' ) ) + +MiscTypes_1InDouble = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InDouble' ) ) + +MiscTypes_1InObjRef = GraphConvertDoubleCheck.Link( DoubleStringOutDoubleString , MiscTypes_1.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) +MiscTypes_1OutString = MiscTypes_1.Port( 'OutString' ) +MiscTypes_1OutBool = MiscTypes_1.Port( 'OutBool' ) +MiscTypes_1OutChar = MiscTypes_1.Port( 'OutChar' ) +MiscTypes_1OutShort = MiscTypes_1.Port( 'OutShort' ) +MiscTypes_1OutLong = MiscTypes_1.Port( 'OutLong' ) +MiscTypes_1OutFloat = MiscTypes_1.Port( 'OutFloat' ) +MiscTypes_1OutDouble = MiscTypes_1.Port( 'OutDouble' ) +MiscTypes_1OutObjRef = MiscTypes_1.Port( 'OutObjRef' ) + +GraphConvertDoubleCheck.Run() +GraphConvertDoubleCheck.DoneW() +GraphConvertDoubleCheck.PrintPorts() diff --git a/examples/GraphConvertDoubleCheck.xml b/examples/GraphConvertDoubleCheck.xml new file mode 100755 index 0000000..b0ad6da --- /dev/null +++ b/examples/GraphConvertDoubleCheck.xml @@ -0,0 +1,368 @@ + + + + +? + ? + GraphConvertDoubleCheck + 1 + ? + +GraphConvertDoubleCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + +string + MiscTypes_1\OutString + +boolean + MiscTypes_1\OutBool + +char + MiscTypes_1\OutChar + +short + MiscTypes_1\OutShort + +long + MiscTypes_1\OutLong + +float + MiscTypes_1\OutFloat + +double + MiscTypes_1\OutDouble + +SuperVisionTest::Adder + MiscTypes_1\OutObjRef + + + 30/7/2003 - 14:23:52 + 12/9/2003 - 17:49:39 + 1.04 + JR + ? + Check conversions of Double + 0 + 0 + + +? + ? + Double + 3 + ? + +Double + + + +double + OutDouble + + + +Double + + + + + + 12/9/2003 - 17:49:39 + 12/9/2003 - 17:49:39 + 1.04 + JR + ? + InLine Node + 9 + 87 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 12/9/2003 - 17:49:39 + 12/9/2003 - 17:49:39 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 217 + 0 + +? + ? + DoubleString + 3 + ? + +DoubleString + + + +string + OutDoubleString + + + +DoubleString + + + + + + + + 12/9/2003 - 17:49:39 + 12/9/2003 - 17:49:39 + 1.04 + JR + ? + InLine Node + 217 + 334 + +TypesCheck + TypesCheck + MiscTypes_1 + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 12/9/2003 - 17:49:39 + 12/9/2003 - 17:49:39 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 433 + 131 + + +Double + OutDouble + MiscTypes + InString + + +Double + OutDouble + MiscTypes + InBool + + +Double + OutDouble + MiscTypes + InChar + + +Double + OutDouble + MiscTypes + InShort + + +Double + OutDouble + MiscTypes + InLong + + +Double + OutDouble + MiscTypes + InFloat + + +Double + OutDouble + MiscTypes + InDouble + + +Double + OutDouble + MiscTypes + InObjRef + + +DoubleString + OutDoubleString + MiscTypes_1 + InString + + +DoubleString + OutDoubleString + MiscTypes_1 + InBool + + +DoubleString + OutDoubleString + MiscTypes_1 + InChar + + +DoubleString + OutDoubleString + MiscTypes_1 + InShort + + +DoubleString + OutDoubleString + MiscTypes_1 + InLong + + +DoubleString + OutDoubleString + MiscTypes_1 + InFloat + + +DoubleString + OutDoubleString + MiscTypes_1 + InDouble + + +DoubleString + OutDoubleString + MiscTypes_1 + InObjRef + + diff --git a/examples/GraphConvertDoubleStringCheck.py b/examples/GraphConvertDoubleStringCheck.py new file mode 100755 index 0000000..a19fb47 --- /dev/null +++ b/examples/GraphConvertDoubleStringCheck.py @@ -0,0 +1,64 @@ + +# Generated python file of Graph GraphConvertDoubleStringCheck + +from SuperV import * +# Graph creation +GraphConvertDoubleStringCheck = Graph( 'GraphConvertDoubleStringCheck' ) +GraphConvertDoubleStringCheck.SetName( 'GraphConvertDoubleStringCheck' ) +GraphConvertDoubleStringCheck.SetAuthor( 'JR' ) +GraphConvertDoubleStringCheck.SetComment( 'Check conversions of String' ) +GraphConvertDoubleStringCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertDoubleStringCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyDoubleString = [] +PyDoubleString.append( 'def DoubleString() : ' ) +PyDoubleString.append( ' string = "3.1415926535" ' ) +PyDoubleString.append( ' return string ' ) +PyDoubleString.append( ' ' ) +DoubleString = GraphConvertDoubleStringCheck.INode( 'DoubleString' , PyDoubleString ) +DoubleString.OutPort( 'OutString' , 'string' ) +DoubleString.SetName( 'DoubleString' ) +DoubleString.SetAuthor( 'JR' ) +DoubleString.SetComment( 'InLine Node' ) +DoubleString.Coords( 14 , 114 ) + +# Creation of Links +DoubleStringOutString = DoubleString.Port( 'OutString' ) +MiscTypesInString = GraphConvertDoubleStringCheck.Link( DoubleStringOutString , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertDoubleStringCheck.Link( DoubleStringOutString , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertDoubleStringCheck.Link( DoubleStringOutString , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertDoubleStringCheck.Link( DoubleStringOutString , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertDoubleStringCheck.Link( DoubleStringOutString , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertDoubleStringCheck.Link( DoubleStringOutString , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertDoubleStringCheck.Link( DoubleStringOutString , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertDoubleStringCheck.Link( DoubleStringOutString , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertDoubleStringCheck.Run() +GraphConvertDoubleStringCheck.DoneW() +GraphConvertDoubleStringCheck.PrintPorts() diff --git a/examples/GraphConvertDoubleStringCheck.xml b/examples/GraphConvertDoubleStringCheck.xml new file mode 100755 index 0000000..88502a3 --- /dev/null +++ b/examples/GraphConvertDoubleStringCheck.xml @@ -0,0 +1,195 @@ + + + + +? + ? + GraphConvertDoubleStringCheck + 1 + ? + +GraphConvertDoubleStringCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 12/9/2003 - 15:10:45 + 1.04 + JR + ? + Check conversions of String + 0 + 0 + + +? + ? + DoubleString + 3 + ? + +StringString + + + +string + OutString + + + +DoubleString + + + + + 12/9/2003 - 15:9:48 + 12/9/2003 - 15:9:48 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 12/9/2003 - 15:9:48 + 12/9/2003 - 15:9:48 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +DoubleString + OutString + MiscTypes + InString + + +DoubleString + OutString + MiscTypes + InBool + + +DoubleString + OutString + MiscTypes + InChar + + +DoubleString + OutString + MiscTypes + InShort + + +DoubleString + OutString + MiscTypes + InLong + + +DoubleString + OutString + MiscTypes + InFloat + + +DoubleString + OutString + MiscTypes + InDouble + + +DoubleString + OutString + MiscTypes + InObjRef + + diff --git a/examples/GraphConvertFloatCheck.py b/examples/GraphConvertFloatCheck.py new file mode 100755 index 0000000..12fdb7e --- /dev/null +++ b/examples/GraphConvertFloatCheck.py @@ -0,0 +1,65 @@ + +# Generated python file of Graph GraphConvertFloatCheck + +from SuperV import * +# Graph creation +GraphConvertFloatCheck = Graph( 'GraphConvertFloatCheck' ) +GraphConvertFloatCheck.SetName( 'GraphConvertFloatCheck' ) +GraphConvertFloatCheck.SetAuthor( 'JR' ) +GraphConvertFloatCheck.SetComment( 'Check conversions of Float' ) +GraphConvertFloatCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertFloatCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyFloat = [] +PyFloat.append( 'def Float() : ' ) +PyFloat.append( ' aFloat = 3.1415926535 ' ) +PyFloat.append( ' print type(aFloat),"aFloat",aFloat ' ) +PyFloat.append( ' return aFloat ' ) +PyFloat.append( ' ' ) +Float = GraphConvertFloatCheck.INode( 'Float' , PyFloat ) +Float.OutPort( 'OutFloat' , 'float' ) +Float.SetName( 'Float' ) +Float.SetAuthor( 'JR' ) +Float.SetComment( 'InLine Node' ) +Float.Coords( 14 , 114 ) + +# Creation of Links +FloatOutFloat = Float.Port( 'OutFloat' ) +MiscTypesInString = GraphConvertFloatCheck.Link( FloatOutFloat , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertFloatCheck.Link( FloatOutFloat , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertFloatCheck.Link( FloatOutFloat , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertFloatCheck.Link( FloatOutFloat , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertFloatCheck.Link( FloatOutFloat , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertFloatCheck.Link( FloatOutFloat , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertFloatCheck.Link( FloatOutFloat , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertFloatCheck.Link( FloatOutFloat , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertFloatCheck.Run() +GraphConvertFloatCheck.DoneW() +GraphConvertFloatCheck.PrintPorts() diff --git a/examples/GraphConvertFloatCheck.xml b/examples/GraphConvertFloatCheck.xml new file mode 100755 index 0000000..d718bf6 --- /dev/null +++ b/examples/GraphConvertFloatCheck.xml @@ -0,0 +1,196 @@ + + + + +? + ? + GraphConvertFloatCheck + 1 + ? + +GraphConvertFloatCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 12/9/2003 - 15:12:6 + 1.04 + JR + ? + Check conversions of Float + 0 + 0 + + +? + ? + Float + 3 + ? + +Float + + + +float + OutFloat + + + +Float + + + + + + 12/9/2003 - 15:12:6 + 12/9/2003 - 15:12:6 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 12/9/2003 - 15:12:6 + 12/9/2003 - 15:12:6 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +Float + OutFloat + MiscTypes + InString + + +Float + OutFloat + MiscTypes + InBool + + +Float + OutFloat + MiscTypes + InChar + + +Float + OutFloat + MiscTypes + InShort + + +Float + OutFloat + MiscTypes + InLong + + +Float + OutFloat + MiscTypes + InFloat + + +Float + OutFloat + MiscTypes + InDouble + + +Float + OutFloat + MiscTypes + InObjRef + + diff --git a/examples/GraphConvertFloatStringCheck.py b/examples/GraphConvertFloatStringCheck.py new file mode 100755 index 0000000..45d4f9c --- /dev/null +++ b/examples/GraphConvertFloatStringCheck.py @@ -0,0 +1,64 @@ + +# Generated python file of Graph GraphConvertFloatStringCheck + +from SuperV import * +# Graph creation +GraphConvertFloatStringCheck = Graph( 'GraphConvertFloatStringCheck' ) +GraphConvertFloatStringCheck.SetName( 'GraphConvertFloatStringCheck' ) +GraphConvertFloatStringCheck.SetAuthor( 'JR' ) +GraphConvertFloatStringCheck.SetComment( 'Check conversions of String' ) +GraphConvertFloatStringCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertFloatStringCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyFloatString = [] +PyFloatString.append( 'def FloatString() : ' ) +PyFloatString.append( ' string = "3.1415926535" ' ) +PyFloatString.append( ' return string ' ) +PyFloatString.append( ' ' ) +FloatString = GraphConvertFloatStringCheck.INode( 'FloatString' , PyFloatString ) +FloatString.OutPort( 'OutString' , 'string' ) +FloatString.SetName( 'FloatString' ) +FloatString.SetAuthor( 'JR' ) +FloatString.SetComment( 'InLine Node' ) +FloatString.Coords( 14 , 114 ) + +# Creation of Links +FloatStringOutString = FloatString.Port( 'OutString' ) +MiscTypesInString = GraphConvertFloatStringCheck.Link( FloatStringOutString , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertFloatStringCheck.Link( FloatStringOutString , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertFloatStringCheck.Link( FloatStringOutString , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertFloatStringCheck.Link( FloatStringOutString , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertFloatStringCheck.Link( FloatStringOutString , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertFloatStringCheck.Link( FloatStringOutString , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertFloatStringCheck.Link( FloatStringOutString , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertFloatStringCheck.Link( FloatStringOutString , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertFloatStringCheck.Run() +GraphConvertFloatStringCheck.DoneW() +GraphConvertFloatStringCheck.PrintPorts() diff --git a/examples/GraphConvertFloatStringCheck.xml b/examples/GraphConvertFloatStringCheck.xml new file mode 100755 index 0000000..96acc38 --- /dev/null +++ b/examples/GraphConvertFloatStringCheck.xml @@ -0,0 +1,195 @@ + + + + +? + ? + GraphConvertFloatStringCheck + 1 + ? + +GraphConvertFloatStringCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 11/9/2003 - 17:7:31 + 1.04 + JR + ? + Check conversions of String + 0 + 0 + + +? + ? + FloatString + 3 + ? + +StringString + + + +string + OutString + + + +FloatString + + + + + 11/9/2003 - 17:7:14 + 11/9/2003 - 17:7:14 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 11/9/2003 - 17:7:14 + 11/9/2003 - 17:7:14 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +FloatString + OutString + MiscTypes + InString + + +FloatString + OutString + MiscTypes + InBool + + +FloatString + OutString + MiscTypes + InChar + + +FloatString + OutString + MiscTypes + InShort + + +FloatString + OutString + MiscTypes + InLong + + +FloatString + OutString + MiscTypes + InFloat + + +FloatString + OutString + MiscTypes + InDouble + + +FloatString + OutString + MiscTypes + InObjRef + + diff --git a/examples/GraphConvertIORCheck.py b/examples/GraphConvertIORCheck.py new file mode 100755 index 0000000..9830a97 --- /dev/null +++ b/examples/GraphConvertIORCheck.py @@ -0,0 +1,79 @@ + +# Generated python file of Graph GraphConvertIORCheck + +from SuperV import * +# Graph creation +GraphConvertIORCheck = Graph( 'GraphConvertIORCheck' ) +GraphConvertIORCheck.SetName( 'GraphConvertIORCheck' ) +GraphConvertIORCheck.SetAuthor( 'JR' ) +GraphConvertIORCheck.SetComment( 'Check conversions of IOR' ) +GraphConvertIORCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertIORCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PySyrComponent = [] +PySyrComponent.append( 'from LifeCycleCORBA import * ' ) +PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) : ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' ) +PySyrComponent.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) +PySyrComponent.append( ' print "SyrComponent orb",orb ' ) +PySyrComponent.append( ' lcc = LifeCycleCORBA(orb) ' ) +PySyrComponent.append( ' print "SyrComponent lcc",lcc ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' ) +PySyrComponent.append( ' ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent ) ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,") --> ",ComponentRef ' ) +PySyrComponent.append( ' IOR = orb.object_to_string( ComponentRef ) ' ) +PySyrComponent.append( ' return IOR ' ) +PySyrComponent.append( ' ' ) +SyrComponent = GraphConvertIORCheck.INode( 'SyrComponent' , PySyrComponent ) +SyrComponent.InPort( 'aContainer' , 'string' ) +SyrComponent.InPort( 'aComponent' , 'string' ) +SyrComponent.OutPort( 'anIOR' , 'string' ) +SyrComponent.SetName( 'SyrComponent' ) +SyrComponent.SetAuthor( 'JR' ) +SyrComponent.SetComment( 'InLine Node' ) +SyrComponent.Coords( 14 , 114 ) + +# Creation of Links +SyrComponentanIOR = SyrComponent.Port( 'anIOR' ) +MiscTypesInShort = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInString = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInLong = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertIORCheck.Link( SyrComponentanIOR , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Input datas +SyrComponentaContainer = SyrComponent.Input( 'aContainer' , 'FactoryServerPy') +SyrComponentaComponent = SyrComponent.Input( 'aComponent' , 'SyrControlComponent') + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertIORCheck.Run() +GraphConvertIORCheck.DoneW() +GraphConvertIORCheck.PrintPorts() diff --git a/examples/GraphConvertIORCheck.xml b/examples/GraphConvertIORCheck.xml new file mode 100755 index 0000000..01be445 --- /dev/null +++ b/examples/GraphConvertIORCheck.xml @@ -0,0 +1,234 @@ + + + + +? + ? + GraphConvertIORCheck + 1 + ? + +GraphConvertIORCheck + + +string + SyrComponent\aContainer + +string + SyrComponent\aComponent + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 11/9/2003 - 15:45:18 + 1.04 + JR + ? + Check conversions of IOR + 0 + 0 + + +? + ? + SyrComponent + 3 + ? + +SyrComponent + + +string + aContainer + +string + aComponent + + +string + anIOR + + + +SyrComponent + + + + + + + + + + ",ComponentRef ]]> + + + + 11/9/2003 - 15:45:18 + 11/9/2003 - 15:45:18 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 11/9/2003 - 15:45:18 + 11/9/2003 - 15:45:18 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +SyrComponent + anIOR + MiscTypes + InShort + + +SyrComponent + anIOR + MiscTypes + InString + + +SyrComponent + anIOR + MiscTypes + InBool + + +SyrComponent + anIOR + MiscTypes + InChar + + +SyrComponent + anIOR + MiscTypes + InLong + + +SyrComponent + anIOR + MiscTypes + InFloat + + +SyrComponent + anIOR + MiscTypes + InDouble + + +SyrComponent + anIOR + MiscTypes + InObjRef + + + +GraphConvertIORCheck + SyrComponent\aContainer + SyrComponent + aContainer + +18 + FactoryServerPy + + +GraphConvertIORCheck + SyrComponent\aComponent + SyrComponent + aComponent + +18 + SyrControlComponent + diff --git a/examples/GraphConvertLongCheck.py b/examples/GraphConvertLongCheck.py new file mode 100755 index 0000000..d729477 --- /dev/null +++ b/examples/GraphConvertLongCheck.py @@ -0,0 +1,65 @@ + +# Generated python file of Graph GraphConvertLongCheck + +from SuperV import * +# Graph creation +GraphConvertLongCheck = Graph( 'GraphConvertLongCheck' ) +GraphConvertLongCheck.SetName( 'GraphConvertLongCheck' ) +GraphConvertLongCheck.SetAuthor( 'JR' ) +GraphConvertLongCheck.SetComment( 'Check conversions of Long' ) +GraphConvertLongCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertLongCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyLong = [] +PyLong.append( 'def Long() : ' ) +PyLong.append( ' aLong = 2147483647 ' ) +PyLong.append( ' print type( aLong ),"aLong",aLong ' ) +PyLong.append( ' return aLong ' ) +PyLong.append( ' ' ) +Long = GraphConvertLongCheck.INode( 'Long' , PyLong ) +Long.OutPort( 'OutLong' , 'long' ) +Long.SetName( 'Long' ) +Long.SetAuthor( 'JR' ) +Long.SetComment( 'InLine Node' ) +Long.Coords( 14 , 114 ) + +# Creation of Links +LongOutLong = Long.Port( 'OutLong' ) +MiscTypesInString = GraphConvertLongCheck.Link( LongOutLong , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertLongCheck.Link( LongOutLong , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertLongCheck.Link( LongOutLong , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertLongCheck.Link( LongOutLong , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertLongCheck.Link( LongOutLong , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertLongCheck.Link( LongOutLong , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertLongCheck.Link( LongOutLong , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertLongCheck.Link( LongOutLong , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertLongCheck.Run() +GraphConvertLongCheck.DoneW() +GraphConvertLongCheck.PrintPorts() diff --git a/examples/GraphConvertLongCheck.xml b/examples/GraphConvertLongCheck.xml new file mode 100755 index 0000000..969cb0a --- /dev/null +++ b/examples/GraphConvertLongCheck.xml @@ -0,0 +1,196 @@ + + + + +? + ? + GraphConvertLongCheck + 1 + ? + +GraphConvertLongCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 12/9/2003 - 10:31:19 + 1.04 + JR + ? + Check conversions of Long + 0 + 0 + + +? + ? + Long + 3 + ? + +Long + + + +long + OutLong + + + +Long + + + + + + 12/9/2003 - 10:31:19 + 12/9/2003 - 10:31:19 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 12/9/2003 - 10:31:19 + 12/9/2003 - 10:31:19 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +Long + OutLong + MiscTypes + InString + + +Long + OutLong + MiscTypes + InBool + + +Long + OutLong + MiscTypes + InChar + + +Long + OutLong + MiscTypes + InShort + + +Long + OutLong + MiscTypes + InLong + + +Long + OutLong + MiscTypes + InFloat + + +Long + OutLong + MiscTypes + InDouble + + +Long + OutLong + MiscTypes + InObjRef + + diff --git a/examples/GraphConvertLongStringCheck.py b/examples/GraphConvertLongStringCheck.py new file mode 100755 index 0000000..8b02e0d --- /dev/null +++ b/examples/GraphConvertLongStringCheck.py @@ -0,0 +1,64 @@ + +# Generated python file of Graph GraphConvertLongStringCheck + +from SuperV import * +# Graph creation +GraphConvertLongStringCheck = Graph( 'GraphConvertLongStringCheck' ) +GraphConvertLongStringCheck.SetName( 'GraphConvertLongStringCheck' ) +GraphConvertLongStringCheck.SetAuthor( 'JR' ) +GraphConvertLongStringCheck.SetComment( 'Check conversions of String' ) +GraphConvertLongStringCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertLongStringCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyLongString = [] +PyLongString.append( 'def LongString() : ' ) +PyLongString.append( ' string = "9223372036854775807" ' ) +PyLongString.append( ' return string ' ) +PyLongString.append( ' ' ) +LongString = GraphConvertLongStringCheck.INode( 'LongString' , PyLongString ) +LongString.OutPort( 'OutString' , 'string' ) +LongString.SetName( 'LongString' ) +LongString.SetAuthor( 'JR' ) +LongString.SetComment( 'InLine Node' ) +LongString.Coords( 14 , 114 ) + +# Creation of Links +LongStringOutString = LongString.Port( 'OutString' ) +MiscTypesInString = GraphConvertLongStringCheck.Link( LongStringOutString , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertLongStringCheck.Link( LongStringOutString , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertLongStringCheck.Link( LongStringOutString , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertLongStringCheck.Link( LongStringOutString , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertLongStringCheck.Link( LongStringOutString , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertLongStringCheck.Link( LongStringOutString , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertLongStringCheck.Link( LongStringOutString , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertLongStringCheck.Link( LongStringOutString , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertLongStringCheck.Run() +GraphConvertLongStringCheck.DoneW() +GraphConvertLongStringCheck.PrintPorts() diff --git a/examples/GraphConvertLongStringCheck.xml b/examples/GraphConvertLongStringCheck.xml new file mode 100755 index 0000000..cf71bbe --- /dev/null +++ b/examples/GraphConvertLongStringCheck.xml @@ -0,0 +1,195 @@ + + + + +? + ? + GraphConvertLongStringCheck + 1 + ? + +GraphConvertLongStringCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 12/9/2003 - 10:51:28 + 1.04 + JR + ? + Check conversions of String + 0 + 0 + + +? + ? + LongString + 3 + ? + +LongString + + + +string + OutString + + + +LongString + + + + + 12/9/2003 - 10:51:28 + 12/9/2003 - 10:51:28 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 12/9/2003 - 10:51:28 + 12/9/2003 - 10:51:28 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +LongString + OutString + MiscTypes + InString + + +LongString + OutString + MiscTypes + InBool + + +LongString + OutString + MiscTypes + InChar + + +LongString + OutString + MiscTypes + InShort + + +LongString + OutString + MiscTypes + InLong + + +LongString + OutString + MiscTypes + InFloat + + +LongString + OutString + MiscTypes + InDouble + + +LongString + OutString + MiscTypes + InObjRef + + diff --git a/examples/GraphConvertObjRefCheck.py b/examples/GraphConvertObjRefCheck.py new file mode 100755 index 0000000..55a45ae --- /dev/null +++ b/examples/GraphConvertObjRefCheck.py @@ -0,0 +1,78 @@ + +# Generated python file of Graph GraphConvertObjRefCheck + +from SuperV import * +# Graph creation +GraphConvertObjRefCheck = Graph( 'GraphConvertObjRefCheck' ) +GraphConvertObjRefCheck.SetName( 'GraphConvertObjRefCheck' ) +GraphConvertObjRefCheck.SetAuthor( 'JR' ) +GraphConvertObjRefCheck.SetComment( 'Check conversions of ObjRef' ) +GraphConvertObjRefCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertObjRefCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PySyrComponent = [] +PySyrComponent.append( 'from LifeCycleCORBA import * ' ) +PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) : ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' ) +PySyrComponent.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) +PySyrComponent.append( ' print "SyrComponent orb",orb ' ) +PySyrComponent.append( ' lcc = LifeCycleCORBA(orb) ' ) +PySyrComponent.append( ' print "SyrComponent lcc",lcc ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' ) +PySyrComponent.append( ' ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent ) ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,") --> ",ComponentRef ' ) +PySyrComponent.append( ' return ComponentRef ' ) +PySyrComponent.append( '' ) +SyrComponent = GraphConvertObjRefCheck.INode( 'SyrComponent' , PySyrComponent ) +SyrComponent.InPort( 'aContainer' , 'string' ) +SyrComponent.InPort( 'aComponent' , 'string' ) +SyrComponent.OutPort( 'anObjRef' , 'objref' ) +SyrComponent.SetName( 'SyrComponent' ) +SyrComponent.SetAuthor( 'JR' ) +SyrComponent.SetComment( 'InLine Node' ) +SyrComponent.Coords( 14 , 114 ) + +# Creation of Links +SyrComponentanObjRef = SyrComponent.Port( 'anObjRef' ) +MiscTypesInShort = GraphConvertObjRefCheck.Link( SyrComponentanObjRef , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInString = GraphConvertObjRefCheck.Link( SyrComponentanObjRef , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertObjRefCheck.Link( SyrComponentanObjRef , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertObjRefCheck.Link( SyrComponentanObjRef , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInLong = GraphConvertObjRefCheck.Link( SyrComponentanObjRef , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertObjRefCheck.Link( SyrComponentanObjRef , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertObjRefCheck.Link( SyrComponentanObjRef , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertObjRefCheck.Link( SyrComponentanObjRef , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Input datas +SyrComponentaContainer = SyrComponent.Input( 'aContainer' , 'FactoryServerPy') +SyrComponentaComponent = SyrComponent.Input( 'aComponent' , 'SyrControlComponent') + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertObjRefCheck.Run() +GraphConvertObjRefCheck.DoneW() +GraphConvertObjRefCheck.PrintPorts() diff --git a/examples/GraphConvertObjRefCheck.xml b/examples/GraphConvertObjRefCheck.xml new file mode 100755 index 0000000..59cee23 --- /dev/null +++ b/examples/GraphConvertObjRefCheck.xml @@ -0,0 +1,233 @@ + + + + +? + ? + GraphConvertObjRefCheck + 1 + ? + +GraphConvertObjRefCheck + + +string + SyrComponent\aContainer + +string + SyrComponent\aComponent + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 11/9/2003 - 15:18:16 + 1.04 + JR + ? + Check conversions of ObjRef + 0 + 0 + + +? + ? + SyrComponent + 3 + ? + +SyrComponent + + +string + aContainer + +string + aComponent + + +objref + anObjRef + + + +SyrComponent + + + + + + + + + + ",ComponentRef ]]> + + + 11/9/2003 - 15:16:43 + 11/9/2003 - 15:16:43 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 11/9/2003 - 15:16:43 + 11/9/2003 - 15:16:43 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +SyrComponent + anObjRef + MiscTypes + InShort + + +SyrComponent + anObjRef + MiscTypes + InString + + +SyrComponent + anObjRef + MiscTypes + InBool + + +SyrComponent + anObjRef + MiscTypes + InChar + + +SyrComponent + anObjRef + MiscTypes + InLong + + +SyrComponent + anObjRef + MiscTypes + InFloat + + +SyrComponent + anObjRef + MiscTypes + InDouble + + +SyrComponent + anObjRef + MiscTypes + InObjRef + + + +GraphConvertObjRefCheck + SyrComponent\aContainer + SyrComponent + aContainer + +18 + FactoryServerPy + + +GraphConvertObjRefCheck + SyrComponent\aComponent + SyrComponent + aComponent + +18 + SyrControlComponent + diff --git a/examples/GraphConvertShortCheck.py b/examples/GraphConvertShortCheck.py new file mode 100755 index 0000000..08e86b1 --- /dev/null +++ b/examples/GraphConvertShortCheck.py @@ -0,0 +1,65 @@ + +# Generated python file of Graph GraphConvertShortCheck + +from SuperV import * +# Graph creation +GraphConvertShortCheck = Graph( 'GraphConvertShortCheck' ) +GraphConvertShortCheck.SetName( 'GraphConvertShortCheck' ) +GraphConvertShortCheck.SetAuthor( 'JR' ) +GraphConvertShortCheck.SetComment( 'Check conversions of Short' ) +GraphConvertShortCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertShortCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyShort = [] +PyShort.append( 'def Short() : ' ) +PyShort.append( ' aShort = 32767 ' ) +PyShort.append( ' print type( aShort ),"aShort",aShort ' ) +PyShort.append( ' return aShort ' ) +PyShort.append( ' ' ) +Short = GraphConvertShortCheck.INode( 'Short' , PyShort ) +Short.OutPort( 'OutShort' , 'short' ) +Short.SetName( 'Short' ) +Short.SetAuthor( 'JR' ) +Short.SetComment( 'InLine Node' ) +Short.Coords( 14 , 114 ) + +# Creation of Links +ShortOutShort = Short.Port( 'OutShort' ) +MiscTypesInString = GraphConvertShortCheck.Link( ShortOutShort , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertShortCheck.Link( ShortOutShort , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertShortCheck.Link( ShortOutShort , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertShortCheck.Link( ShortOutShort , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertShortCheck.Link( ShortOutShort , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertShortCheck.Link( ShortOutShort , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertShortCheck.Link( ShortOutShort , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertShortCheck.Link( ShortOutShort , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertShortCheck.Run() +GraphConvertShortCheck.DoneW() +GraphConvertShortCheck.PrintPorts() diff --git a/examples/GraphConvertShortCheck.xml b/examples/GraphConvertShortCheck.xml new file mode 100755 index 0000000..82fd8b3 --- /dev/null +++ b/examples/GraphConvertShortCheck.xml @@ -0,0 +1,196 @@ + + + + +? + ? + GraphConvertShortCheck + 1 + ? + +GraphConvertShortCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 12/9/2003 - 10:35:33 + 1.04 + JR + ? + Check conversions of Short + 0 + 0 + + +? + ? + Short + 3 + ? + +Short + + + +short + OutShort + + + +Short + + + + + + 12/9/2003 - 10:35:33 + 12/9/2003 - 10:35:33 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 12/9/2003 - 10:35:33 + 12/9/2003 - 10:35:33 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +Short + OutShort + MiscTypes + InString + + +Short + OutShort + MiscTypes + InBool + + +Short + OutShort + MiscTypes + InChar + + +Short + OutShort + MiscTypes + InShort + + +Short + OutShort + MiscTypes + InLong + + +Short + OutShort + MiscTypes + InFloat + + +Short + OutShort + MiscTypes + InDouble + + +Short + OutShort + MiscTypes + InObjRef + + diff --git a/examples/GraphConvertShortStringCheck.py b/examples/GraphConvertShortStringCheck.py new file mode 100755 index 0000000..16f6e96 --- /dev/null +++ b/examples/GraphConvertShortStringCheck.py @@ -0,0 +1,64 @@ + +# Generated python file of Graph GraphConvertShortStringCheck + +from SuperV import * +# Graph creation +GraphConvertShortStringCheck = Graph( 'GraphConvertShortStringCheck' ) +GraphConvertShortStringCheck.SetName( 'GraphConvertShortStringCheck' ) +GraphConvertShortStringCheck.SetAuthor( 'JR' ) +GraphConvertShortStringCheck.SetComment( 'Check conversions of String' ) +GraphConvertShortStringCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertShortStringCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyShortString = [] +PyShortString.append( 'def ShortString() : ' ) +PyShortString.append( ' string = "32767" ' ) +PyShortString.append( ' return string ' ) +PyShortString.append( ' ' ) +ShortString = GraphConvertShortStringCheck.INode( 'ShortString' , PyShortString ) +ShortString.OutPort( 'OutString' , 'string' ) +ShortString.SetName( 'ShortString' ) +ShortString.SetAuthor( 'JR' ) +ShortString.SetComment( 'InLine Node' ) +ShortString.Coords( 14 , 114 ) + +# Creation of Links +ShortStringOutString = ShortString.Port( 'OutString' ) +MiscTypesInString = GraphConvertShortStringCheck.Link( ShortStringOutString , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertShortStringCheck.Link( ShortStringOutString , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertShortStringCheck.Link( ShortStringOutString , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertShortStringCheck.Link( ShortStringOutString , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertShortStringCheck.Link( ShortStringOutString , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertShortStringCheck.Link( ShortStringOutString , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertShortStringCheck.Link( ShortStringOutString , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertShortStringCheck.Link( ShortStringOutString , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertShortStringCheck.Run() +GraphConvertShortStringCheck.DoneW() +GraphConvertShortStringCheck.PrintPorts() diff --git a/examples/GraphConvertShortStringCheck.xml b/examples/GraphConvertShortStringCheck.xml new file mode 100755 index 0000000..7b04918 --- /dev/null +++ b/examples/GraphConvertShortStringCheck.xml @@ -0,0 +1,195 @@ + + + + +? + ? + GraphConvertShortStringCheck + 1 + ? + +GraphConvertShortStringCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 12/9/2003 - 10:37:59 + 1.04 + JR + ? + Check conversions of String + 0 + 0 + + +? + ? + ShortString + 3 + ? + +ShortString + + + +string + OutString + + + +ShortString + + + + + 12/9/2003 - 10:37:59 + 12/9/2003 - 10:37:59 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 12/9/2003 - 10:37:59 + 12/9/2003 - 10:37:59 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +ShortString + OutString + MiscTypes + InString + + +ShortString + OutString + MiscTypes + InBool + + +ShortString + OutString + MiscTypes + InChar + + +ShortString + OutString + MiscTypes + InShort + + +ShortString + OutString + MiscTypes + InLong + + +ShortString + OutString + MiscTypes + InFloat + + +ShortString + OutString + MiscTypes + InDouble + + +ShortString + OutString + MiscTypes + InObjRef + + diff --git a/examples/GraphConvertStringStringCheck.py b/examples/GraphConvertStringStringCheck.py new file mode 100755 index 0000000..a42318f --- /dev/null +++ b/examples/GraphConvertStringStringCheck.py @@ -0,0 +1,64 @@ + +# Generated python file of Graph GraphConvertStringStringCheck + +from SuperV import * +# Graph creation +GraphConvertStringStringCheck = Graph( 'GraphConvertStringStringCheck' ) +GraphConvertStringStringCheck.SetName( 'GraphConvertStringStringCheck' ) +GraphConvertStringStringCheck.SetAuthor( 'JR' ) +GraphConvertStringStringCheck.SetComment( 'Check conversions of String' ) +GraphConvertStringStringCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +MiscTypes = GraphConvertStringStringCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 284 , 28 ) + +# Creation of InLine Nodes +PyStringString = [] +PyStringString.append( 'def StringString() : ' ) +PyStringString.append( ' string = "The sentence that you are reading cannot be demonstrated" ' ) +PyStringString.append( ' return string ' ) +PyStringString.append( '' ) +StringString = GraphConvertStringStringCheck.INode( 'StringString' , PyStringString ) +StringString.OutPort( 'OutString' , 'string' ) +StringString.SetName( 'StringString' ) +StringString.SetAuthor( 'JR' ) +StringString.SetComment( 'InLine Node' ) +StringString.Coords( 14 , 114 ) + +# Creation of Links +StringStringOutString = StringString.Port( 'OutString' ) +MiscTypesInString = GraphConvertStringStringCheck.Link( StringStringOutString , MiscTypes.Port( 'InString' ) ) + +MiscTypesInBool = GraphConvertStringStringCheck.Link( StringStringOutString , MiscTypes.Port( 'InBool' ) ) + +MiscTypesInChar = GraphConvertStringStringCheck.Link( StringStringOutString , MiscTypes.Port( 'InChar' ) ) + +MiscTypesInShort = GraphConvertStringStringCheck.Link( StringStringOutString , MiscTypes.Port( 'InShort' ) ) + +MiscTypesInLong = GraphConvertStringStringCheck.Link( StringStringOutString , MiscTypes.Port( 'InLong' ) ) + +MiscTypesInFloat = GraphConvertStringStringCheck.Link( StringStringOutString , MiscTypes.Port( 'InFloat' ) ) + +MiscTypesInDouble = GraphConvertStringStringCheck.Link( StringStringOutString , MiscTypes.Port( 'InDouble' ) ) + +MiscTypesInObjRef = GraphConvertStringStringCheck.Link( StringStringOutString , MiscTypes.Port( 'InObjRef' ) ) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphConvertStringStringCheck.Run() +GraphConvertStringStringCheck.DoneW() +GraphConvertStringStringCheck.PrintPorts() diff --git a/examples/GraphConvertStringStringCheck.xml b/examples/GraphConvertStringStringCheck.xml new file mode 100755 index 0000000..fc1aeba --- /dev/null +++ b/examples/GraphConvertStringStringCheck.xml @@ -0,0 +1,195 @@ + + + + +? + ? + GraphConvertStringStringCheck + 1 + ? + +GraphConvertStringCheck + + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 30/7/2003 - 14:23:52 + 11/9/2003 - 16:43:51 + 1.04 + JR + ? + Check conversions of String + 0 + 0 + + +? + ? + StringString + 3 + ? + +StringString + + + +string + OutString + + + +StringString + + + + + 11/9/2003 - 16:43:51 + 11/9/2003 - 16:43:51 + 1.04 + JR + ? + InLine Node + 14 + 114 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 11/9/2003 - 16:43:51 + 11/9/2003 - 16:43:51 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 284 + 28 + + +StringString + OutString + MiscTypes + InString + + +StringString + OutString + MiscTypes + InBool + + +StringString + OutString + MiscTypes + InChar + + +StringString + OutString + MiscTypes + InShort + + +StringString + OutString + MiscTypes + InLong + + +StringString + OutString + MiscTypes + InFloat + + +StringString + OutString + MiscTypes + InDouble + + +StringString + OutString + MiscTypes + InObjRef + + diff --git a/examples/GraphCpuUsed.py b/examples/GraphCpuUsed.py new file mode 100755 index 0000000..15906f1 --- /dev/null +++ b/examples/GraphCpuUsed.py @@ -0,0 +1,142 @@ + +# Generated python file of Graph GraphCpuUsed + +from SuperV import * +# Graph creation +GraphCpuUsed = Graph( 'GraphCpuUsed' ) +GraphCpuUsed.SetName( 'GraphCpuUsed' ) +GraphCpuUsed.SetAuthor( '' ) +GraphCpuUsed.SetComment( '' ) +GraphCpuUsed.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +sigma = GraphCpuUsed.FNode( 'FactorialComponent' , 'FactorialComponent' , 'sigma' ) +sigma.SetName( 'sigma' ) +sigma.SetAuthor( 'JR' ) +sigma.SetContainer( 'localhost/FactoryServerPy' ) +sigma.SetComment( 'sigma from FactorialComponent' ) +sigma.Coords( 214 , 172 ) + +Sigma = GraphCpuUsed.FNode( 'AddComponent' , 'AddComponent' , 'Sigma' ) +Sigma.SetName( 'Sigma' ) +Sigma.SetAuthor( '' ) +Sigma.SetContainer( 'localhost/FactoryServer' ) +Sigma.SetComment( 'Sigma from AddComponent' ) +Sigma.Coords( 418 , 21 ) + +# Creation of InLine Nodes +PyAdd = [] +PyAdd.append( 'from time import * ' ) +PyAdd.append( 'def Add(a,b) : ' ) +PyAdd.append( ' print "Add will wait 5 seconds" ' ) +PyAdd.append( ' d = dir() ' ) +PyAdd.append( ' print "Add",d ' ) +PyAdd.append( ' d = dir(sleep) ' ) +PyAdd.append( ' print "Add",d ' ) +PyAdd.append( ' sleep(5) ' ) +PyAdd.append( ' print "Add waited" ' ) +PyAdd.append( ' n = 0 ' ) +PyAdd.append( ' while n < 10000 : ' ) +PyAdd.append( ' i = 0 ' ) +PyAdd.append( ' s = 0 ' ) +PyAdd.append( ' while i <= b : ' ) +PyAdd.append( ' s = s + i ' ) +PyAdd.append( ' i = i + 1 ' ) +PyAdd.append( ' n = n + 1 ' ) +PyAdd.append( ' return s ' ) +PyAdd.append( '' ) +Add = GraphCpuUsed.INode( 'Add' , PyAdd ) +Add.InPort( 'a' , 'long' ) +Add.InPort( 'b' , 'long' ) +Add.OutPort( 'f' , 'long' ) +Add.SetName( 'Add' ) +Add.SetAuthor( '' ) +Add.SetComment( 'Python function' ) +Add.Coords( 214 , 0 ) + +PySub = [] +PySub.append( 'def Sub(a,b) : ' ) +PySub.append( ' return a-b ' ) +PySub.append( '' ) +Sub = GraphCpuUsed.INode( 'Sub' , PySub ) +Sub.InPort( 'a' , 'long' ) +Sub.InPort( 'b' , 'long' ) +Sub.OutPort( 'f' , 'long' ) +Sub.SetName( 'Sub' ) +Sub.SetAuthor( '' ) +Sub.SetComment( 'Python function' ) +Sub.Coords( 0 , 139 ) + +PyCompare = [] +PyCompare.append( 'def Compare( Add , sigma , Sigma ) : ' ) +PyCompare.append( ' Result = "Good" ' ) +PyCompare.append( ' if Add != sigma : ' ) +PyCompare.append( ' Result = "Bad" ' ) +PyCompare.append( ' if Add != Sigma : ' ) +PyCompare.append( ' Result = "Bad" ' ) +PyCompare.append( ' return Result ' ) +PyCompare.append( '' ) +Compare = GraphCpuUsed.INode( 'Compare' , PyCompare ) +Compare.InPort( 'Add' , 'long' ) +Compare.InPort( 'Sigma' , 'long' ) +Compare.InPort( 'sigma' , 'long' ) +Compare.OutPort( 'Result' , 'string' ) +Compare.SetName( 'Compare' ) +Compare.SetAuthor( '' ) +Compare.SetComment( 'Compute Node' ) +Compare.Coords( 419 , 184 ) + +# Creation of Links +Addf = Add.Port( 'f' ) +CompareAdd = GraphCpuUsed.Link( Addf , Compare.Port( 'Add' ) ) +CompareAdd.AddCoord( 1 , 411 , 265 ) +CompareAdd.AddCoord( 2 , 411 , 169 ) +CompareAdd.AddCoord( 3 , 617 , 169 ) +CompareAdd.AddCoord( 4 , 618 , 8 ) +CompareAdd.AddCoord( 5 , 401 , 8 ) +CompareAdd.AddCoord( 6 , 400 , 80 ) + +Subf = Sub.Port( 'f' ) +Addb = GraphCpuUsed.Link( Subf , Add.Port( 'b' ) ) +Addb.AddCoord( 1 , 189 , 108 ) +Addb.AddCoord( 2 , 191 , 220 ) + +sigman = GraphCpuUsed.Link( Subf , sigma.Port( 'n' ) ) +sigman.AddCoord( 1 , 206 , 254 ) +sigman.AddCoord( 2 , 206 , 220 ) + +Sigman = GraphCpuUsed.Link( Subf , Sigma.Port( 'n' ) ) +Sigman.AddCoord( 1 , 389 , 101 ) +Sigman.AddCoord( 2 , 390 , 160 ) +Sigman.AddCoord( 3 , 190 , 161 ) +Sigman.AddCoord( 4 , 190 , 220 ) + +sigmaf = sigma.Port( 'f' ) +Comparesigma = GraphCpuUsed.Link( sigmaf , Compare.Port( 'sigma' ) ) +Comparesigma.AddCoord( 1 , 386 , 323 ) +Comparesigma.AddCoord( 2 , 385 , 253 ) + +Sigmaf = Sigma.Port( 'f' ) +CompareSigma = GraphCpuUsed.Link( Sigmaf , Compare.Port( 'Sigma' ) ) +CompareSigma.AddCoord( 1 , 400 , 295 ) +CompareSigma.AddCoord( 2 , 400 , 153 ) +CompareSigma.AddCoord( 3 , 595 , 153 ) +CompareSigma.AddCoord( 4 , 595 , 102 ) + +# Creation of Input datas +Adda = Add.Input( 'a' , 1) +Suba = Sub.Input( 'a' , 1000) +Subb = Sub.Input( 'b' , 1) + +# Creation of Output variables +CompareResult = Compare.Port( 'Result' ) + +GraphCpuUsed.Run() +GraphCpuUsed.DoneW() +GraphCpuUsed.PrintPorts() +print "sigma",sigma.CpuUsed(),"seconds" +print "Sigma",Sigma.CpuUsed(),"seconds" +print "Add",Add.CpuUsed(),"seconds" +print "Sub",Sub.CpuUsed(),"seconds" +print "Compare",Compare.CpuUsed(),"seconds" diff --git a/examples/GraphCpuUsed.xml b/examples/GraphCpuUsed.xml new file mode 100755 index 0000000..4140fb7 --- /dev/null +++ b/examples/GraphCpuUsed.xml @@ -0,0 +1,339 @@ + + + + +? + ? + GraphCpuUsed + 1 + ? + +GraphCpuUsed + + +long + Add\a + +long + Sub\a + +long + Sub\b + + +string + Compare\Result + + + 24/3/2003 - 10:58:41 + 6/8/2003 - 11:44:4 + 1.04 + ? + ? + ? + 0 + 0 + + +? + ? + Add + 3 + ? + +Add + + +long + a + +long + b + + +long + f + + + +Add + + + + + + + + + + + + + + + + + + + + 6/8/2003 - 11:44:4 + 6/8/2003 - 11:44:4 + 1.04 + ? + ? + Python function + 214 + 0 + +? + ? + Sub + 3 + ? + +Sub + + +long + a + +long + b + + +long + f + + + +Sub + + + + 6/8/2003 - 11:44:4 + 6/8/2003 - 11:44:4 + 1.04 + ? + ? + Python function + 0 + 139 + +FactorialComponent + FactorialComponent + sigma + 0 + ? + +sigma + + +long + n + + +long + f + + + 6/8/2003 - 11:44:4 + 6/8/2003 - 11:44:4 + 1.04 + JR + localhost/FactoryServerPy + sigma from FactorialComponent + 214 + 172 + +AddComponent + AddComponent + Sigma + 0 + ? + +Sigma + + +long + n + + +long + f + + + 6/8/2003 - 11:44:4 + 6/8/2003 - 11:44:4 + 1.04 + ? + localhost/FactoryServer + Sigma from AddComponent + 418 + 21 + +? + ? + Compare + 3 + ? + +Compare + + +long + Add + +long + Sigma + +long + sigma + + +string + Result + + + +Compare + + + + + + + + + 6/8/2003 - 11:44:4 + 6/8/2003 - 11:44:4 + 1.04 + ? + ? + Compute Node + 419 + 184 + + +Add + f + Compare + Add + + +411 + 265 + +411 + 169 + +617 + 169 + +618 + 8 + +401 + 8 + +400 + 80 + +Sub + f + Add + b + + +189 + 108 + +191 + 220 + +Sub + f + sigma + n + + +206 + 254 + +206 + 220 + +Sub + f + Sigma + n + + +389 + 101 + +390 + 160 + +190 + 161 + +190 + 220 + +sigma + f + Compare + sigma + + +386 + 323 + +385 + 253 + +Sigma + f + Compare + Sigma + + +400 + 295 + +400 + 153 + +595 + 153 + +595 + 102 + + +GraphCpuUsed + Add\a + Add + a + +3 + 1 + + +GraphCpuUsed + Sub\a + Sub + a + +3 + 1000 + + +GraphCpuUsed + Sub\b + Sub + b + +3 + 1 + diff --git a/examples/GraphEmptyInLinesTypesCheck.py b/examples/GraphEmptyInLinesTypesCheck.py new file mode 100755 index 0000000..69cdae4 --- /dev/null +++ b/examples/GraphEmptyInLinesTypesCheck.py @@ -0,0 +1,176 @@ + +# Generated python file of Graph GraphEmptyInLinesConvertCheck + +from SuperV import * +# Graph creation +GraphEmptyInLinesConvertCheck = Graph( 'GraphEmptyInLinesConvertCheck' ) +GraphEmptyInLinesConvertCheck.SetName( 'GraphEmptyInLinesConvertCheck' ) +GraphEmptyInLinesConvertCheck.SetAuthor( 'JR' ) +GraphEmptyInLinesConvertCheck.SetComment( '' ) +GraphEmptyInLinesConvertCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +Addition = GraphEmptyInLinesConvertCheck.FNode( 'AddComponent' , 'AddComponent' , 'Addition' ) +Addition.SetName( 'Addition' ) +Addition.SetAuthor( '' ) +Addition.SetContainer( 'localhost/FactoryServer' ) +Addition.SetComment( 'Addition from AddComponent' ) +Addition.Coords( 232 , 514 ) + +# Creation of InLine Nodes +PyBoolCheck = [] +PyBoolCheck.append( ' ' ) +BoolCheck = GraphEmptyInLinesConvertCheck.INode( '' , PyBoolCheck ) +BoolCheck.InPort( 'InBool' , 'boolean' ) +BoolCheck.OutPort( 'OutBool' , 'boolean' ) +BoolCheck.SetName( 'BoolCheck' ) +BoolCheck.SetAuthor( '' ) +BoolCheck.SetComment( 'Empty InLine Node' ) +BoolCheck.Coords( 234 , 92 ) + +PyCharCheck = [] +PyCharCheck.append( ' ' ) +CharCheck = GraphEmptyInLinesConvertCheck.INode( '' , PyCharCheck ) +CharCheck.InPort( 'InChar' , 'char' ) +CharCheck.OutPort( 'OutChar' , 'char' ) +CharCheck.SetName( 'CharCheck' ) +CharCheck.SetAuthor( '' ) +CharCheck.SetComment( 'Empty InLine Node' ) +CharCheck.Coords( 30 , 142 ) + +PyShortCheck = [] +PyShortCheck.append( ' ' ) +ShortCheck = GraphEmptyInLinesConvertCheck.INode( '' , PyShortCheck ) +ShortCheck.InPort( 'InShort' , 'short' ) +ShortCheck.OutPort( 'OutShort' , 'short' ) +ShortCheck.SetName( 'ShortCheck' ) +ShortCheck.SetAuthor( '' ) +ShortCheck.SetComment( 'Empty InLine Node' ) +ShortCheck.Coords( 234 , 230 ) + +PyFloatCheck = [] +PyFloatCheck.append( ' ' ) +FloatCheck = GraphEmptyInLinesConvertCheck.INode( '' , PyFloatCheck ) +FloatCheck.InPort( 'InFloat' , 'float' ) +FloatCheck.OutPort( 'OutFloat' , 'float' ) +FloatCheck.SetName( 'FloatCheck' ) +FloatCheck.SetAuthor( '' ) +FloatCheck.SetComment( 'Empty InLine Node' ) +FloatCheck.Coords( 230 , 375 ) + +PyLongCheck = [] +PyLongCheck.append( ' ' ) +LongCheck = GraphEmptyInLinesConvertCheck.INode( '' , PyLongCheck ) +LongCheck.InPort( 'InLong' , 'long' ) +LongCheck.OutPort( 'OutLong' , 'long' ) +LongCheck.SetName( 'LongCheck' ) +LongCheck.SetAuthor( '' ) +LongCheck.SetComment( 'Empty InLine Node' ) +LongCheck.Coords( 30 , 282 ) + +PyStringCheck = [] +PyStringCheck.append( ' ' ) +StringCheck = GraphEmptyInLinesConvertCheck.INode( '' , PyStringCheck ) +StringCheck.InPort( 'InString' , 'string' ) +StringCheck.OutPort( 'OutString' , 'string' ) +StringCheck.SetName( 'StringCheck' ) +StringCheck.SetAuthor( '' ) +StringCheck.SetComment( 'Empty InLine Node' ) +StringCheck.Coords( 30 , 6 ) + +PyDoubleCheck = [] +PyDoubleCheck.append( ' ' ) +DoubleCheck = GraphEmptyInLinesConvertCheck.INode( '' , PyDoubleCheck ) +DoubleCheck.InPort( 'InDouble' , 'double' ) +DoubleCheck.OutPort( 'OutDouble' , 'double' ) +DoubleCheck.SetName( 'DoubleCheck' ) +DoubleCheck.SetAuthor( '' ) +DoubleCheck.SetComment( 'Empty InLine Node' ) +DoubleCheck.Coords( 29 , 428 ) + +PyMiscTypes = [] +PyMiscTypes.append( ' ' ) +MiscTypes = GraphEmptyInLinesConvertCheck.INode( '' , PyMiscTypes ) +MiscTypes.InPort( 'InString' , 'string' ) +MiscTypes.InPort( 'InBool' , 'boolean' ) +MiscTypes.InPort( 'InChar' , 'char' ) +MiscTypes.InPort( 'InShort' , 'short' ) +MiscTypes.InPort( 'InLong' , 'long' ) +MiscTypes.InPort( 'InFloat' , 'float' ) +MiscTypes.InPort( 'InDouble' , 'double' ) +MiscTypes.InPort( 'InObjRef' , 'SuperVision::Adder' ) +MiscTypes.OutPort( 'OutString' , 'string' ) +MiscTypes.OutPort( 'OutBool' , 'boolean' ) +MiscTypes.OutPort( 'OutChar' , 'char' ) +MiscTypes.OutPort( 'OutShort' , 'short' ) +MiscTypes.OutPort( 'OutLong' , 'long' ) +MiscTypes.OutPort( 'OutFloat' , 'float' ) +MiscTypes.OutPort( 'OutDouble' , 'double' ) +MiscTypes.OutPort( 'OutObjRef' , 'SuperVisionTest::Addre' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetComment( 'Empty InLine Node' ) +MiscTypes.Coords( 477 , 231 ) + +# Creation of Links +BoolCheckOutBool = BoolCheck.Port( 'OutBool' ) +MiscTypesInBool = GraphEmptyInLinesConvertCheck.Link( BoolCheckOutBool , MiscTypes.Port( 'InBool' ) ) +MiscTypesInBool.AddCoord( 1 , 446 , 341 ) +MiscTypesInBool.AddCoord( 2 , 446 , 172 ) + +CharCheckOutChar = CharCheck.Port( 'OutChar' ) +MiscTypesInChar = GraphEmptyInLinesConvertCheck.Link( CharCheckOutChar , MiscTypes.Port( 'InChar' ) ) +MiscTypesInChar.AddCoord( 1 , 431 , 368 ) +MiscTypesInChar.AddCoord( 2 , 431 , 223 ) + +ShortCheckOutShort = ShortCheck.Port( 'OutShort' ) +MiscTypesInShort = GraphEmptyInLinesConvertCheck.Link( ShortCheckOutShort , MiscTypes.Port( 'InShort' ) ) +MiscTypesInShort.AddCoord( 1 , 415 , 397 ) +MiscTypesInShort.AddCoord( 2 , 414 , 310 ) + +FloatCheckOutFloat = FloatCheck.Port( 'OutFloat' ) +MiscTypesInFloat = GraphEmptyInLinesConvertCheck.Link( FloatCheckOutFloat , MiscTypes.Port( 'InFloat' ) ) + +AdditionAdder = Addition.Port( 'Adder' ) +MiscTypesInObjRef = GraphEmptyInLinesConvertCheck.Link( AdditionAdder , MiscTypes.Port( 'InObjRef' ) ) +MiscTypesInObjRef.AddCoord( 1 , 462 , 514 ) +MiscTypesInObjRef.AddCoord( 2 , 461 , 593 ) + +LongCheckOutLong = LongCheck.Port( 'OutLong' ) +MiscTypesInLong = GraphEmptyInLinesConvertCheck.Link( LongCheckOutLong , MiscTypes.Port( 'InLong' ) ) +MiscTypesInLong.AddCoord( 1 , 406 , 426 ) +MiscTypesInLong.AddCoord( 2 , 405 , 363 ) + +StringCheckOutString = StringCheck.Port( 'OutString' ) +MiscTypesInString = GraphEmptyInLinesConvertCheck.Link( StringCheckOutString , MiscTypes.Port( 'InString' ) ) +MiscTypesInString.AddCoord( 1 , 462 , 312 ) +MiscTypesInString.AddCoord( 2 , 461 , 87 ) + +DoubleCheckOutDouble = DoubleCheck.Port( 'OutDouble' ) +MiscTypesInDouble = GraphEmptyInLinesConvertCheck.Link( DoubleCheckOutDouble , MiscTypes.Port( 'InDouble' ) ) +MiscTypesInDouble.AddCoord( 1 , 445 , 485 ) +MiscTypesInDouble.AddCoord( 2 , 445 , 508 ) + +# Creation of Input datas +BoolCheckInBool = BoolCheck.Input( 'InBool' , 1) +CharCheckInChar = CharCheck.Input( 'InChar' , 255) +ShortCheckInShort = ShortCheck.Input( 'InShort' , 16383) +FloatCheckInFloat = FloatCheck.Input( 'InFloat' , 3.14159) +LongCheckInLong = LongCheck.Input( 'InLong' , 1234567890) +StringCheckInString = StringCheck.Input( 'InString' , 'aString') +DoubleCheckInDouble = DoubleCheck.Input( 'InDouble' , 1.23457) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphEmptyInLinesConvertCheck.Run() +GraphEmptyInLinesConvertCheck.DoneW() +GraphEmptyInLinesConvertCheck.PrintPorts() diff --git a/examples/GraphEmptyInLinesTypesCheck.xml b/examples/GraphEmptyInLinesTypesCheck.xml new file mode 100755 index 0000000..4c011af --- /dev/null +++ b/examples/GraphEmptyInLinesTypesCheck.xml @@ -0,0 +1,521 @@ + + + + +? + ? + GraphEmptyInLinesConvertCheck + 1 + ? + +GraphInLinesConvertCheck + + +boolean + BoolCheck\InBool + +char + CharCheck\InChar + +short + ShortCheck\InShort + +float + FloatCheck\InFloat + +long + LongCheck\InLong + +string + StringCheck\InString + +double + DoubleCheck\InDouble + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Addre + MiscTypes\OutObjRef + + + 1/9/2003 - 17:28:48 + 11/9/2003 - 14:24:29 + 1.04 + JR + ? + ? + 0 + 0 + + +? + ? + BoolCheck + 3 + ? + +BoolCheck + + +boolean + InBool + + +boolean + OutBool + + + +? + + 11/9/2003 - 14:21:42 + 11/9/2003 - 14:21:42 + 1.04 + ? + ? + Empty InLine Node + 234 + 92 + +? + ? + CharCheck + 3 + ? + +CharCheck + + +char + InChar + + +char + OutChar + + + +? + + 11/9/2003 - 14:21:42 + 11/9/2003 - 14:21:42 + 1.04 + ? + ? + Empty InLine Node + 30 + 142 + +? + ? + ShortCheck + 3 + ? + +ShortCheck + + +short + InShort + + +short + OutShort + + + +? + + 11/9/2003 - 14:21:42 + 11/9/2003 - 14:21:42 + 1.04 + ? + ? + Empty InLine Node + 234 + 230 + +? + ? + FloatCheck + 3 + ? + +FloatCheck + + +float + InFloat + + +float + OutFloat + + + +? + + 11/9/2003 - 14:21:42 + 11/9/2003 - 14:21:42 + 1.04 + ? + ? + Empty InLine Node + 230 + 375 + +AddComponent + AddComponent + Addition + 0 + ? + +Addition + + + +objref + Adder + + + 11/9/2003 - 14:21:42 + 11/9/2003 - 14:21:42 + 1.05 + ? + localhost/FactoryServer + Addition from AddComponent + 232 + 514 + +? + ? + LongCheck + 3 + ? + +LongCheck + + +long + InLong + + +long + OutLong + + + +? + + 11/9/2003 - 14:21:42 + 11/9/2003 - 14:21:42 + 1.05 + ? + ? + Empty InLine Node + 30 + 282 + +? + ? + StringCheck + 3 + ? + +StringCheck + + +string + InString + + +string + OutString + + + +? + + 11/9/2003 - 14:21:42 + 11/9/2003 - 14:21:42 + 1.05 + ? + ? + Empty InLine Node + 30 + 6 + +? + ? + DoubleCheck + 3 + ? + +DoubleCheck + + +double + InDouble + + +double + OutDouble + + + +? + + 11/9/2003 - 14:21:42 + 11/9/2003 - 14:21:42 + 1.05 + ? + ? + Empty InLine Node + 29 + 428 + +? + ? + MiscTypes + 3 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVision::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Addre + OutObjRef + + + +? + + 11/9/2003 - 14:21:42 + 11/9/2003 - 14:21:42 + 1.05 + ? + ? + Empty InLine Node + 477 + 231 + + +BoolCheck + OutBool + MiscTypes + InBool + + +446 + 341 + +446 + 172 + +CharCheck + OutChar + MiscTypes + InChar + + +431 + 368 + +431 + 223 + +ShortCheck + OutShort + MiscTypes + InShort + + +415 + 397 + +414 + 310 + +FloatCheck + OutFloat + MiscTypes + InFloat + + +Addition + Adder + MiscTypes + InObjRef + + +462 + 514 + +461 + 593 + +LongCheck + OutLong + MiscTypes + InLong + + +406 + 426 + +405 + 363 + +StringCheck + OutString + MiscTypes + InString + + +462 + 312 + +461 + 87 + +DoubleCheck + OutDouble + MiscTypes + InDouble + + +445 + 485 + +445 + 508 + + +GraphEmptyInLinesConvertCheck + BoolCheck\InBool + BoolCheck + InBool + +3 + 1 + + +GraphEmptyInLinesConvertCheck + CharCheck\InChar + CharCheck + InChar + +3 + 255 + + +GraphEmptyInLinesConvertCheck + ShortCheck\InShort + ShortCheck + InShort + +3 + 16383 + + +GraphEmptyInLinesConvertCheck + FloatCheck\InFloat + FloatCheck + InFloat + +7 + 3.14159 + + +GraphEmptyInLinesConvertCheck + LongCheck\InLong + LongCheck + InLong + +3 + 1234567890 + + +GraphEmptyInLinesConvertCheck + StringCheck\InString + StringCheck + InString + +18 + aString + + +GraphEmptyInLinesConvertCheck + DoubleCheck\InDouble + DoubleCheck + InDouble + +7 + 1.23457 + diff --git a/examples/GraphEssai.py b/examples/GraphEssai.py index a60f0e3..2fec085 100644 --- a/examples/GraphEssai.py +++ b/examples/GraphEssai.py @@ -4,49 +4,66 @@ from SuperV import * # Graph creation GraphEssai = Graph( 'GraphEssai' ) +GraphEssai.SetName( 'GraphEssai' ) GraphEssai.SetAuthor( '' ) GraphEssai.SetComment( '' ) GraphEssai.Coords( 0 , 0 ) -# Creation of Nodes -Add = GraphEssai.Node( 'AddComponent' , 'AddComponent' , 'Add' ) +# Creation of Factory Nodes + +Add = GraphEssai.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) +Add.SetName( 'Add' ) Add.SetAuthor( '' ) Add.SetContainer( 'FactoryServer' ) -Add.SetComment( '' ) +Add.SetComment( 'Add from AddComponent' ) Add.Coords( 15 , 241 ) -Sub = GraphEssai.Node( 'SubComponent' , 'SubComponent' , 'Sub' ) + +Sub = GraphEssai.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) +Sub.SetName( 'Sub' ) Sub.SetAuthor( '' ) Sub.SetContainer( 'FactoryServer' ) -Sub.SetComment( '' ) -Sub.Coords( 227 , 99 ) -Mul = GraphEssai.Node( 'MulComponent' , 'MulComponent' , 'Mul' ) +Sub.SetComment( 'Sub from SubComponent' ) +Sub.Coords( 227 , 96 ) + +Mul = GraphEssai.FNode( 'MulComponent' , 'MulComponent' , 'Mul' ) +Mul.SetName( 'Mul' ) Mul.SetAuthor( '' ) Mul.SetContainer( 'FactoryServer' ) -Mul.SetComment( '' ) -Mul.Coords( 443 , 278 ) -Div = GraphEssai.Node( 'DivComponent' , 'DivComponent' , 'Div' ) +Mul.SetComment( 'Mul from MulComponent' ) +Mul.Coords( 435 , 242 ) + +Div = GraphEssai.FNode( 'DivComponent' , 'DivComponent' , 'Div' ) +Div.SetName( 'Div' ) Div.SetAuthor( '' ) Div.SetContainer( 'FactoryServer' ) -Div.SetComment( '' ) +Div.SetComment( 'Div from DivComponent' ) Div.Coords( 634 , 97 ) -# Creation of intermediate Output variables and of links +# Creation of Links Addz = Add.Port( 'z' ) -Suby = GraphEssai.Link( Addz , Sub.Port( 'y' ) ) Muly = GraphEssai.Link( Addz , Mul.Port( 'y' ) ) + +Suby = GraphEssai.Link( Addz , Sub.Port( 'y' ) ) +Suby.AddCoord( 1 , 197 , 204 ) +Suby.AddCoord( 2 , 198 , 351 ) + Subz = Sub.Port( 'z' ) -Mulx = GraphEssai.Link( Subz , Mul.Port( 'x' ) ) Divx = GraphEssai.Link( Subz , Div.Port( 'x' ) ) + +Mulx = GraphEssai.Link( Subz , Mul.Port( 'x' ) ) +Mulx.AddCoord( 1 , 411 , 323 ) +Mulx.AddCoord( 2 , 411 , 177 ) + Mulz = Mul.Port( 'z' ) Divy = GraphEssai.Link( Mulz , Div.Port( 'y' ) ) +Divy.AddCoord( 1 , 612 , 207 ) +Divy.AddCoord( 2 , 612 , 322 ) # Creation of Input datas Addx = Add.Input( 'x' , 3) Addy = Add.Input( 'y' , 4.5) Subx = Sub.Input( 'x' , 1.5) -# Missing Input datas - # Creation of Output variables AddFuncValue = Add.Port( 'FuncValue' ) Divz = Div.Port( 'z' ) diff --git a/examples/GraphEssai1.py b/examples/GraphEssai1.py index 4792e22..211679c 100755 --- a/examples/GraphEssai1.py +++ b/examples/GraphEssai1.py @@ -9,40 +9,53 @@ GraphEssai1.SetAuthor( '' ) GraphEssai1.SetComment( '' ) GraphEssai1.Coords( 0 , 0 ) -# Creation of Computing Nodes -Add = GraphEssai1.Node( 'AddComponent' , 'AddComponent' , 'Add' ) +# Creation of Factory Nodes + +Add = GraphEssai1.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) Add.SetName( 'Add' ) Add.SetAuthor( '' ) Add.SetContainer( 'localhost/FactoryServer' ) -Add.SetComment( '' ) -Add.Coords( 0 , 214 ) -Sub = GraphEssai1.Node( 'SubComponent' , 'SubComponent' , 'Sub' ) +Add.SetComment( 'Add from AddComponent' ) +Add.Coords( 16 , 262 ) + +Sub = GraphEssai1.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) Sub.SetName( 'Sub' ) Sub.SetAuthor( '' ) Sub.SetContainer( 'localhost/FactoryServer' ) -Sub.SetComment( '' ) -Sub.Coords( 192 , 51 ) -Mul = GraphEssai1.Node( 'MulComponent' , 'MulComponent' , 'Mul' ) +Sub.SetComment( 'Sub from SubComponent' ) +Sub.Coords( 219 , 54 ) + +Mul = GraphEssai1.FNode( 'MulComponent' , 'MulComponent' , 'Mul' ) Mul.SetName( 'Mul' ) Mul.SetAuthor( '' ) Mul.SetContainer( 'localhost/FactoryServer' ) -Mul.SetComment( '' ) -Mul.Coords( 420 , 265 ) -Div = GraphEssai1.Node( 'DivComponent' , 'DivComponent' , 'Div' ) +Mul.SetComment( 'Mul from MulComponent' ) +Mul.Coords( 419 , 262 ) + +Div = GraphEssai1.FNode( 'DivComponent' , 'DivComponent' , 'Div' ) Div.SetName( 'Div' ) Div.SetAuthor( '' ) Div.SetContainer( 'localhost/FactoryServer' ) -Div.SetComment( '' ) -Div.Coords( 623 , 141 ) +Div.SetComment( 'Div from DivComponent' ) +Div.Coords( 623 , 55 ) -# Creation of intermediate Output variables and of Computing Links +# Creation of Links Addz = Add.Port( 'z' ) Subx = GraphEssai1.Link( Addz , Sub.Port( 'x' ) ) +Subx.AddCoord( 1 , 193 , 135 ) +Subx.AddCoord( 2 , 193 , 372 ) + Subz = Sub.Port( 'z' ) -Mulx = GraphEssai1.Link( Subz , Mul.Port( 'x' ) ) Divx = GraphEssai1.Link( Subz , Div.Port( 'x' ) ) + +Mulx = GraphEssai1.Link( Subz , Mul.Port( 'x' ) ) +Mulx.AddCoord( 1 , 396 , 343 ) +Mulx.AddCoord( 2 , 397 , 136 ) + Mulz = Mul.Port( 'z' ) Divy = GraphEssai1.Link( Mulz , Div.Port( 'y' ) ) +Divy.AddCoord( 1 , 598 , 163 ) +Divy.AddCoord( 2 , 598 , 343 ) # Creation of Input datas Addx = Add.Input( 'x' , 3) diff --git a/examples/GraphEssai1.xml b/examples/GraphEssai1.xml index 6087d09..9b388e6 100644 --- a/examples/GraphEssai1.xml +++ b/examples/GraphEssai1.xml @@ -1,305 +1,241 @@ - - - - - + - - - ? - ? - GraphEssai1 - 1 - ? - - GraphEssai1 - - - double - Add\x - - - double - Add\y - - - double - Sub\y - - - double - Mul\y - - - - - double - Add\FuncValue - - - double - Div\z - - - - - - - - 11/3/2003 - 10:3:19 - 11/3/2003 - 10:3:19 - 1.04 - ? - ? - ? - 0 - 0 - - - - - - AddComponent - AddComponent - Add - 0 - ? - - Add - - - double - x - - - double - y - - - - - double - FuncValue - - - double - z - - - - - - - - 11/3/2003 - 10:3:19 - 11/3/2003 - 10:3:19 - 1.04 - ? - localhost/FactoryServer - ? - 0 - 214 - - - SubComponent - SubComponent - Sub - 0 - ? - - Sub - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 10:3:19 - 11/3/2003 - 10:3:19 - 1.04 - ? - localhost/FactoryServer - ? - 192 - 51 - - - MulComponent - MulComponent - Mul - 0 - ? - - Mul - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 10:3:19 - 11/3/2003 - 10:3:19 - 1.04 - ? - localhost/FactoryServer - ? - 420 - 265 - - - DivComponent - DivComponent - Div - 0 - ? - - Div - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 10:3:19 - 11/3/2003 - 10:3:19 - 1.04 - ? - localhost/FactoryServer - ? - 623 - 141 - - - - - - Add - z - Sub - x - - - - - Sub - z - Mul - x - - - - - Sub - z - Div - x - - - - - Mul - z - Div - y - - - - - - - - GraphEssai1 - Add\x - Add - x - - 3 - 3 - - - - - - GraphEssai1 - Add\y - Add - y - - 3 - 5 - - - - - - GraphEssai1 - Sub\y - Sub - y - - 3 - 7 - - - - - - GraphEssai1 - Mul\y - Mul - y - - 3 - 11 - - - - - - - + + +? + ? + GraphEssai1 + 1 + ? + +GraphEssai1 + + +double + Add\x + +double + Add\y + +double + Sub\y + +double + Mul\y + + +double + Add\FuncValue + +double + Div\z + + + 11/3/2003 - 10:3:19 + 18/9/2003 - 17:14:2 + 1.04 + ? + ? + ? + 0 + 0 + + +AddComponent + AddComponent + Add + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 18/9/2003 - 17:14:2 + 18/9/2003 - 17:14:2 + 1.04 + ? + localhost/FactoryServer + Add from AddComponent + 16 + 262 + +SubComponent + SubComponent + Sub + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 18/9/2003 - 17:14:2 + 18/9/2003 - 17:14:2 + 1.04 + ? + localhost/FactoryServer + Sub from SubComponent + 219 + 54 + +MulComponent + MulComponent + Mul + 0 + ? + +Mul + + +double + x + +double + y + + +double + z + + + 18/9/2003 - 17:14:2 + 18/9/2003 - 17:14:2 + 1.04 + ? + localhost/FactoryServer + Mul from MulComponent + 419 + 262 + +DivComponent + DivComponent + Div + 0 + ? + +Div + + +double + x + +double + y + + +double + z + + + 18/9/2003 - 17:14:2 + 18/9/2003 - 17:14:2 + 1.04 + ? + localhost/FactoryServer + Div from DivComponent + 623 + 55 + + +Add + z + Sub + x + + +193 + 135 + +193 + 372 + +Sub + z + Div + x + + +Sub + z + Mul + x + + +396 + 343 + +397 + 136 + +Mul + z + Div + y + + +598 + 163 + +598 + 343 + + +GraphEssai1 + Add\x + Add + x + +7 + 3 + + +GraphEssai1 + Add\y + Add + y + +7 + 5 + + +GraphEssai1 + Sub\y + Sub + y + +7 + 7 + + +GraphEssai1 + Mul\y + Mul + y + +7 + 11 + diff --git a/examples/GraphEssai2.py b/examples/GraphEssai2.py index aee58ba..a1489b3 100755 --- a/examples/GraphEssai2.py +++ b/examples/GraphEssai2.py @@ -9,43 +9,57 @@ GraphEssai2.SetAuthor( '' ) GraphEssai2.SetComment( '' ) GraphEssai2.Coords( 0 , 0 ) -# Creation of Computing Nodes -Add = GraphEssai2.Node( 'AddComponent' , 'AddComponent' , 'Add' ) +# Creation of Factory Nodes + +Add = GraphEssai2.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) Add.SetName( 'Add' ) Add.SetAuthor( '' ) Add.SetContainer( 'localhost/FactoryServer' ) -Add.SetComment( '' ) -Add.Coords( 49 , 182 ) -Sub = GraphEssai2.Node( 'SubComponent' , 'SubComponent' , 'Sub' ) +Add.SetComment( 'Add from AddComponent' ) +Add.Coords( 18 , 239 ) + +Sub = GraphEssai2.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) Sub.SetName( 'Sub' ) Sub.SetAuthor( '' ) Sub.SetContainer( 'localhost/FactoryServer' ) -Sub.SetComment( '' ) -Sub.Coords( 300 , 270 ) -Mul = GraphEssai2.Node( 'MulComponent' , 'MulComponent' , 'Mul' ) +Sub.SetComment( 'Sub from SubComponent' ) +Sub.Coords( 232 , 269 ) + +Mul = GraphEssai2.FNode( 'MulComponent' , 'MulComponent' , 'Mul' ) Mul.SetName( 'Mul' ) Mul.SetAuthor( '' ) Mul.SetContainer( 'localhost/FactoryServer' ) -Mul.SetComment( '' ) -Mul.Coords( 306 , 28 ) -Div = GraphEssai2.Node( 'DivComponent' , 'DivComponent' , 'Div' ) +Mul.SetComment( 'Mul from MulComponent' ) +Mul.Coords( 431 , 22 ) + +Div = GraphEssai2.FNode( 'DivComponent' , 'DivComponent' , 'Div' ) Div.SetName( 'Div' ) Div.SetAuthor( '' ) Div.SetContainer( 'localhost/FactoryServer' ) -Div.SetComment( '' ) -Div.Coords( 603 , 156 ) +Div.SetComment( 'Div from DivComponent' ) +Div.Coords( 645 , 268 ) -# Creation of intermediate Output variables and of Computing Links +# Creation of Links AddFuncValue = Add.Port( 'FuncValue' ) Mulx = GraphEssai2.Link( AddFuncValue , Mul.Port( 'x' ) ) +Mulx.AddCoord( 1 , 199 , 102 ) +Mulx.AddCoord( 2 , 198 , 319 ) + Addz = Add.Port( 'z' ) Subx = GraphEssai2.Link( Addz , Sub.Port( 'x' ) ) -SubOutGate = Sub.Port( 'OutGate' ) -MulInGate = GraphEssai2.Link( SubOutGate , Mul.Port( 'InGate' ) ) + Subz = Sub.Port( 'z' ) Divx = GraphEssai2.Link( Subz , Div.Port( 'x' ) ) + +SubOutGate = Sub.Port( 'OutGate' ) +MulInGate = GraphEssai2.Link( SubOutGate , Mul.Port( 'InGate' ) ) +MulInGate.AddCoord( 1 , 405 , 165 ) +MulInGate.AddCoord( 2 , 405 , 412 ) + Mulz = Mul.Port( 'z' ) Divy = GraphEssai2.Link( Mulz , Div.Port( 'y' ) ) +Divy.AddCoord( 1 , 612 , 377 ) +Divy.AddCoord( 2 , 612 , 103 ) # Creation of Input datas Addx = Add.Input( 'x' , 1) diff --git a/examples/GraphEssai2.xml b/examples/GraphEssai2.xml index dee1886..3c2f19e 100644 --- a/examples/GraphEssai2.xml +++ b/examples/GraphEssai2.xml @@ -1,309 +1,244 @@ - - - - - + - - - ? - ? - GraphEssai2 - 1 - ? - - GraphEssai2 - - - double - Add\x - - - double - Add\y - - - double - Sub\y - - - double - Mul\y - - - - - double - Div\z - - - - - - - - 11/3/2003 - 10:6:28 - 11/3/2003 - 10:6:29 - 1.04 - ? - ? - ? - 0 - 0 - - - - - - AddComponent - AddComponent - Add - 0 - ? - - Add - - - double - x - - - double - y - - - - - double - FuncValue - - - double - z - - - - - - - - 11/3/2003 - 10:6:28 - 11/3/2003 - 10:6:28 - 1.04 - ? - localhost/FactoryServer - ? - 49 - 182 - - - SubComponent - SubComponent - Sub - 0 - ? - - Sub - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 10:6:28 - 11/3/2003 - 10:6:28 - 1.04 - ? - localhost/FactoryServer - ? - 300 - 270 - - - MulComponent - MulComponent - Mul - 0 - ? - - Mul - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 10:6:29 - 11/3/2003 - 10:6:29 - 1.04 - ? - localhost/FactoryServer - ? - 306 - 28 - - - DivComponent - DivComponent - Div - 0 - ? - - Div - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 10:6:29 - 11/3/2003 - 10:6:29 - 1.04 - ? - localhost/FactoryServer - ? - 603 - 156 - - - - - - Add - FuncValue - Mul - x - - - - - Add - z - Sub - x - - - - - Sub - OutGate - Mul - InGate - - - - - Sub - z - Div - x - - - - - Mul - z - Div - y - - - - - - - - GraphEssai2 - Add\x - Add - x - - 3 - 1 - - - - - - GraphEssai2 - Add\y - Add - y - - 3 - 2 - - - - - - GraphEssai2 - Sub\y - Sub - y - - 3 - 3 - - - - - - GraphEssai2 - Mul\y - Mul - y - - 3 - 4 - - - - - - - + + +? + ? + GraphEssai2 + 1 + ? + +GraphEssai2 + + +double + Add\x + +double + Add\y + +double + Sub\y + +double + Mul\y + + +double + Div\z + + + 11/3/2003 - 10:6:28 + 23/10/2003 - 16:11:44 + 1.04 + ? + ? + ? + 0 + 0 + + +AddComponent + AddComponent + Add + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 23/10/2003 - 16:11:44 + 23/10/2003 - 16:11:44 + 1.04 + ? + localhost/FactoryServer + Add from AddComponent + 18 + 239 + +SubComponent + SubComponent + Sub + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 23/10/2003 - 16:11:44 + 23/10/2003 - 16:11:44 + 1.04 + ? + localhost/FactoryServer + Sub from SubComponent + 232 + 269 + +MulComponent + MulComponent + Mul + 0 + ? + +Mul + + +double + x + +double + y + + +double + z + + + 23/10/2003 - 16:11:44 + 23/10/2003 - 16:11:44 + 1.04 + ? + localhost/FactoryServer + Mul from MulComponent + 431 + 22 + +DivComponent + DivComponent + Div + 0 + ? + +Div + + +double + x + +double + y + + +double + z + + + 23/10/2003 - 16:11:44 + 23/10/2003 - 16:11:44 + 1.04 + ? + localhost/FactoryServer + Div from DivComponent + 645 + 268 + + +Add + FuncValue + Mul + x + + +199 + 102 + +198 + 319 + +Add + z + Sub + x + + +Sub + z + Div + x + + +Sub + OutGate + Mul + InGate + + +405 + 165 + +405 + 412 + +Mul + z + Div + y + + +612 + 377 + +612 + 103 + + +GraphEssai2 + Add\x + Add + x + +7 + 1 + + +GraphEssai2 + Add\y + Add + y + +7 + 2 + + +GraphEssai2 + Sub\y + Sub + y + +7 + 3 + + +GraphEssai2 + Mul\y + Mul + y + +7 + 4 + diff --git a/examples/GraphEssai3.py b/examples/GraphEssai3.py index 94341dd..945840e 100644 --- a/examples/GraphEssai3.py +++ b/examples/GraphEssai3.py @@ -9,64 +9,98 @@ GraphEssai3.SetAuthor( '' ) GraphEssai3.SetComment( '' ) GraphEssai3.Coords( 0 , 0 ) -# Creation of Computing Nodes -Add = GraphEssai3.Node( 'AddComponent' , 'AddComponent' , 'Add' ) +# Creation of Factory Nodes + +Add = GraphEssai3.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) Add.SetName( 'Add' ) Add.SetAuthor( '' ) Add.SetContainer( 'localhost/FactoryServer' ) -Add.SetComment( '' ) +Add.SetComment( 'Add from AddComponent' ) Add.Coords( 1 , 152 ) -Sub = GraphEssai3.Node( 'SubComponent' , 'SubComponent' , 'Sub' ) + +Sub = GraphEssai3.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) Sub.SetName( 'Sub' ) Sub.SetAuthor( '' ) Sub.SetContainer( 'localhost/FactoryServer' ) -Sub.SetComment( '' ) -Sub.Coords( 410 , 84 ) -Mul = GraphEssai3.Node( 'MulComponent' , 'MulComponent' , 'Mul' ) +Sub.SetComment( 'Sub from SubComponent' ) +Sub.Coords( 412 , 377 ) + +Mul = GraphEssai3.FNode( 'MulComponent' , 'MulComponent' , 'Mul' ) Mul.SetName( 'Mul' ) Mul.SetAuthor( '' ) Mul.SetContainer( 'localhost/FactoryServer' ) -Mul.SetComment( '' ) -Mul.Coords( 410 , 279 ) -Div = GraphEssai3.Node( 'DivComponent' , 'DivComponent' , 'Div' ) +Mul.SetComment( 'Mul from MulComponent' ) +Mul.Coords( 412 , 152 ) + +Div = GraphEssai3.FNode( 'DivComponent' , 'DivComponent' , 'Div' ) Div.SetName( 'Div' ) Div.SetAuthor( '' ) Div.SetContainer( 'localhost/FactoryServer' ) -Div.SetComment( '' ) -Div.Coords( 618 , 140 ) -Addition = GraphEssai3.Node( 'AddComponent' , 'AddComponent' , 'Addition' ) +Div.SetComment( 'Div from DivComponent' ) +Div.Coords( 622 , 124 ) + +Addition = GraphEssai3.FNode( 'AddComponent' , 'AddComponent' , 'Addition' ) Addition.SetName( 'Addition' ) Addition.SetAuthor( '' ) Addition.SetContainer( 'localhost/AdditionServer' ) -Addition.SetComment( '' ) +Addition.SetComment( 'Addition from AddComponent' ) Addition.Coords( 0 , 0 ) -Addition_1 = GraphEssai3.Node( 'AddComponent' , 'AddComponent' , 'Addition' ) + +Addition_1 = GraphEssai3.FNode( 'AddComponent' , 'AddComponent' , 'Addition' ) Addition_1.SetName( 'Addition_1' ) Addition_1.SetAuthor( '' ) Addition_1.SetContainer( 'localhost/Addition_1Server' ) -Addition_1.SetComment( '' ) +Addition_1.SetComment( 'Addition from AddComponent' ) Addition_1.Coords( 4 , 327 ) -AddAndCompare = GraphEssai3.CNode( 'AddComponent' , 'Adder' , 'AddAndCompare' ) + +# Creation of Computing Nodes +AddAndCompare_ServiceinParameter = [] +AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'Adder' , 'Adder' ) ) +AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'x' ) ) +AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'y' ) ) +AddAndCompare_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'Adder' , 'anOtherAdder' ) ) +AddAndCompare_ServiceoutParameter = [] +AddAndCompare_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'FuncValue' ) ) +AddAndCompare_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'z' ) ) +AddAndCompare_Service = SALOME_ModuleCatalog.Service( 'AddAndCompare' , AddAndCompare_ServiceinParameter , AddAndCompare_ServiceoutParameter , 0 ) +AddAndCompare = GraphEssai3.CNode( AddAndCompare_Service ) AddAndCompare.SetName( 'AddAndCompare' ) AddAndCompare.SetAuthor( '' ) -AddAndCompare.SetComment( '' ) +AddAndCompare.SetComment( 'Python function' ) AddAndCompare.Coords( 233 , 0 ) -# Creation of intermediate Output variables and of Computing Links +# Creation of Links AddFuncValue = Add.Port( 'FuncValue' ) Mulx = GraphEssai3.Link( AddFuncValue , Mul.Port( 'x' ) ) + AddAndComparex = GraphEssai3.Link( AddFuncValue , AddAndCompare.Port( 'x' ) ) +AddAndComparex.AddCoord( 1 , 195 , 108 ) +AddAndComparex.AddCoord( 2 , 195 , 233 ) + Addz = Add.Port( 'z' ) Subx = GraphEssai3.Link( Addz , Sub.Port( 'x' ) ) +Subx.AddCoord( 1 , 187 , 459 ) +Subx.AddCoord( 2 , 186 , 262 ) + AddAndComparey = GraphEssai3.Link( Addz , AddAndCompare.Port( 'y' ) ) +AddAndComparey.AddCoord( 1 , 187 , 139 ) +AddAndComparey.AddCoord( 2 , 186 , 261 ) + Subz = Sub.Port( 'z' ) Divx = GraphEssai3.Link( Subz , Div.Port( 'x' ) ) +Divx.AddCoord( 1 , 598 , 203 ) +Divx.AddCoord( 2 , 598 , 457 ) + Mulz = Mul.Port( 'z' ) Divy = GraphEssai3.Link( Mulz , Div.Port( 'y' ) ) + AdditionAdder = Addition.Port( 'Adder' ) AddAndCompareAdder = GraphEssai3.Link( AdditionAdder , AddAndCompare.Port( 'Adder' ) ) + Addition_1Adder = Addition_1.Port( 'Adder' ) AddAndCompareanOtherAdder = GraphEssai3.Link( Addition_1Adder , AddAndCompare.Port( 'anOtherAdder' ) ) +AddAndCompareanOtherAdder.AddCoord( 1 , 215 , 168 ) +AddAndCompareanOtherAdder.AddCoord( 2 , 214 , 407 ) # Creation of Input datas Addx = Add.Input( 'x' , 1) diff --git a/examples/GraphEssai3.xml b/examples/GraphEssai3.xml index 91a4893..606959a 100644 --- a/examples/GraphEssai3.xml +++ b/examples/GraphEssai3.xml @@ -1,451 +1,364 @@ - - - - - + - - - ? - ? - GraphEssai3 - 1 - ? - - GraphEssai3 - - - double - Add\x - - - double - Add\y - - - double - Sub\y - - - double - Mul\y - - - - - double - Div\z - - - double - AddAndCompare\FuncValue - - - double - AddAndCompare\z - - - - - - - - 11/3/2003 - 10:59:37 - 11/3/2003 - 10:59:37 - 1.04 - ? - ? - ? - 0 - 0 - - - - - - AddComponent - AddComponent - Add - 0 - ? - - Add - - - double - x - - - double - y - - - - - double - FuncValue - - - double - z - - - - - - - - 11/3/2003 - 10:59:37 - 11/3/2003 - 10:59:37 - 1.04 - ? - localhost/FactoryServer - ? - 1 - 152 - - - SubComponent - SubComponent - Sub - 0 - ? - - Sub - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 10:59:37 - 11/3/2003 - 10:59:37 - 1.04 - ? - localhost/FactoryServer - ? - 410 - 84 - - - MulComponent - MulComponent - Mul - 0 - ? - - Mul - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 10:59:37 - 11/3/2003 - 10:59:37 - 1.04 - ? - localhost/FactoryServer - ? - 410 - 279 - - - DivComponent - DivComponent - Div - 0 - ? - - Div - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 10:59:37 - 11/3/2003 - 10:59:37 - 1.04 - ? - localhost/FactoryServer - ? - 618 - 140 - - - AddComponent - AddComponent - Addition - 0 - ? - - Addition - - - - - Adder - Adder - - - - - - - - 11/3/2003 - 10:59:37 - 11/3/2003 - 10:59:37 - 1.04 - ? - localhost/AdditionServer - ? - 0 - 0 - - - AddComponent - AddComponent - Addition_1 - 0 - ? - - Addition - - - - - Adder - Adder - - - - - - - - 11/3/2003 - 10:59:37 - 11/3/2003 - 10:59:37 - 1.04 - ? - localhost/Addition_1Server - ? - 4 - 327 - - - ? - ? - AddAndCompare - 2 - ? - - AddAndCompare - - - Adder - Adder - - - double - x - - - double - y - - - Adder - anOtherAdder - - - - - double - FuncValue - - - double - z - - - - - - - - 11/3/2003 - 10:59:37 - 11/3/2003 - 10:59:37 - 1.04 - ? - ? - ? - 233 - 0 - - - - - - Add - FuncValue - Mul - x - - - - - Add - FuncValue - AddAndCompare - x - - - - - Add - z - Sub - x - - - - - Add - z - AddAndCompare - y - - - - - Sub - z - Div - x - - - - - Mul - z - Div - y - - - - - Addition - Adder - AddAndCompare - Adder - - - - - Addition_1 - Adder - AddAndCompare - anOtherAdder - - - - - - - - GraphEssai3 - Add\x - Add - x - - 3 - 1 - - - - - - GraphEssai3 - Add\y - Add - y - - 3 - 2 - - - - - - GraphEssai3 - Sub\y - Sub - y - - 3 - 3 - - - - - - GraphEssai3 - Mul\y - Mul - y - - 3 - 4 - - - - - - - + + +? + ? + GraphEssai3 + 1 + ? + +GraphEssai3 + + +double + Add\x + +double + Add\y + +double + Sub\y + +double + Mul\y + + +double + Div\z + +double + AddAndCompare\FuncValue + +double + AddAndCompare\z + + + 11/3/2003 - 10:59:37 + 18/9/2003 - 17:23:8 + 1.04 + ? + ? + ? + 0 + 0 + + +AddComponent + AddComponent + Add + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 18/9/2003 - 17:23:8 + 18/9/2003 - 17:23:8 + 1.04 + ? + localhost/FactoryServer + Add from AddComponent + 1 + 152 + +SubComponent + SubComponent + Sub + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 18/9/2003 - 17:23:8 + 18/9/2003 - 17:23:8 + 1.04 + ? + localhost/FactoryServer + Sub from SubComponent + 412 + 377 + +MulComponent + MulComponent + Mul + 0 + ? + +Mul + + +double + x + +double + y + + +double + z + + + 18/9/2003 - 17:23:8 + 18/9/2003 - 17:23:8 + 1.04 + ? + localhost/FactoryServer + Mul from MulComponent + 412 + 152 + +DivComponent + DivComponent + Div + 0 + ? + +Div + + +double + x + +double + y + + +double + z + + + 18/9/2003 - 17:23:8 + 18/9/2003 - 17:23:8 + 1.04 + ? + localhost/FactoryServer + Div from DivComponent + 622 + 124 + +AddComponent + AddComponent + Addition + 0 + ? + +Addition + + + +Adder + Adder + + + 18/9/2003 - 17:23:8 + 18/9/2003 - 17:23:8 + 1.04 + ? + localhost/AdditionServer + Addition from AddComponent + 0 + 0 + +AddComponent + AddComponent + Addition_1 + 0 + ? + +Addition + + + +Adder + Adder + + + 18/9/2003 - 17:23:8 + 18/9/2003 - 17:23:8 + 1.04 + ? + localhost/Addition_1Server + Addition from AddComponent + 4 + 327 + +? + ? + AddAndCompare + 2 + ? + +AddAndCompare + + +Adder + Adder + +double + x + +double + y + +Adder + anOtherAdder + + +double + FuncValue + +double + z + + + 18/9/2003 - 17:23:8 + 18/9/2003 - 17:23:8 + 1.04 + ? + ? + Python function + 233 + 0 + + +Add + FuncValue + Mul + x + + +Add + FuncValue + AddAndCompare + x + + +195 + 108 + +195 + 233 + +Add + z + Sub + x + + +187 + 459 + +186 + 262 + +Add + z + AddAndCompare + y + + +187 + 139 + +186 + 261 + +Sub + z + Div + x + + +598 + 203 + +598 + 457 + +Mul + z + Div + y + + +Addition + Adder + AddAndCompare + Adder + + +Addition_1 + Adder + AddAndCompare + anOtherAdder + + +215 + 168 + +214 + 407 + + +GraphEssai3 + Add\x + Add + x + +7 + 1 + + +GraphEssai3 + Add\y + Add + y + +7 + 2 + + +GraphEssai3 + Sub\y + Sub + y + +7 + 3 + + +GraphEssai3 + Mul\y + Mul + y + +7 + 4 + diff --git a/examples/GraphFactorial.py b/examples/GraphFactorial.py index 3551fce..9e59afb 100644 --- a/examples/GraphFactorial.py +++ b/examples/GraphFactorial.py @@ -1,3 +1,26 @@ +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : GraphFactorial.py +# Module : SuperVisionTest from SuperV import * @@ -11,23 +34,25 @@ GraphFactorial.IsValid() GraphFactorial.Run( 3 ) GraphFactorial.DoneW() GraphFactorial.State() -print eval.GetComponentName() -print eval.GetContainer() +eval.GetComponentName() +eval.GetContainer() GraphFactorial.PrintPorts() +eval.CpuUsed() eval.SetContainer('Server4Py') GraphFactorial.Run( 4 ) GraphFactorial.DoneW() GraphFactorial.State() -print eval.GetComponentName() -print eval.GetContainer() +eval.GetComponentName() +eval.GetContainer() GraphFactorial.PrintPorts() +eval.CpuUsed() eval.SetContainer('Server5Py') GraphFactorial.Run( 5 ) GraphFactorial.DoneW() GraphFactorial.State() -print eval.GetComponentName() -print eval.GetContainer() +eval.GetComponentName() +eval.GetContainer() GraphFactorial.PrintPorts() - +eval.CpuUsed() diff --git a/examples/GraphFactorialLcc.py b/examples/GraphFactorialLcc.py new file mode 100755 index 0000000..5a56607 --- /dev/null +++ b/examples/GraphFactorialLcc.py @@ -0,0 +1,41 @@ +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : GraphFactorialLcc.py +# Module : SuperVisionTest + +# That test runs only with python but NOT in the TUI ... + +from SuperV import * + +from FactorialComponent import * + +Factorial = lcc.FindOrLoadComponent('ServerPy','FactorialComponent') + +dir (Factorial) + +fact3 = Factorial.eval(3) + +if fact3 != 6 : + print "Error",fact3,"!= 6 !" + +print Factorial.CpuUsed_impl() + diff --git a/examples/GraphGOTO.py b/examples/GraphGOTO.py index cdd8de1..00b7414 100644 --- a/examples/GraphGOTO.py +++ b/examples/GraphGOTO.py @@ -5,86 +5,274 @@ from SuperV import * # Graph creation GraphGOTO = Graph( 'GraphGOTO' ) GraphGOTO.SetName( 'GraphGOTO' ) -GraphGOTO.SetAuthor( '' ) -GraphGOTO.SetComment( '' ) +GraphGOTO.SetAuthor( 'JR' ) +GraphGOTO.SetComment( 'Syracuse algorithm' ) GraphGOTO.Coords( 0 , 0 ) # Creation of Factory Nodes +test_ISEVEN = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) +test_ISEVEN.SetName( 'test_ISEVEN' ) +test_ISEVEN.SetAuthor( '' ) +test_ISEVEN.SetContainer( 'localhost/FactoryServer' ) +test_ISEVEN.SetComment( 'C_ISEVEN from SyrComponent' ) +test_ISEVEN.Coords( 195 , 417 ) + +test_ISONE = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) +test_ISONE.SetName( 'test_ISONE' ) +test_ISONE.SetAuthor( '' ) +test_ISONE.SetContainer( 'localhost/FactoryServer' ) +test_ISONE.SetComment( 'C_ISONE from SyrComponent' ) +test_ISONE.Coords( 201 , 145 ) + +m3p1 = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) +m3p1.SetName( 'm3p1' ) +m3p1.SetAuthor( '' ) +m3p1.SetContainer( 'localhost/FactoryServer' ) +m3p1.SetComment( 'C_M3P1 from SyrComponent' ) +m3p1.Coords( 784 , 36 ) + +div2 = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) +div2.SetName( 'div2' ) +div2.SetAuthor( '' ) +div2.SetContainer( 'localhost/FactoryServer' ) +div2.SetComment( 'C_DIV2 from SyrComponent' ) +div2.Coords( 788 , 409 ) + +incr = GraphGOTO.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) +incr.SetName( 'incr' ) +incr.SetAuthor( '' ) +incr.SetContainer( 'localhost/FactoryServer' ) +incr.SetComment( 'C_INCR from SyrComponent' ) +incr.Coords( 788 , 230 ) + # Creation of InLine Nodes -PyIsOdd = [] -PyIsOdd.append( 'import time' ) -PyIsOdd.append( 'def IsOdd(a) : ' ) -PyIsOdd.append( ' print a,"IsOdd" ' ) -PyIsOdd.append( ' time.sleep( 1 )' ) -PyIsOdd.append( ' return a+1 ' ) -IsOdd = GraphGOTO.INode( 'IsOdd' , PyIsOdd ) -IsOdd.InPort( 'a' , 'long' ) -IsOdd.OutPort( 'a' , 'long' ) -IsOdd.SetName( 'IsOdd' ) -IsOdd.SetAuthor( '' ) -IsOdd.SetComment( 'Python function' ) -IsOdd.Coords( 296 , 249 ) +Pylabel_begin = [] +Pylabel_begin.append( 'def label_begin( NB , KB ):' ) +Pylabel_begin.append( ' print "label_begin",NB,KB' ) +Pylabel_begin.append( ' return NB,KB' ) +label_begin = GraphGOTO.INode( 'label_begin' , Pylabel_begin ) +label_begin.InPort( 'NB' , 'long' ) +label_begin.InPort( 'KB' , 'long' ) +label_begin.OutPort( 'NT' , 'long' ) +label_begin.OutPort( 'KT' , 'long' ) +label_begin.SetName( 'label_begin' ) +label_begin.SetAuthor( '' ) +label_begin.SetComment( 'Python function' ) +label_begin.Coords( 9 , 250 ) + +Pylabel_test = [] +Pylabel_test.append( 'def label_test( ValEven , ValOne , NB , KB ):' ) +Pylabel_test.append( ' print "label_begin",ValEven,ValOne,NB,KB' ) +Pylabel_test.append( ' return ValEven,ValOne,NB,KB' ) +label_test = GraphGOTO.INode( 'label_test' , Pylabel_test ) +label_test.InPort( 'ValEven' , 'long' ) +label_test.InPort( 'ValOne' , 'long' ) +label_test.InPort( 'NT' , 'long' ) +label_test.InPort( 'KT' , 'long' ) +label_test.OutPort( 'ValEven' , 'long' ) +label_test.OutPort( 'ValOne' , 'long' ) +label_test.OutPort( 'NT' , 'long' ) +label_test.OutPort( 'KT' , 'long' ) +label_test.SetName( 'label_test' ) +label_test.SetAuthor( '' ) +label_test.SetComment( 'Python function' ) +label_test.Coords( 396 , 193 ) # Creation of Switch Nodes -PySwitch = [] -PySwitch.append( 'import time' ) -PySwitch.append( 'def Switch(a) : ' ) -PySwitch.append( ' print "Switch(",a,")"' ) -PySwitch.append( ' time.sleep( 1 )' ) -PySwitch.append( ' b = a & 1' ) -PySwitch.append( ' print "Switch(",a,") ->",b,a' ) -PySwitch.append( ' return b,a ' ) -Switch,EndSwitch = GraphGOTO.SNode( 'Switch' , PySwitch ) -EndSwitch.SetName( 'EndSwitch' ) -EndSwitch.SetAuthor( '' ) -EndSwitch.SetComment( '' ) -EndSwitch.Coords( 569 , 94 ) -PyEndSwitch = [] -EndSwitch.SetPyFunction( 'EndSwitch' , PyEndSwitch ) -EndSwitch.InPort( 'a' , 'long' ) -EndSwitch.OutPort( 'a' , 'long' ) -Switch.InPort( 'a' , 'long' ) -Switch.OutPort( 'Odd' , 'long' ) -Switch.OutPort( 'a' , 'long' ) -Switch.SetName( 'Switch' ) -Switch.SetAuthor( '' ) -Switch.SetComment( '' ) -Switch.Coords( 25 , 94 ) +Pytest = [] +Pytest.append( 'def Switch_OneEven( ValOne , ValEven , NT , KT ) :' ) +Pytest.append( ' Finished = ValOne' ) +Pytest.append( ' if Finished == 0 :' ) +Pytest.append( ' Incr = 1' ) +Pytest.append( ' Even = ValEven' ) +Pytest.append( ' if Even == 0 :' ) +Pytest.append( ' Odd = 1' ) +Pytest.append( ' else :' ) +Pytest.append( ' Odd = 0' ) +Pytest.append( ' else :' ) +Pytest.append( ' Incr = 0' ) +Pytest.append( ' Even = 0' ) +Pytest.append( ' Odd = 0' ) +Pytest.append( ' Even = ValEven' ) +Pytest.append( ' return Finished,Incr,Even,Odd,NT,KT' ) +test,EndSwitch_OneEven = GraphGOTO.SNode( 'Switch_OneEven' , Pytest ) +EndSwitch_OneEven.SetName( 'EndSwitch_OneEven' ) +EndSwitch_OneEven.SetAuthor( '' ) +EndSwitch_OneEven.SetComment( '' ) +EndSwitch_OneEven.Coords( 1152 , 292 ) +PyEndSwitch_OneEven = [] +PyEndSwitch_OneEven.append( 'def EndSwitch_OneEven( Finished , K ):' ) +PyEndSwitch_OneEven.append( ' print "label_begin",Finished,K' ) +PyEndSwitch_OneEven.append( ' return Finished,K' ) +EndSwitch_OneEven.SetPyFunction( 'EndSwitch_OneEven' , PyEndSwitch_OneEven ) +EndSwitch_OneEven.InPort( 'Finished' , 'long' ) +EndSwitch_OneEven.InPort( 'K' , 'long' ) +EndSwitch_OneEven.OutPort( 'Finished' , 'long' ) +EndSwitch_OneEven.OutPort( 'K' , 'long' ) +test.InPort( 'ValOne' , 'long' ) +test.InPort( 'ValEven' , 'long' ) +test.InPort( 'NT' , 'long' ) +test.InPort( 'KT' , 'long' ) +test.OutPort( 'Finished' , 'long' ) +test.OutPort( 'Incr' , 'long' ) +test.OutPort( 'Even' , 'long' ) +test.OutPort( 'Odd' , 'long' ) +test.OutPort( 'N' , 'long' ) +test.OutPort( 'K' , 'long' ) +test.SetName( 'test' ) +test.SetAuthor( '' ) +test.SetComment( '' ) +test.Coords( 595 , 239 ) # Creation of GOTO Nodes -PyGoTo = [] -GoTo = GraphGOTO.GNode( '' , PyGoTo , 'Switch' ) -GoTo.InPort( 'a' , 'long' ) -GoTo.OutPort( 'a' , 'long' ) -GoTo.SetName( 'GoTo' ) -GoTo.SetAuthor( '' ) -GoTo.SetComment( '' ) -GoTo.Coords( 520 , 323 ) - -# Creation of intermediate Output variables and of Control Links -IsOdda = IsOdd.Port( 'a' ) -GoToa = GraphGOTO.Link( IsOdda , GoTo.Port( 'a' ) ) -SwitchDefault = Switch.Port( 'Default' ) -EndSwitchDefault = GraphGOTO.Link( SwitchDefault , EndSwitch.Port( 'Default' ) ) -SwitchOdd = Switch.Port( 'Odd' ) -IsOddInGate = GraphGOTO.Link( SwitchOdd , IsOdd.Port( 'InGate' ) ) -IsOddInGate.AddCoord( 1 , 249 , 323 ) -IsOddInGate.AddCoord( 2 , 249 , 157 ) -IsOddInGate.AddCoord( 3 , 247 , 157 ) -Switcha = Switch.Port( 'a' ) -IsOdda = GraphGOTO.Link( Switcha , IsOdd.Port( 'a' ) ) -IsOdda.AddCoord( 1 , 196 , 357 ) -IsOdda.AddCoord( 2 , 196 , 186 ) -EndSwitcha = GraphGOTO.Link( Switcha , EndSwitch.Port( 'a' ) ) -GoToOutGate = GoTo.Port( 'OutGate' ) -SwitchInGate = GraphGOTO.Link( GoToOutGate , Switch.Port( 'InGate' ) ) +Pycontrol_m3p1 = [] +Pycontrol_m3p1.append( 'def control_m3p1( N , K ):' ) +Pycontrol_m3p1.append( ' return 0,1,N,K' ) +control_m3p1 = GraphGOTO.GNode( 'control_m3p1' , Pycontrol_m3p1 , 'label_test' ) +control_m3p1.InPort( 'N' , 'long' ) +control_m3p1.InPort( 'K' , 'long' ) +control_m3p1.OutPort( 'ValOne' , 'long' ) +control_m3p1.OutPort( 'ValEven' , 'long' ) +control_m3p1.OutPort( 'NT' , 'long' ) +control_m3p1.OutPort( 'KT' , 'long' ) +control_m3p1.SetName( 'control_m3p1' ) +control_m3p1.SetAuthor( '' ) +control_m3p1.SetComment( '' ) +control_m3p1.Coords( 980 , 81 ) + +Pycontrol_div2 = [] +Pycontrol_div2.append( 'def control_div2( N , NB ) :' ) +Pycontrol_div2.append( ' return N,NB' ) +control_div2 = GraphGOTO.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) +control_div2.InPort( 'N' , 'long' ) +control_div2.InPort( 'K' , 'long' ) +control_div2.OutPort( 'NB' , 'long' ) +control_div2.OutPort( 'KB' , 'long' ) +control_div2.SetName( 'control_div2' ) +control_div2.SetAuthor( '' ) +control_div2.SetComment( '' ) +control_div2.Coords( 1039 , 454 ) + +# Creation of Links +test_ISEVENBoolEven = test_ISEVEN.Port( 'BoolEven' ) +label_testValEven = GraphGOTO.Link( test_ISEVENBoolEven , label_test.Port( 'ValEven' ) ) +label_testValEven.AddCoord( 1 , 369 , 273 ) +label_testValEven.AddCoord( 2 , 370 , 498 ) + +test_ISONEBoolOne = test_ISONE.Port( 'BoolOne' ) +label_testValOne = GraphGOTO.Link( test_ISONEBoolOne , label_test.Port( 'ValOne' ) ) +label_testValOne.AddCoord( 1 , 385 , 303 ) +label_testValOne.AddCoord( 2 , 384 , 225 ) + +m3p1anEvenInteger = m3p1.Port( 'anEvenInteger' ) +control_m3p1N = GraphGOTO.Link( m3p1anEvenInteger , control_m3p1.Port( 'N' ) ) + +div2anInteger = div2.Port( 'anInteger' ) +control_div2N = GraphGOTO.Link( div2anInteger , control_div2.Port( 'N' ) ) + +incraNewCount = incr.Port( 'aNewCount' ) +control_m3p1K = GraphGOTO.Link( incraNewCount , control_m3p1.Port( 'K' ) ) +control_m3p1K.AddCoord( 1 , 964 , 145 ) +control_m3p1K.AddCoord( 2 , 964 , 309 ) + +control_div2K = GraphGOTO.Link( incraNewCount , control_div2.Port( 'K' ) ) +control_div2K.AddCoord( 1 , 963 , 518 ) +control_div2K.AddCoord( 2 , 964 , 312 ) + +label_beginNT = label_begin.Port( 'NT' ) +label_testNT = GraphGOTO.Link( label_beginNT , label_test.Port( 'NT' ) ) + +test_ISONEanInteger = GraphGOTO.Link( label_beginNT , test_ISONE.Port( 'anInteger' ) ) +test_ISONEanInteger.AddCoord( 1 , 192 , 226 ) +test_ISONEanInteger.AddCoord( 2 , 191 , 331 ) + +test_ISEVENanInteger = GraphGOTO.Link( label_beginNT , test_ISEVEN.Port( 'anInteger' ) ) +test_ISEVENanInteger.AddCoord( 1 , 191 , 494 ) +test_ISEVENanInteger.AddCoord( 2 , 192 , 331 ) + +label_beginKT = label_begin.Port( 'KT' ) +label_testKT = GraphGOTO.Link( label_beginKT , label_test.Port( 'KT' ) ) + +label_testValEven = label_test.Port( 'ValEven' ) +testValEven = GraphGOTO.Link( label_testValEven , test.Port( 'ValEven' ) ) +testValEven.AddCoord( 1 , 587 , 318 ) +testValEven.AddCoord( 2 , 570 , 318 ) +testValEven.AddCoord( 3 , 569 , 272 ) + +label_testValOne = label_test.Port( 'ValOne' ) +testValOne = GraphGOTO.Link( label_testValOne , test.Port( 'ValOne' ) ) +testValOne.AddCoord( 1 , 585 , 273 ) +testValOne.AddCoord( 2 , 586 , 303 ) + +label_testNT = label_test.Port( 'NT' ) +testNT = GraphGOTO.Link( label_testNT , test.Port( 'NT' ) ) + +label_testKT = label_test.Port( 'KT' ) +testKT = GraphGOTO.Link( label_testKT , test.Port( 'KT' ) ) + +testFinished = test.Port( 'Finished' ) +EndSwitch_OneEvenFinished = GraphGOTO.Link( testFinished , EndSwitch_OneEven.Port( 'Finished' ) ) + +testIncr = test.Port( 'Incr' ) +incrInGate = GraphGOTO.Link( testIncr , incr.Port( 'InGate' ) ) +incrInGate.AddCoord( 1 , 783 , 341 ) +incrInGate.AddCoord( 2 , 782 , 302 ) + +testEven = test.Port( 'Even' ) +div2InGate = GraphGOTO.Link( testEven , div2.Port( 'InGate' ) ) +div2InGate.AddCoord( 1 , 754 , 518 ) +div2InGate.AddCoord( 2 , 753 , 330 ) + +testOdd = test.Port( 'Odd' ) +m3p1InGate = GraphGOTO.Link( testOdd , m3p1.Port( 'InGate' ) ) +m3p1InGate.AddCoord( 1 , 758 , 145 ) +m3p1InGate.AddCoord( 2 , 760 , 359 ) + +testN = test.Port( 'N' ) +m3p1anOddInteger = GraphGOTO.Link( testN , m3p1.Port( 'anOddInteger' ) ) +m3p1anOddInteger.AddCoord( 1 , 767 , 116 ) +m3p1anOddInteger.AddCoord( 2 , 767 , 116 ) +m3p1anOddInteger.AddCoord( 3 , 767 , 390 ) + +div2anEvenInteger = GraphGOTO.Link( testN , div2.Port( 'anEvenInteger' ) ) +div2anEvenInteger.AddCoord( 1 , 767 , 489 ) +div2anEvenInteger.AddCoord( 2 , 766 , 389 ) + +testK = test.Port( 'K' ) +EndSwitch_OneEvenK = GraphGOTO.Link( testK , EndSwitch_OneEven.Port( 'K' ) ) + +incraCount = GraphGOTO.Link( testK , incr.Port( 'aCount' ) ) +incraCount.AddCoord( 1 , 772 , 311 ) +incraCount.AddCoord( 2 , 772 , 417 ) +incraCount.AddCoord( 3 , 772 , 417 ) + +testDefault = test.Port( 'Default' ) +EndSwitch_OneEvenDefault = GraphGOTO.Link( testDefault , EndSwitch_OneEven.Port( 'Default' ) ) +EndSwitch_OneEvenDefault.AddCoord( 1 , 778 , 384 ) +EndSwitch_OneEvenDefault.AddCoord( 2 , 778 , 448 ) + +control_m3p1OutGate = control_m3p1.Port( 'OutGate' ) +label_testInGate = GraphGOTO.Link( control_m3p1OutGate , label_test.Port( 'InGate' ) ) +label_testInGate.AddCoord( 1 , 388 , 388 ) +label_testInGate.AddCoord( 2 , 389 , 597 ) +label_testInGate.AddCoord( 3 , 1319 , 597 ) +label_testInGate.AddCoord( 4 , 1318 , 231 ) + +control_div2OutGate = control_div2.Port( 'OutGate' ) +label_beginInGate = GraphGOTO.Link( control_div2OutGate , label_begin.Port( 'InGate' ) ) +label_beginInGate.AddCoord( 1 , 4 , 388 ) +label_beginInGate.AddCoord( 2 , 3 , 587 ) +label_beginInGate.AddCoord( 3 , 1214 , 588 ) +label_beginInGate.AddCoord( 4 , 1213 , 546 ) # Creation of Input datas -Switcha = Switch.Input( 'a' , 1) +label_beginNB = label_begin.Input( 'NB' , 7) +label_beginKB = label_begin.Input( 'KB' , 0) # Creation of Output variables -EndSwitcha = EndSwitch.Port( 'a' ) +EndSwitch_OneEvenFinished = EndSwitch_OneEven.Port( 'Finished' ) +EndSwitch_OneEvenK = EndSwitch_OneEven.Port( 'K' ) GraphGOTO.Run() diff --git a/examples/GraphGOTO.xml b/examples/GraphGOTO.xml index bf36bc5..27ba57d 100644 --- a/examples/GraphGOTO.xml +++ b/examples/GraphGOTO.xml @@ -4,207 +4,724 @@ ? ? - GraphGOTO + GraphSyrControl 1 ? -GraphGOTO +GraphSyrControl long - Switch\a + label_begin\NB + +long + label_begin\KB long - EndSwitch\a + EndSwitch_OneEven\Finished + +long + EndSwitch_OneEven\K - 24/3/2003 - 16:26:48 - 25/3/2003 - 9:25:23 + 11/3/2003 - 18:34:21 + 18/9/2003 - 17:27:23 1.04 - ? + JR ? - ? + Syracuse algorithm 0 0 +SyrComponent + SyrComponent + test_ISEVEN + 0 + ? + +C_ISEVEN + + +long + anInteger + + +long + BoolEven + + + 18/9/2003 - 17:27:22 + 18/9/2003 - 17:27:22 + 1.04 + ? + localhost/FactoryServer + C_ISEVEN from SyrComponent + 195 + 417 + +SyrComponent + SyrComponent + test_ISONE + 0 + ? + +C_ISONE + + +long + anInteger + + +long + BoolOne + + + 18/9/2003 - 17:27:22 + 18/9/2003 - 17:27:22 + 1.04 + ? + localhost/FactoryServer + C_ISONE from SyrComponent + 201 + 145 + +SyrComponent + SyrComponent + m3p1 + 0 + ? + +C_M3P1 + + +long + anOddInteger + + +long + anEvenInteger + + + 18/9/2003 - 17:27:22 + 18/9/2003 - 17:27:22 + 1.04 + ? + localhost/FactoryServer + C_M3P1 from SyrComponent + 784 + 36 + +SyrComponent + SyrComponent + div2 + 0 + ? + +C_DIV2 + + +long + anEvenInteger + + +long + anInteger + + + 18/9/2003 - 17:27:22 + 18/9/2003 - 17:27:22 + 1.04 + ? + localhost/FactoryServer + C_DIV2 from SyrComponent + 788 + 409 + +SyrComponent + SyrComponent + incr + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 18/9/2003 - 17:27:23 + 18/9/2003 - 17:27:23 + 1.04 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 788 + 230 + ? ? - IsOdd + label_begin 3 ? -IsOdd +label_begin long - a + NB + +long + KB long - a + NT + +long + KT -IsOdd - - - - 25/3/2003 - 9:24:50 - 25/3/2003 - 9:24:50 +label_begin + + + + 18/9/2003 - 17:27:23 + 18/9/2003 - 17:27:23 1.04 ? ? Python function - 296 - 249 + 9 + 250 ? ? - Switch + label_test + 3 + ? + +label_test + + +long + ValEven + +long + ValOne + +long + NT + +long + KT + + +long + ValEven + +long + ValOne + +long + NT + +long + KT + + + +label_test + + + + 18/9/2003 - 17:27:23 + 18/9/2003 - 17:27:23 + 1.04 + ? + ? + Python function + 396 + 193 + +? + ? + test 6 - EndSwitch + EndSwitch_OneEven -Switch +test long - a + ValOne + +long + ValEven + +long + NT + +long + KT +long + Finished + +long + Incr + +long + Even + long Odd long - a + N + +long + K -Switch - - - 25/3/2003 - 9:24:51 - 25/3/2003 - 9:24:51 +Switch_OneEven + + + + + + + + + + + + + + + + 18/9/2003 - 17:27:23 + 18/9/2003 - 17:27:23 1.04 ? ? ? - 25 - 94 + 595 + 239 ? ? - EndSwitch + EndSwitch_OneEven 7 - Switch + test + +EndSwitch_OneEven + + +long + Finished + +long + K + + +long + Finished + +long + K + + + +EndSwitch_OneEven + + + + 18/9/2003 - 17:27:23 + 18/9/2003 - 17:27:23 + 1.04 + ? + ? + ? + 1152 + 292 + +? + ? + control_m3p1 + 8 + label_test -EndSwitch +control_m3p1 long - a + N + +long + K long - a + ValOne + +long + ValEven + +long + NT + +long + KT - - 25/3/2003 - 9:24:51 - 25/3/2003 - 9:24:51 + +control_m3p1 + + + 18/9/2003 - 17:27:23 + 18/9/2003 - 17:27:23 1.04 ? ? ? - 569 - 94 + 980 + 81 ? ? - GoTo + control_div2 8 - Switch + label_begin -GoTo +control_div2 long - a + N + +long + K long - a + NB + +long + KB - - 25/3/2003 - 9:24:51 - 25/3/2003 - 9:24:51 + +control_div2 + + + 18/9/2003 - 17:27:23 + 18/9/2003 - 17:27:23 1.04 ? ? ? - 520 - 323 + 1039 + 454 -IsOdd - a - GoTo - a +test_ISEVEN + BoolEven + label_test + ValEven + + +369 + 273 + +370 + 498 + +test_ISONE + BoolOne + label_test + ValOne + + +385 + 303 + +384 + 225 + +m3p1 + anEvenInteger + control_m3p1 + N -Switch - Default - EndSwitch - Default +div2 + anInteger + control_div2 + N -Switch +incr + aNewCount + control_m3p1 + K + + +964 + 145 + +964 + 309 + +incr + aNewCount + control_div2 + K + + +963 + 518 + +964 + 312 + +label_begin + NT + label_test + NT + + +label_begin + NT + test_ISONE + anInteger + + +192 + 226 + +191 + 331 + +label_begin + NT + test_ISEVEN + anInteger + + +191 + 494 + +192 + 331 + +label_begin + KT + label_test + KT + + +label_test + ValEven + test + ValEven + + +587 + 318 + +570 + 318 + +569 + 272 + +label_test + ValOne + test + ValOne + + +585 + 273 + +586 + 303 + +label_test + NT + test + NT + + +label_test + KT + test + KT + + +test + Finished + EndSwitch_OneEven + Finished + + +test + Incr + incr + InGate + + +783 + 341 + +782 + 302 + +test + Even + div2 + InGate + + +754 + 518 + +753 + 330 + +test Odd - IsOdd + m3p1 InGate -249 - 323 +758 + 145 -249 - 157 +760 + 359 + +test + N + m3p1 + anOddInteger + + +767 + 116 + +767 + 116 -247 - 157 +767 + 390 -Switch - a - IsOdd - a +test + N + div2 + anEvenInteger -196 - 357 +767 + 489 -196 - 186 +766 + 389 -Switch - a - EndSwitch - a +test + K + EndSwitch_OneEven + K -GoTo +test + K + incr + aCount + + +772 + 311 + +772 + 417 + +772 + 417 + +test + Default + EndSwitch_OneEven + Default + + +778 + 384 + +778 + 448 + +control_m3p1 + OutGate + label_test + InGate + + +388 + 388 + +389 + 597 + +1319 + 597 + +1318 + 231 + +control_div2 OutGate - Switch + label_begin InGate - + + +4 + 388 + +3 + 587 + +1214 + 588 + +1213 + 546 -GraphGOTO - Switch\a - Switch - a +GraphSyrControl + label_begin\NB + label_begin + NB + +3 + 7 + + +GraphSyrControl + label_begin\KB + label_begin + KB 3 - 1 + 0 diff --git a/examples/GraphGeomEssai.xml b/examples/GraphGeomEssai.xml index cd3b7e9..766f59c 100644 --- a/examples/GraphGeomEssai.xml +++ b/examples/GraphGeomEssai.xml @@ -1,401 +1,318 @@ - - - - - + - - - ? - ? - GraphGeomEssai - 1 - - GraphGeomEssai - - - double - MakeSphere\x1 - - - double - MakeSphere\y1 - - - double - MakeSphere\z1 - - - double - MakeSphere\radius - - - double - MakeTranslation\x1 - - - double - MakeTranslation\y1 - - - double - MakeTranslation\z1 - - - - - GEOM_Shape - MakeFuse\shape - - - - 10/7/2002 - 14:53:2 - 10/7/2002 - 14:54:47 - 1.03 - ? - localhost/FactoryServer - ? - 0 - 0 - - - - - - GEOM - GEOM - MakeCopy - 0 - - MakeCopy - - - GEOM_Shape - shape1 - - - - - GEOM_Shape - shape - - - - 10/7/2002 - 14:53:13 - 10/7/2002 - 14:53:13 - 1.03 - ? - localhost/FactoryServer - ? - 269 - 85 - - - GEOM - GEOM - MakeFuse - 0 - - MakeFuse - - - GEOM_Shape - shape1 - - - GEOM_Shape - shape2 - - - - - GEOM_Shape - shape - - - - 10/7/2002 - 14:53:13 - 10/7/2002 - 14:53:13 - 1.03 - ? - localhost/FactoryServer - ? - 725 - 179 - - - GEOM - GEOM - MakeSphere - 0 - - MakeSphere - - - double - x1 - - - double - y1 - - - double - z1 - - - double - radius - - - - - GEOM_Shape - shape - - - - 10/7/2002 - 14:53:13 - 10/7/2002 - 14:53:13 - 1.03 - ? - localhost/FactoryServer - ? - 28 - 188 - - - GEOM - GEOM - MakeTranslation - 0 - - MakeTranslation - - - GEOM_Shape - shape1 - - - double - x1 - - - double - y1 - - - double - z1 - - - - - GEOM_Shape - shape - - - - 10/7/2002 - 14:53:13 - 10/7/2002 - 14:53:13 - 1.03 - ? - localhost/FactoryServer - ? - 493 - 85 - - - GEOM - GEOM - MakeCopy_1 - 0 - - MakeCopy - - - GEOM_Shape - shape1 - - - - - GEOM_Shape - shape - - - - 10/7/2002 - 14:53:18 - 10/7/2002 - 14:53:18 - 1.03 - ? - localhost/FactoryServer - ? - 283 - 391 - - - - - - MakeCopy - shape - MakeTranslation - shape1 - - - - - MakeSphere - shape - MakeCopy - shape1 - - - 226 - 237 - - - 226 - 340 - - - - - MakeSphere - shape - MakeCopy_1 - shape1 - - - 226 - 544 - - - 225 - 340 - - - - - MakeTranslation - shape - MakeFuse - shape1 - - - 688 - 330 - - - 689 - 237 - - - - - MakeCopy_1 - shape - MakeFuse - shape2 - - - 688 - 362 - - - 689 - 543 - - - - - - - - GraphGeomEssai - MakeSphere\x1 - MakeSphere - x1 - - 3 - 0 - - - - - - GraphGeomEssai - MakeSphere\y1 - MakeSphere - y1 - - 3 - 0 - - - - - - GraphGeomEssai - MakeSphere\z1 - MakeSphere - z1 - - 3 - 0 - - - - - - GraphGeomEssai - MakeSphere\radius - MakeSphere - radius - - 3 - 20 - - - - - - GraphGeomEssai - MakeTranslation\x1 - MakeTranslation - x1 - - 3 - 10 - - - - - - GraphGeomEssai - MakeTranslation\y1 - MakeTranslation - y1 - - 3 - 10 - - - - - - GraphGeomEssai - MakeTranslation\z1 - MakeTranslation - z1 - - 3 - 10 - - - - - - - + + +? + ? + GraphGeomEssai + 1 + ? + +GraphGeomEssai + + +double + MakeSphere\x1 + +double + MakeSphere\y1 + +double + MakeSphere\z1 + +double + MakeSphere\radius + +double + MakeTranslation\x1 + +double + MakeTranslation\y1 + +double + MakeTranslation\z1 + + +GEOM_Shape + MakeFuse\shape + + + 10/7/2002 - 14:53:2 + 24/9/2003 - 16:13:48 + 1.03 + ? + ? + ? + 0 + 0 + + +GEOM + GEOM + MakeCopy + 0 + ? + +MakeCopy + + +GEOM_Shape + shape1 + + +GEOM_Shape + shape + + + 24/9/2003 - 16:13:48 + 24/9/2003 - 16:13:48 + 1.03 + ? + localhost/FactoryServer + MakeCopy from GEOM + 269 + 85 + +GEOM + GEOM + MakeFuse + 0 + ? + +MakeFuse + + +GEOM_Shape + shape1 + +GEOM_Shape + shape2 + + +GEOM_Shape + shape + + + 24/9/2003 - 16:13:48 + 24/9/2003 - 16:13:48 + 1.03 + ? + localhost/FactoryServer + MakeFuse from GEOM + 725 + 179 + +GEOM + GEOM + MakeSphere + 0 + ? + +MakeSphere + + +double + x1 + +double + y1 + +double + z1 + +double + radius + + +GEOM_Shape + shape + + + 24/9/2003 - 16:13:48 + 24/9/2003 - 16:13:48 + 1.03 + ? + localhost/FactoryServer + MakeSphere from GEOM + 28 + 188 + +GEOM + GEOM + MakeTranslation + 0 + ? + +MakeTranslation + + +GEOM_Shape + shape1 + +double + x1 + +double + y1 + +double + z1 + + +GEOM_Shape + shape + + + 24/9/2003 - 16:13:48 + 24/9/2003 - 16:13:48 + 1.03 + ? + localhost/FactoryServer + MakeTranslation from GEOM + 493 + 85 + +GEOM + GEOM + MakeCopy_1 + 0 + ? + +MakeCopy + + +GEOM_Shape + shape1 + + +GEOM_Shape + shape + + + 24/9/2003 - 16:13:48 + 24/9/2003 - 16:13:48 + 1.03 + ? + localhost/FactoryServer + MakeCopy from GEOM + 283 + 391 + + +MakeCopy + shape + MakeTranslation + shape1 + + +MakeSphere + shape + MakeCopy + shape1 + + +225 + 165 + +224 + 269 + +MakeSphere + shape + MakeCopy_1 + shape1 + + +223 + 472 + +224 + 270 + +MakeTranslation + shape + MakeFuse + shape1 + + +688 + 259 + +687 + 165 + +MakeCopy_1 + shape + MakeFuse + shape2 + + +689 + 289 + +690 + 471 + + +GraphGeomEssai + MakeSphere\x1 + MakeSphere + x1 + +7 + 0 + + +GraphGeomEssai + MakeSphere\y1 + MakeSphere + y1 + +7 + 0 + + +GraphGeomEssai + MakeSphere\z1 + MakeSphere + z1 + +7 + 0 + + +GraphGeomEssai + MakeSphere\radius + MakeSphere + radius + +7 + 20 + + +GraphGeomEssai + MakeTranslation\x1 + MakeTranslation + x1 + +7 + 10 + + +GraphGeomEssai + MakeTranslation\y1 + MakeTranslation + y1 + +7 + 10 + + +GraphGeomEssai + MakeTranslation\z1 + MakeTranslation + z1 + +7 + 10 + diff --git a/examples/GraphInLines.py b/examples/GraphInLines.py index d93576a..0b705a0 100644 --- a/examples/GraphInLines.py +++ b/examples/GraphInLines.py @@ -24,6 +24,7 @@ Add.SetName( 'Add' ) Add.SetAuthor( '' ) Add.SetComment( 'Python function' ) Add.Coords( 351 , 77 ) + PySub = [] PySub.append( 'def Sub(a,b) : ' ) PySub.append( ' return a-b ' ) @@ -36,6 +37,7 @@ Sub.SetName( 'Sub' ) Sub.SetAuthor( '' ) Sub.SetComment( 'Python function' ) Sub.Coords( 86 , 333 ) + PyMul = [] PyMul.append( 'def Mul(a,b) : ' ) PyMul.append( ' return a*b ' ) @@ -48,19 +50,21 @@ Mul.SetAuthor( '' ) Mul.SetComment( 'Python function' ) Mul.Coords( 616 , 247 ) -# Creation of intermediate Output variables and of Control Links +# Creation of Links Addf = Add.Port( 'f' ) Mula = GraphInLines.Link( Addf , Mul.Port( 'a' ) ) -Mula.AddCoord( 1 , 570 , 356 ) -Mula.AddCoord( 2 , 570 , 186 ) +Mula.AddCoord( 1 , 569 , 326 ) +Mula.AddCoord( 2 , 569 , 158 ) + Subf = Sub.Port( 'f' ) Mulb = GraphInLines.Link( Subf , Mul.Port( 'b' ) ) -Mulb.AddCoord( 1 , 282 , 376 ) -Mulb.AddCoord( 2 , 282 , 442 ) +Mulb.AddCoord( 1 , 283 , 358 ) +Mulb.AddCoord( 2 , 281 , 413 ) + Addb = GraphInLines.Link( Subf , Add.Port( 'b' ) ) -Addb.AddCoord( 1 , 283 , 209 ) -Addb.AddCoord( 2 , 283 , 374 ) -Addb.AddCoord( 3 , 283 , 442 ) +Addb.AddCoord( 1 , 283 , 187 ) +Addb.AddCoord( 2 , 282 , 356 ) +Addb.AddCoord( 3 , 281 , 414 ) # Creation of Input datas Adda = Add.Input( 'a' , 1) diff --git a/examples/GraphInLines.xml b/examples/GraphInLines.xml index a60665c..cc34fdb 100644 --- a/examples/GraphInLines.xml +++ b/examples/GraphInLines.xml @@ -26,7 +26,7 @@ 24/3/2003 - 10:58:41 - 25/3/2003 - 16:38:21 + 18/9/2003 - 17:30:7 1.04 ? ? @@ -60,8 +60,8 @@ - 25/3/2003 - 16:37:21 - 25/3/2003 - 16:37:21 + 18/9/2003 - 17:30:7 + 18/9/2003 - 17:30:7 1.04 ? ? @@ -94,8 +94,8 @@ - 25/3/2003 - 16:37:21 - 25/3/2003 - 16:37:21 + 18/9/2003 - 17:30:7 + 18/9/2003 - 17:30:7 1.04 ? ? @@ -127,8 +127,8 @@ Mul - 25/3/2003 - 16:37:21 - 25/3/2003 - 16:37:21 + 18/9/2003 - 17:30:7 + 18/9/2003 - 17:30:7 1.04 ? ? @@ -143,11 +143,11 @@ a -570 - 356 +569 + 326 -570 - 186 +569 + 158 Sub f @@ -155,11 +155,11 @@ b -282 - 376 +283 + 358 -282 - 442 +281 + 413 Sub f @@ -168,13 +168,13 @@ 283 - 209 + 187 -283 - 374 +282 + 356 -283 - 442 +281 + 414 GraphInLines diff --git a/examples/GraphInLinesParall.py b/examples/GraphInLinesParall.py new file mode 100755 index 0000000..407d31c --- /dev/null +++ b/examples/GraphInLinesParall.py @@ -0,0 +1,87 @@ + +# Generated python file of Graph GraphInLines + +from SuperV import * +# Graph creation +GraphInLinesParall = Graph( 'GraphInLinesParall' ) +GraphInLinesParall.SetName( 'GraphInLinesParall' ) +GraphInLinesParall.SetAuthor( '' ) +GraphInLinesParall.SetComment( '' ) +GraphInLinesParall.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyAdd = [] +PyAdd.append( 'import time ' ) +PyAdd.append( 'def Add(a,b) : ' ) +PyAdd.append( ' print "Add will wait 5 seconds" ' ) +PyAdd.append( ' time.sleep(5) ' ) +PyAdd.append( ' print "Add waited" ' ) +PyAdd.append( ' return a+b ' ) +PyAdd.append( '' ) +Add = GraphInLinesParall.INode( 'Add' , PyAdd ) +Add.InPort( 'a' , 'long' ) +Add.InPort( 'b' , 'long' ) +Add.OutPort( 'f' , 'long' ) +Add.SetName( 'Add' ) +Add.SetAuthor( '' ) +Add.SetComment( 'Python function' ) +Add.Coords( 351 , 77 ) + +PySub = [] +PySub.append( 'def Sub(a,b) : ' ) +PySub.append( ' return a-b ' ) +PySub.append( '' ) +Sub = GraphInLinesParall.INode( 'Sub' , PySub ) +Sub.InPort( 'a' , 'long' ) +Sub.InPort( 'b' , 'long' ) +Sub.OutPort( 'f' , 'long' ) +Sub.SetName( 'Sub' ) +Sub.SetAuthor( '' ) +Sub.SetComment( 'Python function' ) +Sub.Coords( 86 , 333 ) + +PyMul = [] +PyMul.append( 'import time ' ) +PyMul.append( 'def Mul(a,b) : ' ) +PyMul.append( ' print "Mul will wait 5 seconds" ' ) +PyMul.append( ' time.sleep(5) ' ) +PyMul.append( ' print "Mul waited" ' ) +PyMul.append( ' return a*b ' ) +Mul = GraphInLinesParall.INode( 'Mul' , PyMul ) +Mul.InPort( 'a' , 'long' ) +Mul.InPort( 'b' , 'long' ) +Mul.OutPort( 'Result' , 'long' ) +Mul.SetName( 'Mul' ) +Mul.SetAuthor( '' ) +Mul.SetComment( 'Python function' ) +Mul.Coords( 616 , 247 ) + +# Creation of Links +Subf = Sub.Port( 'f' ) +Mulb = GraphInLinesParall.Link( Subf , Mul.Port( 'b' ) ) +Mulb.AddCoord( 1 , 583 , 357 ) +Mulb.AddCoord( 2 , 583 , 413 ) +Mulb.AddCoord( 3 , 282 , 413 ) + +Addb = GraphInLinesParall.Link( Subf , Add.Port( 'b' ) ) +Addb.AddCoord( 1 , 282 , 186 ) +Addb.AddCoord( 2 , 283 , 413 ) + +Mula = GraphInLinesParall.Link( Subf , Mul.Port( 'a' ) ) +Mula.AddCoord( 1 , 583 , 328 ) +Mula.AddCoord( 2 , 583 , 412 ) + +# Creation of Input datas +Adda = Add.Input( 'a' , 1) +Suba = Sub.Input( 'a' , 3) +Subb = Sub.Input( 'b' , 4) + +# Creation of Output variables +Addf = Add.Port( 'f' ) +MulResult = Mul.Port( 'Result' ) + +GraphInLinesParall.Run() +GraphInLinesParall.DoneW() +GraphInLinesParall.PrintPorts() diff --git a/examples/GraphInLinesParall.xml b/examples/GraphInLinesParall.xml new file mode 100755 index 0000000..74a3cb8 --- /dev/null +++ b/examples/GraphInLinesParall.xml @@ -0,0 +1,216 @@ + + + + +? + ? + GraphInLinesParall + 1 + ? + +GraphInLinesParall + + +long + Add\a + +long + Sub\a + +long + Sub\b + + +long + Add\f + +long + Mul\Result + + + 24/3/2003 - 10:58:41 + 18/9/2003 - 17:31:28 + 1.04 + ? + ? + ? + 0 + 0 + + +? + ? + Add + 3 + ? + +Add + + +long + a + +long + b + + +long + f + + + +Add + + + + + + + + 18/9/2003 - 17:31:28 + 18/9/2003 - 17:31:28 + 1.04 + ? + ? + Python function + 351 + 77 + +? + ? + Sub + 3 + ? + +Sub + + +long + a + +long + b + + +long + f + + + +Sub + + + + 18/9/2003 - 17:31:28 + 18/9/2003 - 17:31:28 + 1.04 + ? + ? + Python function + 86 + 333 + +? + ? + Mul + 3 + ? + +Mul + + +long + a + +long + b + + +long + Result + + + +Mul + + + + + + + 18/9/2003 - 17:31:28 + 18/9/2003 - 17:31:28 + 1.04 + ? + ? + Python function + 616 + 247 + + +Sub + f + Mul + b + + +583 + 357 + +583 + 413 + +282 + 413 + +Sub + f + Add + b + + +282 + 186 + +283 + 413 + +Sub + f + Mul + a + + +583 + 328 + +583 + 412 + + +GraphInLinesParall + Add\a + Add + a + +3 + 1 + + +GraphInLinesParall + Sub\a + Sub + a + +3 + 3 + + +GraphInLinesParall + Sub\b + Sub + b + +3 + 4 + diff --git a/examples/GraphInLinesTypesCheck.py b/examples/GraphInLinesTypesCheck.py new file mode 100755 index 0000000..480e444 --- /dev/null +++ b/examples/GraphInLinesTypesCheck.py @@ -0,0 +1,191 @@ + +# Generated python file of Graph GraphInLinesConvertCheck + +from SuperV import * +# Graph creation +GraphInLinesConvertCheck = Graph( 'GraphInLinesConvertCheck' ) +GraphInLinesConvertCheck.SetName( 'GraphInLinesConvertCheck' ) +GraphInLinesConvertCheck.SetAuthor( 'JR' ) +GraphInLinesConvertCheck.SetComment( '' ) +GraphInLinesConvertCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +Addition = GraphInLinesConvertCheck.FNode( 'AddComponent' , 'AddComponent' , 'Addition' ) +Addition.SetName( 'Addition' ) +Addition.SetAuthor( '' ) +Addition.SetContainer( 'localhost/FactoryServer' ) +Addition.SetComment( 'Addition from AddComponent' ) +Addition.Coords( 232 , 514 ) + +# Creation of InLine Nodes +PyBoolCheck = [] +PyBoolCheck.append( 'def BoolCheck( InBool ) : ' ) +PyBoolCheck.append( ' return InBool ' ) +PyBoolCheck.append( '' ) +BoolCheck = GraphInLinesConvertCheck.INode( 'BoolCheck' , PyBoolCheck ) +BoolCheck.InPort( 'InBool' , 'boolean' ) +BoolCheck.OutPort( 'OutBool' , 'boolean' ) +BoolCheck.SetName( 'BoolCheck' ) +BoolCheck.SetAuthor( '' ) +BoolCheck.SetComment( 'InLine Node' ) +BoolCheck.Coords( 234 , 92 ) + +PyCharCheck = [] +PyCharCheck.append( 'def CharCheck( InChar ) : ' ) +PyCharCheck.append( ' return InChar ' ) +PyCharCheck.append( '' ) +CharCheck = GraphInLinesConvertCheck.INode( 'CharCheck' , PyCharCheck ) +CharCheck.InPort( 'InChar' , 'char' ) +CharCheck.OutPort( 'OutChar' , 'char' ) +CharCheck.SetName( 'CharCheck' ) +CharCheck.SetAuthor( '' ) +CharCheck.SetComment( 'InLine Node' ) +CharCheck.Coords( 30 , 142 ) + +PyShortCheck = [] +PyShortCheck.append( 'def ShortCheck( InShort ) : ' ) +PyShortCheck.append( ' return InShort ' ) +PyShortCheck.append( '' ) +ShortCheck = GraphInLinesConvertCheck.INode( 'ShortCheck' , PyShortCheck ) +ShortCheck.InPort( 'InShort' , 'short' ) +ShortCheck.OutPort( 'OutShort' , 'short' ) +ShortCheck.SetName( 'ShortCheck' ) +ShortCheck.SetAuthor( '' ) +ShortCheck.SetComment( 'InLine Node' ) +ShortCheck.Coords( 234 , 230 ) + +PyFloatCheck = [] +PyFloatCheck.append( 'def FloatCheck( InFloat ) : ' ) +PyFloatCheck.append( ' return InFloat ' ) +PyFloatCheck.append( '' ) +FloatCheck = GraphInLinesConvertCheck.INode( 'FloatCheck' , PyFloatCheck ) +FloatCheck.InPort( 'InFloat' , 'float' ) +FloatCheck.OutPort( 'OutFloat' , 'float' ) +FloatCheck.SetName( 'FloatCheck' ) +FloatCheck.SetAuthor( '' ) +FloatCheck.SetComment( 'InLine Node' ) +FloatCheck.Coords( 230 , 375 ) + +PyLongCheck = [] +PyLongCheck.append( 'def LongCheck( InLong ) : ' ) +PyLongCheck.append( ' return InLong ' ) +PyLongCheck.append( '' ) +LongCheck = GraphInLinesConvertCheck.INode( 'LongCheck' , PyLongCheck ) +LongCheck.InPort( 'InLong' , 'long' ) +LongCheck.OutPort( 'OutLong' , 'long' ) +LongCheck.SetName( 'LongCheck' ) +LongCheck.SetAuthor( '' ) +LongCheck.SetComment( 'InLine Node' ) +LongCheck.Coords( 30 , 282 ) + +PyStringCheck = [] +PyStringCheck.append( 'def StringCheck( aString ) : ' ) +PyStringCheck.append( ' return aString ' ) +PyStringCheck.append( '' ) +StringCheck = GraphInLinesConvertCheck.INode( 'StringCheck' , PyStringCheck ) +StringCheck.InPort( 'InString' , 'string' ) +StringCheck.OutPort( 'OutString' , 'string' ) +StringCheck.SetName( 'StringCheck' ) +StringCheck.SetAuthor( '' ) +StringCheck.SetComment( 'InLine Node' ) +StringCheck.Coords( 30 , 6 ) + +PyDoubleCheck = [] +PyDoubleCheck.append( 'def DoubleCheck( InDouble ) : ' ) +PyDoubleCheck.append( ' return InDouble ' ) +PyDoubleCheck.append( '' ) +DoubleCheck = GraphInLinesConvertCheck.INode( 'DoubleCheck' , PyDoubleCheck ) +DoubleCheck.InPort( 'InDouble' , 'double' ) +DoubleCheck.OutPort( 'OutDouble' , 'double' ) +DoubleCheck.SetName( 'DoubleCheck' ) +DoubleCheck.SetAuthor( '' ) +DoubleCheck.SetComment( 'Compute Node' ) +DoubleCheck.Coords( 23 , 427 ) + +PyMiscTypes = [] +PyMiscTypes.append( 'def MiscTypes( InString , InBool , InChar , InShort , InLong , InFloat , InDouble , InObjRef ) : ' ) +PyMiscTypes.append( ' return InString,InBool,InChar,InShort,InLong,InFloat,InDouble,InObjRef ' ) +MiscTypes = GraphInLinesConvertCheck.INode( 'MiscTypes' , PyMiscTypes ) +MiscTypes.InPort( 'InString' , 'string' ) +MiscTypes.InPort( 'InBool' , 'boolean' ) +MiscTypes.InPort( 'InChar' , 'char' ) +MiscTypes.InPort( 'InShort' , 'short' ) +MiscTypes.InPort( 'InLong' , 'long' ) +MiscTypes.InPort( 'InFloat' , 'float' ) +MiscTypes.InPort( 'InDouble' , 'double' ) +MiscTypes.InPort( 'InObjRef' , 'SuperVision::Adder' ) +MiscTypes.OutPort( 'OutString' , 'string' ) +MiscTypes.OutPort( 'OutBool' , 'boolean' ) +MiscTypes.OutPort( 'OutChar' , 'char' ) +MiscTypes.OutPort( 'OutShort' , 'short' ) +MiscTypes.OutPort( 'OutLong' , 'long' ) +MiscTypes.OutPort( 'OutFloat' , 'float' ) +MiscTypes.OutPort( 'OutDouble' , 'double' ) +MiscTypes.OutPort( 'OutObjRef' , 'SuperVisionTest::Addre' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetComment( 'InLine Node' ) +MiscTypes.Coords( 477 , 231 ) + +# Creation of Links +BoolCheckOutBool = BoolCheck.Port( 'OutBool' ) +MiscTypesInBool = GraphInLinesConvertCheck.Link( BoolCheckOutBool , MiscTypes.Port( 'InBool' ) ) +MiscTypesInBool.AddCoord( 1 , 446 , 341 ) +MiscTypesInBool.AddCoord( 2 , 446 , 172 ) + +CharCheckOutChar = CharCheck.Port( 'OutChar' ) +MiscTypesInChar = GraphInLinesConvertCheck.Link( CharCheckOutChar , MiscTypes.Port( 'InChar' ) ) +MiscTypesInChar.AddCoord( 1 , 431 , 368 ) +MiscTypesInChar.AddCoord( 2 , 431 , 223 ) + +ShortCheckOutShort = ShortCheck.Port( 'OutShort' ) +MiscTypesInShort = GraphInLinesConvertCheck.Link( ShortCheckOutShort , MiscTypes.Port( 'InShort' ) ) +MiscTypesInShort.AddCoord( 1 , 415 , 397 ) +MiscTypesInShort.AddCoord( 2 , 414 , 310 ) + +FloatCheckOutFloat = FloatCheck.Port( 'OutFloat' ) +MiscTypesInFloat = GraphInLinesConvertCheck.Link( FloatCheckOutFloat , MiscTypes.Port( 'InFloat' ) ) + +AdditionAdder = Addition.Port( 'Adder' ) +MiscTypesInObjRef = GraphInLinesConvertCheck.Link( AdditionAdder , MiscTypes.Port( 'InObjRef' ) ) +MiscTypesInObjRef.AddCoord( 1 , 462 , 514 ) +MiscTypesInObjRef.AddCoord( 2 , 461 , 593 ) + +LongCheckOutLong = LongCheck.Port( 'OutLong' ) +MiscTypesInLong = GraphInLinesConvertCheck.Link( LongCheckOutLong , MiscTypes.Port( 'InLong' ) ) +MiscTypesInLong.AddCoord( 1 , 406 , 426 ) +MiscTypesInLong.AddCoord( 2 , 405 , 363 ) + +StringCheckOutString = StringCheck.Port( 'OutString' ) +MiscTypesInString = GraphInLinesConvertCheck.Link( StringCheckOutString , MiscTypes.Port( 'InString' ) ) +MiscTypesInString.AddCoord( 1 , 462 , 312 ) +MiscTypesInString.AddCoord( 2 , 461 , 87 ) + +DoubleCheckOutDouble = DoubleCheck.Port( 'OutDouble' ) +MiscTypesInDouble = GraphInLinesConvertCheck.Link( DoubleCheckOutDouble , MiscTypes.Port( 'InDouble' ) ) +MiscTypesInDouble.AddCoord( 1 , 445 , 485 ) +MiscTypesInDouble.AddCoord( 2 , 445 , 508 ) + +# Creation of Input datas +BoolCheckInBool = BoolCheck.Input( 'InBool' , 1) +CharCheckInChar = CharCheck.Input( 'InChar' , 255) +ShortCheckInShort = ShortCheck.Input( 'InShort' , 16383) +FloatCheckInFloat = FloatCheck.Input( 'InFloat' , 3.14159) +LongCheckInLong = LongCheck.Input( 'InLong' , 1234567890) +StringCheckInString = StringCheck.Input( 'InString' , 'aString') +DoubleCheckInDouble = DoubleCheck.Input( 'InDouble' , 1.23457) + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphInLinesConvertCheck.Run() +GraphInLinesConvertCheck.DoneW() +GraphInLinesConvertCheck.PrintPorts() diff --git a/examples/GraphInLinesTypesCheck.xml b/examples/GraphInLinesTypesCheck.xml new file mode 100755 index 0000000..db1b88f --- /dev/null +++ b/examples/GraphInLinesTypesCheck.xml @@ -0,0 +1,536 @@ + + + + +? + ? + GraphInLinesConvertCheck + 1 + ? + +GraphInLinesConvertCheck + + +boolean + BoolCheck\InBool + +char + CharCheck\InChar + +short + ShortCheck\InShort + +float + FloatCheck\InFloat + +long + LongCheck\InLong + +string + StringCheck\InString + +double + DoubleCheck\InDouble + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Addre + MiscTypes\OutObjRef + + + 1/9/2003 - 17:28:48 + 11/9/2003 - 14:10:54 + 1.04 + JR + ? + ? + 0 + 0 + + +? + ? + BoolCheck + 3 + ? + +BoolCheck + + +boolean + InBool + + +boolean + OutBool + + + +BoolCheck + + + + 11/9/2003 - 14:10:54 + 11/9/2003 - 14:10:54 + 1.04 + ? + ? + InLine Node + 234 + 92 + +? + ? + CharCheck + 3 + ? + +CharCheck + + +char + InChar + + +char + OutChar + + + +CharCheck + + + + 11/9/2003 - 14:10:54 + 11/9/2003 - 14:10:54 + 1.04 + ? + ? + InLine Node + 30 + 142 + +? + ? + ShortCheck + 3 + ? + +ShortCheck + + +short + InShort + + +short + OutShort + + + +ShortCheck + + + + 11/9/2003 - 14:10:54 + 11/9/2003 - 14:10:54 + 1.04 + ? + ? + InLine Node + 234 + 230 + +? + ? + FloatCheck + 3 + ? + +FloatCheck + + +float + InFloat + + +float + OutFloat + + + +FloatCheck + + + + 11/9/2003 - 14:10:54 + 11/9/2003 - 14:10:54 + 1.04 + ? + ? + InLine Node + 230 + 375 + +AddComponent + AddComponent + Addition + 0 + ? + +Addition + + + +objref + Adder + + + 11/9/2003 - 14:10:54 + 11/9/2003 - 14:10:54 + 1.05 + ? + localhost/FactoryServer + Addition from AddComponent + 232 + 514 + +? + ? + LongCheck + 3 + ? + +LongCheck + + +long + InLong + + +long + OutLong + + + +LongCheck + + + + 11/9/2003 - 14:10:54 + 11/9/2003 - 14:10:54 + 1.05 + ? + ? + InLine Node + 30 + 282 + +? + ? + StringCheck + 3 + ? + +StringCheck + + +string + InString + + +string + OutString + + + +StringCheck + + + + 11/9/2003 - 14:10:54 + 11/9/2003 - 14:10:54 + 1.05 + ? + ? + InLine Node + 30 + 6 + +? + ? + DoubleCheck + 3 + ? + +DoubleCheck + + +double + InDouble + + +double + OutDouble + + + +DoubleCheck + + + + 11/9/2003 - 14:10:54 + 11/9/2003 - 14:10:54 + 1.05 + ? + ? + Compute Node + 23 + 427 + +? + ? + MiscTypes + 3 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVision::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Addre + OutObjRef + + + +MiscTypes + + + 11/9/2003 - 14:10:54 + 11/9/2003 - 14:10:54 + 1.05 + ? + ? + InLine Node + 477 + 231 + + +BoolCheck + OutBool + MiscTypes + InBool + + +446 + 341 + +446 + 172 + +CharCheck + OutChar + MiscTypes + InChar + + +431 + 368 + +431 + 223 + +ShortCheck + OutShort + MiscTypes + InShort + + +415 + 397 + +414 + 310 + +FloatCheck + OutFloat + MiscTypes + InFloat + + +Addition + Adder + MiscTypes + InObjRef + + +462 + 514 + +461 + 593 + +LongCheck + OutLong + MiscTypes + InLong + + +406 + 426 + +405 + 363 + +StringCheck + OutString + MiscTypes + InString + + +462 + 312 + +461 + 87 + +DoubleCheck + OutDouble + MiscTypes + InDouble + + +445 + 485 + +445 + 508 + + +GraphInLinesConvertCheck + BoolCheck\InBool + BoolCheck + InBool + +3 + 1 + + +GraphInLinesConvertCheck + CharCheck\InChar + CharCheck + InChar + +3 + 255 + + +GraphInLinesConvertCheck + ShortCheck\InShort + ShortCheck + InShort + +3 + 16383 + + +GraphInLinesConvertCheck + FloatCheck\InFloat + FloatCheck + InFloat + +7 + 3.14159 + + +GraphInLinesConvertCheck + LongCheck\InLong + LongCheck + InLong + +3 + 1234567890 + + +GraphInLinesConvertCheck + StringCheck\InString + StringCheck + InString + +18 + aString + + +GraphInLinesConvertCheck + DoubleCheck\InDouble + DoubleCheck + InDouble + +7 + 1.23457 + diff --git a/examples/GraphInLinesUnValid.py b/examples/GraphInLinesUnValid.py new file mode 100755 index 0000000..0b08e95 --- /dev/null +++ b/examples/GraphInLinesUnValid.py @@ -0,0 +1,83 @@ + +# Generated python file of Graph GraphInLinesUnValid + +from SuperV import * +# Graph creation +GraphInLinesUnValid = Graph( 'GraphInLinesUnValid' ) +GraphInLinesUnValid.SetName( 'GraphInLinesUnValid' ) +GraphInLinesUnValid.SetAuthor( '' ) +GraphInLinesUnValid.SetComment( '' ) +GraphInLinesUnValid.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyAdd = [] +PyAdd.append( 'def Add(a,b) : ' ) +PyAdd.append( ' return a+b ' ) +PyAdd.append( '' ) +Add = GraphInLinesUnValid.INode( 'Add' , PyAdd ) +Add.InPort( 'a' , 'long' ) +Add.InPort( 'b' , 'long' ) +Add.OutPort( 'f' , 'long' ) +Add.SetName( 'Add' ) +Add.SetAuthor( '' ) +Add.SetComment( 'Python function' ) +Add.Coords( 257 , 13 ) + +PySub = [] +PySub.append( 'def Sub(a,b) : ' ) +PySub.append( ' return a-b ' ) +PySub.append( '' ) +Sub = GraphInLinesUnValid.INode( 'Sub' , PySub ) +Sub.InPort( 'a' , 'long' ) +Sub.InPort( 'b' , 'long' ) +Sub.OutPort( 'f' , 'long' ) +Sub.SetName( 'Sub' ) +Sub.SetAuthor( '' ) +Sub.SetComment( 'Python function' ) +Sub.Coords( 20 , 152 ) + +PyMul = [] +PyMul.append( 'def Mul(a,b) : ' ) +PyMul.append( ' return a*b ' ) +Mul = GraphInLinesUnValid.INode( 'Mul' , PyMul ) +Mul.InPort( 'a' , 'long' ) +Mul.InPort( 'b' , 'long' ) +Mul.OutPort( 'Result' , 'long' ) +Mul.SetName( 'Mul' ) +Mul.SetAuthor( '' ) +Mul.SetComment( 'Python function' ) +Mul.Coords( 469 , 125 ) + +# Creation of Links +Addf = Add.Port( 'f' ) +Mula = GraphInLinesUnValid.Link( Addf , Mul.Port( 'a' ) ) +Mula.AddCoord( 1 , 451 , 205 ) +Mula.AddCoord( 2 , 450 , 93 ) + +Subf = Sub.Port( 'f' ) +Mulb = GraphInLinesUnValid.Link( Subf , Mul.Port( 'b' ) ) + +Addb = GraphInLinesUnValid.Link( Subf , Add.Port( 'b' ) ) +Addb.AddCoord( 1 , 235 , 122 ) +Addb.AddCoord( 2 , 236 , 232 ) + +MulResult = Mul.Port( 'Result' ) +Adda = GraphInLinesUnValid.Link( MulResult , Add.Port( 'a' ) ) +Adda.AddCoord( 1 , 8 , 92 ) +Adda.AddCoord( 2 , 7 , 332 ) +Adda.AddCoord( 3 , 645 , 334 ) +Adda.AddCoord( 4 , 645 , 204 ) + +GraphInLinesUnValid.IsValid() + +# Creation of Output variables +GraphInLinesUnValid.Run() + +GraphInLinesUnValid.IsDone() + +GraphInLinesUnValid.State() + +GraphInLinesUnValid.PrintPorts() + diff --git a/examples/GraphInLinesUnValid.xml b/examples/GraphInLinesUnValid.xml new file mode 100755 index 0000000..43288a4 --- /dev/null +++ b/examples/GraphInLinesUnValid.xml @@ -0,0 +1,199 @@ + + + + +? + ? + GraphInLinesUnValid + 1 + ? + +GraphInLinesUnValid + + +long + Sub\a + +long + Sub\b + + + + 24/3/2003 - 10:58:41 + 8/8/2003 - 15:31:37 + 1.04 + ? + ? + ? + 0 + 0 + + +? + ? + Add + 3 + ? + +Add + + +long + a + +long + b + + +long + f + + + +Add + + + + 8/8/2003 - 15:30:23 + 8/8/2003 - 15:30:23 + 1.04 + ? + ? + Python function + 257 + 13 + +? + ? + Sub + 3 + ? + +Sub + + +long + a + +long + b + + +long + f + + + +Sub + + + + 8/8/2003 - 15:30:23 + 8/8/2003 - 15:30:23 + 1.04 + ? + ? + Python function + 20 + 152 + +? + ? + Mul + 3 + ? + +Mul + + +long + a + +long + b + + +long + Result + + + +Mul + + + 8/8/2003 - 15:30:23 + 8/8/2003 - 15:30:23 + 1.04 + ? + ? + Python function + 469 + 125 + + +Add + f + Mul + a + + +451 + 205 + +450 + 93 + +Sub + f + Mul + b + + +Sub + f + Add + b + + +235 + 122 + +236 + 232 + +Mul + Result + Add + a + + +8 + 92 + +7 + 332 + +645 + 334 + +645 + 204 + + +GraphInLinesUnValid + Sub\a + Sub + a + +3 + 3 + + +GraphInLinesUnValid + Sub\b + Sub + b + +3 + 4 + diff --git a/examples/GraphLoop.py b/examples/GraphLoop.py index 782ac52..8488517 100644 --- a/examples/GraphLoop.py +++ b/examples/GraphLoop.py @@ -13,34 +13,28 @@ GraphLoop.Coords( 0 , 0 ) # Creation of Loop Nodes PyInit = [] -PyInit.append( 'import time' ) PyInit.append( 'def Init(Index,Min,Max,Incr) : ' ) PyInit.append( ' if Min <= Max : ' ) PyInit.append( ' Index = Min ' ) PyInit.append( ' else : ' ) PyInit.append( ' Index = Max ' ) -PyInit.append( ' time.sleep( 1 )' ) PyInit.append( ' return Index,Min,Max,Incr ' ) PyMoreInit = [] -PyMoreInit.append( 'import time' ) PyMoreInit.append( 'def More(Index,Min,Max,Incr) : ' ) PyMoreInit.append( ' if Index < Max : ' ) PyMoreInit.append( ' DoLoop = 1 ' ) PyMoreInit.append( ' else : ' ) PyMoreInit.append( ' DoLoop = 0 ' ) -PyMoreInit.append( ' time.sleep( 1 )' ) PyMoreInit.append( ' return DoLoop,Index,Min,Max,Incr ' ) PyNextInit = [] -PyNextInit.append( 'import time' ) PyNextInit.append( 'def Next(Index,Min,Max,Incr) : ' ) PyNextInit.append( ' Index = Index + Incr ' ) -PyNextInit.append( ' time.sleep( 1 )' ) PyNextInit.append( ' return Index,Min,Max,Incr ' ) Init,EndInit = GraphLoop.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) EndInit.SetName( 'EndInit' ) EndInit.SetAuthor( '' ) EndInit.SetComment( '' ) -EndInit.Coords( 626 , 259 ) +EndInit.Coords( 314 , 91 ) Init.InPort( 'Index' , 'long' ) Init.InPort( 'Min' , 'long' ) Init.InPort( 'Max' , 'long' ) @@ -52,26 +46,25 @@ Init.OutPort( 'Incr' , 'long' ) Init.SetName( 'Init' ) Init.SetAuthor( '' ) Init.SetComment( '' ) -Init.Coords( 17 , 257 ) +Init.Coords( 31 , 74 ) -# Creation of intermediate Output variables and of Control Links -InitDoLoop = Init.Port( 'DoLoop' ) -EndInitDoLoop = GraphLoop.Link( InitDoLoop , EndInit.Port( 'DoLoop' ) ) +# Creation of Links InitIndex = Init.Port( 'Index' ) EndInitIndex = GraphLoop.Link( InitIndex , EndInit.Port( 'Index' ) ) + InitMin = Init.Port( 'Min' ) EndInitMin = GraphLoop.Link( InitMin , EndInit.Port( 'Min' ) ) + InitMax = Init.Port( 'Max' ) EndInitMax = GraphLoop.Link( InitMax , EndInit.Port( 'Max' ) ) + InitIncr = Init.Port( 'Incr' ) EndInitIncr = GraphLoop.Link( InitIncr , EndInit.Port( 'Incr' ) ) -EndInitDoLoop = EndInit.Port( 'DoLoop' ) -InitInitLoop = GraphLoop.Link( EndInitDoLoop , Init.Port( 'InitLoop' ) ) # Creation of Input datas InitIndex = Init.Input( 'Index' , 0) InitMin = Init.Input( 'Min' , 0) -InitMax = Init.Input( 'Max' , 10) +InitMax = Init.Input( 'Max' , 1000) InitIncr = Init.Input( 'Incr' , 1) # Creation of Output variables diff --git a/examples/GraphLoopSwitch.py b/examples/GraphLoopSwitch.py new file mode 100755 index 0000000..c14aad1 --- /dev/null +++ b/examples/GraphLoopSwitch.py @@ -0,0 +1,137 @@ + +# Generated python file of Graph GraphLoopSwitch + +from SuperV import * +# Graph creation +GraphLoopSwitch = Graph( 'GraphLoopSwitch' ) +GraphLoopSwitch.SetName( 'GraphLoopSwitch' ) +GraphLoopSwitch.SetAuthor( '' ) +GraphLoopSwitch.SetComment( '' ) +GraphLoopSwitch.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyIsOdd = [] +PyIsOdd.append( 'from time import * ' ) +PyIsOdd.append( 'def IsOdd(a,Even) : ' ) +PyIsOdd.append( ' print a,"IsOdd (GraphLoopSwitch1)" ' ) +PyIsOdd.append( ' sleep( 1 ) ' ) +PyIsOdd.append( ' return a ' ) +IsOdd = GraphLoopSwitch.INode( 'IsOdd' , PyIsOdd ) +IsOdd.SetName( 'IsOdd' ) +IsOdd.SetAuthor( '' ) +IsOdd.SetComment( 'Python function' ) +IsOdd.Coords( 397 , 1 ) +IsOdd.InPort( 'a' , 'long' ) +IsOdd.InPort( 'Even' , 'boolean' ) +IsOdd.OutPort( 'a' , 'long' ) + +# Creation of Loop Nodes +PyInitLoop = [] +PyInitLoop.append( ' ' ) +PyMoreInitLoop = [] +PyMoreInitLoop.append( ' ' ) +PyNextInitLoop = [] +PyNextInitLoop.append( ' ' ) +InitLoop,EndOfInitLoop = GraphLoopSwitch.LNode( '' , PyInitLoop , '' , PyMoreInitLoop , '' , PyNextInitLoop ) +EndOfInitLoop.SetName( 'EndOfInitLoop' ) +EndOfInitLoop.SetAuthor( '' ) +EndOfInitLoop.SetComment( '' ) +EndOfInitLoop.Coords( 767 , 102 ) +PyEndOfInitLoop = [] +PyEndOfInitLoop.append( 'def EndOfInitLoop( DoLoop , Index , Min , Max ) :' ) +PyEndOfInitLoop.append( ' Index = Index + 1 ' ) +PyEndOfInitLoop.append( ' if Index <= Max : ' ) +PyEndOfInitLoop.append( ' DoLoop = 1 ' ) +PyEndOfInitLoop.append( ' else : ' ) +PyEndOfInitLoop.append( ' DoLoop = 0 ' ) +PyEndOfInitLoop.append( ' return DoLoop,Index,Min,Max ' ) +EndOfInitLoop.SetPyFunction( 'EndOfInitLoop' , PyEndOfInitLoop ) +InitLoop.SetName( 'InitLoop' ) +InitLoop.SetAuthor( '' ) +InitLoop.SetComment( '' ) +InitLoop.Coords( 10 , 108 ) +InitLoop.InPort( 'Index' , 'long' ) +InitLoop.InPort( 'Min' , 'long' ) +InitLoop.InPort( 'Max' , 'long' ) +InitLoop.OutPort( 'Index' , 'long' ) +InitLoop.OutPort( 'Min' , 'long' ) +InitLoop.OutPort( 'Max' , 'long' ) + +# Creation of Switch Nodes +PySwitch = [] +PySwitch.append( 'from time import * ' ) +PySwitch.append( 'def Switch(a) : ' ) +PySwitch.append( ' if ( a & 1 ) == 0 : ' ) +PySwitch.append( ' sleep(1) ' ) +PySwitch.append( ' return a & 1,1-(a&1),a ' ) +Switch,EndSwitch = GraphLoopSwitch.SNode( 'Switch' , PySwitch ) +EndSwitch.SetName( 'EndSwitch' ) +EndSwitch.SetAuthor( '' ) +EndSwitch.SetComment( '' ) +EndSwitch.Coords( 587 , 103 ) +PyEndSwitch = [] +PyEndSwitch.append( 'def EndSwitch(a) : ' ) +PyEndSwitch.append( ' if ( a & 1 ) == 0 : ' ) +PyEndSwitch.append( ' sleep(1) ' ) +PyEndSwitch.append( ' return a ' ) +EndSwitch.SetPyFunction( 'EndSwitch' , PyEndSwitch ) +EndSwitch.InPort( 'a' , 'long' ) +EndSwitch.OutPort( 'a' , 'long' ) +Switch.SetName( 'Switch' ) +Switch.SetAuthor( '' ) +Switch.SetComment( '' ) +Switch.Coords( 194 , 109 ) +Switch.InPort( 'a' , 'long' ) +Switch.OutPort( 'Odd' , 'long' ) +Switch.OutPort( 'Even' , 'int' ) +Switch.OutPort( 'a' , 'int' ) + +# Creation of Links +IsOdda = IsOdd.Port( 'a' ) +EndSwitcha = GraphLoopSwitch.Link( IsOdda , EndSwitch.Port( 'a' ) ) +EndSwitcha.AddCoord( 1 , 576 , 136 ) +EndSwitcha.AddCoord( 2 , 575 , 81 ) + +InitLoopIndex = InitLoop.Port( 'Index' ) +Switcha = GraphLoopSwitch.Link( InitLoopIndex , Switch.Port( 'a' ) ) + +InitLoopMin = InitLoop.Port( 'Min' ) +EndOfInitLoopMin = GraphLoopSwitch.Link( InitLoopMin , EndOfInitLoop.Port( 'Min' ) ) + +InitLoopMax = InitLoop.Port( 'Max' ) +EndOfInitLoopMax = GraphLoopSwitch.Link( InitLoopMax , EndOfInitLoop.Port( 'Max' ) ) + +SwitchOdd = Switch.Port( 'Odd' ) +IsOddInGate = GraphLoopSwitch.Link( SwitchOdd , IsOdd.Port( 'InGate' ) ) + +SwitchEven = Switch.Port( 'Even' ) +EndSwitchDefault = GraphLoopSwitch.Link( SwitchEven , EndSwitch.Port( 'Default' ) ) + +IsOddEven = GraphLoopSwitch.Link( SwitchEven , IsOdd.Port( 'Even' ) ) +IsOddEven.AddCoord( 1 , 375 , 111 ) +IsOddEven.AddCoord( 2 , 375 , 172 ) + +Switcha = Switch.Port( 'a' ) +IsOdda = GraphLoopSwitch.Link( Switcha , IsOdd.Port( 'a' ) ) +IsOdda.AddCoord( 1 , 362 , 82 ) +IsOdda.AddCoord( 2 , 360 , 201 ) + +EndSwitcha = EndSwitch.Port( 'a' ) +EndOfInitLoopIndex = GraphLoopSwitch.Link( EndSwitcha , EndOfInitLoop.Port( 'Index' ) ) + +# Creation of Input datas +InitLoopIndex = InitLoop.Input( 'Index' , 0) +InitLoopMin = InitLoop.Input( 'Min' , 0) +InitLoopMax = InitLoop.Input( 'Max' , 100) + +# Creation of Output variables +EndOfInitLoopIndex = EndOfInitLoop.Port( 'Index' ) +EndOfInitLoopMin = EndOfInitLoop.Port( 'Min' ) +EndOfInitLoopMax = EndOfInitLoop.Port( 'Max' ) + +GraphLoopSwitch.Run() +GraphLoopSwitch.DoneW() +GraphLoopSwitch.State() +GraphLoopSwitch.PrintPorts() diff --git a/examples/GraphLoopSwitch.xml b/examples/GraphLoopSwitch.xml new file mode 100755 index 0000000..a5e717d --- /dev/null +++ b/examples/GraphLoopSwitch.xml @@ -0,0 +1,356 @@ + + + + +? + ? + GraphLoopSwitch + 1 + ? + +GraphLoopSwitch + + +long + InitLoop\Index + +long + InitLoop\Min + +long + InitLoop\Max + + +long + EndOfInitLoop\Index + +long + EndOfInitLoop\Min + +long + EndOfInitLoop\Max + + + 22/10/2003 - 10:36:39 + 22/10/2003 - 10:37:20 + 1.05 + ? + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + +boolean + Even + + +long + a + + + +IsOdd + + + + + + 22/10/2003 - 10:36:39 + 22/10/2003 - 10:36:39 + 1.05 + ? + ? + Python function + 397 + 1 + +? + ? + InitLoop + 4 + EndOfInitLoop + +Loop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +? + + +? + + +? + + 22/10/2003 - 10:36:40 + 22/10/2003 - 10:36:40 + 1.05 + ? + ? + ? + 10 + 108 + +? + ? + EndOfInitLoop + 5 + InitLoop + +EndLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndOfInitLoop + + + + + + + + 22/10/2003 - 10:36:40 + 22/10/2003 - 10:36:40 + 1.05 + ? + ? + ? + 767 + 102 + +? + ? + Switch + 6 + EndSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + + + + + 22/10/2003 - 10:36:59 + 22/10/2003 - 10:36:59 + 1.05 + ? + ? + ? + 194 + 109 + +? + ? + EndSwitch + 7 + Switch + +EndSwitch + + +long + a + + +long + a + + + +EndSwitch + + + + + 22/10/2003 - 10:36:59 + 22/10/2003 - 10:36:59 + 1.05 + ? + ? + ? + 587 + 103 + + +IsOdd + a + EndSwitch + a + + +576 + 136 + +575 + 81 + +InitLoop + DoLoop + EndOfInitLoop + DoLoop + + +InitLoop + Index + Switch + a + + +InitLoop + Min + EndOfInitLoop + Min + + +InitLoop + Max + EndOfInitLoop + Max + + +EndOfInitLoop + DoLoop + InitLoop + InitLoop + + +Switch + Odd + IsOdd + InGate + + +Switch + Even + EndSwitch + Default + + +Switch + Even + IsOdd + Even + + +375 + 111 + +375 + 172 + +Switch + a + IsOdd + a + + +362 + 82 + +360 + 201 + +EndSwitch + a + EndOfInitLoop + Index + + + +GraphLoopSwitch + InitLoop\Index + InitLoop + Index + +3 + 0 + + +GraphLoopSwitch + InitLoop\Min + InitLoop + Min + +3 + 0 + + +GraphLoopSwitch + InitLoop\Max + InitLoop + Max + +3 + 100 + diff --git a/examples/GraphMerge.py b/examples/GraphMerge.py new file mode 100755 index 0000000..ce9b4dd --- /dev/null +++ b/examples/GraphMerge.py @@ -0,0 +1,61 @@ + +# Check the Merge of two graphs + +# Creation of GraphSwitch +from GraphSwitch import * + +# Creation of GraphSwitch1 +from GraphSwitch1 import * + +# Merge of GraphSwitch1 in GraphSwitch +GraphSwitch.Merge( GraphSwitch1 ) + +# Create a variable for each node of GraphSwitch : +# IsOdd,IsOdd_1,InitLoopSwitch,InitLoop,EndOfInitLoopSwitch,EndOfInitLoop,Switch,Switch_1,EndOfSwitch,EndSwitch +exec GraphSwitch.ListNodes() + +# Print Input and Output Ports values of InitLoopSwitch +InitLoopSwitch.PrintPorts() + +# Print Input and Output Ports values of InitLoop +InitLoop.PrintPorts() + +# Print Input and Output Ports values of GraphSwitch +GraphSwitch.PrintPorts() + +# Start asynchronous execution of GraphSwitch +GraphSwitch.Run() + +# Wait for completion of GraphSwitch +GraphSwitch.DoneW() + +# Print the state of GraphSwitch +GraphSwitch.State() + +# Print the results of GraphSwitch +GraphSwitch.PrintPorts() + +# Start asynchronous execution of GraphSwitch +GraphSwitch.Run() + +# Start asynchronous execution of GraphSwitch1 (parallel to the execution of GraphSwitch) +GraphSwitch1.Run() + +# Wait for completion of GraphSwitch1 +GraphSwitch1.DoneW() + +# Print the state of GraphSwitch1 +GraphSwitch.State() + +# Wait for completion of GraphSwitch +GraphSwitch.DoneW() + +# Print the state of GraphSwitch +GraphSwitch.State() + +# Print the results of GraphSwitch +GraphSwitch.PrintPorts() + +# Print the results of GraphSwitch1 +GraphSwitch1.PrintPorts() + diff --git a/examples/GraphMerge1.py b/examples/GraphMerge1.py new file mode 100755 index 0000000..8ab8fea --- /dev/null +++ b/examples/GraphMerge1.py @@ -0,0 +1,54 @@ + +# Check the Merge of two graphs and python functions definitions + +# Creation of GraphSwitch +from GraphSwitch import * + +# Creation of GraphSwitch1 +from GraphSwitch1 import * + +# Merge of GraphSwitch1 in GraphSwitch +GraphSwitch.Merge( GraphSwitch1 ) + +# Create a variable for each node of GraphSwitch : +# IsOdd,IsOdd_1,InitLoopSwitch,InitLoop,EndOfInitLoopSwitch,EndOfInitLoop,Switch,Switch_1,EndOfSwitch,EndSwitch +exec GraphSwitch.ListNodes() + +funcname = InitLoopSwitch.PyInitName() +funcname1 = InitLoop.PyInitName() +print "Init python function names of InitLoopSwitch and InitLoop :",funcname,funcname1 +InitLoop.PyInit() +# Erase python functions of InitLoop +InitLoop.SetPyInit( funcname , [] ) +InitLoop.PyInit() +InitLoop.SetPyMore( InitLoop.PyMoreName() , [] ) +InitLoop.PyMore() +InitLoop.SetPyNext( InitLoop.PyNextName() , [] ) +InitLoop.PyNext() + +IsOdd.SetPyFunction( IsOdd.PyFuncName() , [] ) +IsOdd.PyFunction() + +# Print Input and Output Ports values of InitLoopSwitch +InitLoopSwitch.PrintPorts() + +# Print Input and Output Ports values of InitLoop +InitLoop.PrintPorts() + +# Print Input and Output Ports values of GraphSwitch +GraphSwitch.PrintPorts() + +# Start asynchronous execution of GraphSwitch +GraphSwitch.Run() + +# Wait for completion of GraphSwitch +GraphSwitch.DoneW() + +# Print the state of GraphSwitch +GraphSwitch.State() + +# Print the results of GraphSwitch +GraphSwitch.PrintPorts() + +GraphSwitch.Export( "../GraphPyFunctions.xml" ) + diff --git a/examples/GraphObjRef.py b/examples/GraphObjRef.py new file mode 100755 index 0000000..8a2c2d7 --- /dev/null +++ b/examples/GraphObjRef.py @@ -0,0 +1,110 @@ + +# Generated python file of Graph GraphObjRef + +from SuperV import * +# Graph creation +GraphObjRef = Graph( 'GraphObjRef' ) +GraphObjRef.SetName( 'GraphObjRef' ) +GraphObjRef.SetAuthor( '' ) +GraphObjRef.SetComment( '' ) +GraphObjRef.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +Addition = GraphObjRef.FNode( 'AddComponent' , 'AddComponent' , 'Addition' ) +Addition.SetName( 'Addition' ) +Addition.SetAuthor( '' ) +Addition.SetContainer( 'localhost/AdditionServer' ) +Addition.SetComment( 'Addition from AddComponent' ) +Addition.Coords( 10 , 15 ) + +# Creation of InLine Nodes +PySyrComponent = [] +PySyrComponent.append( 'from LifeCycleCORBA import * ' ) +PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) : ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' ) +PySyrComponent.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) +PySyrComponent.append( ' print "SyrComponent orb",orb ' ) +PySyrComponent.append( ' lcc = LifeCycleCORBA(orb) ' ) +PySyrComponent.append( ' print "SyrComponent lcc",lcc ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,")" ' ) +PySyrComponent.append( ' ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent ) ' ) +PySyrComponent.append( ' print "SyrComponent(",aContainer,",",aComponent,") --> ",ComponentRef ' ) +PySyrComponent.append( ' return ComponentRef ' ) +PySyrComponent.append( '' ) +SyrComponent = GraphObjRef.INode( 'SyrComponent' , PySyrComponent ) +SyrComponent.InPort( 'aContainer' , 'string' ) +SyrComponent.InPort( 'aComponent' , 'string' ) +SyrComponent.OutPort( 'anObjRef' , 'objref' ) +SyrComponent.SetName( 'SyrComponent' ) +SyrComponent.SetAuthor( '' ) +SyrComponent.SetComment( 'Compute Node' ) +SyrComponent.Coords( 26 , 209 ) + +# Creation of Loop Nodes +PyInit = [] +PyInit.append( 'def Init( Adder , anObjRef , Index ) : ' ) +PyInit.append( ' return Adder,anObjRef,0 ' ) +PyInit.append( '' ) +PyMoreInit = [] +PyMoreInit.append( 'def More( Adder , anObjRef , Index ) : ' ) +PyMoreInit.append( ' OutLoop = 0 ' ) +PyMoreInit.append( ' if 10 > Index : ' ) +PyMoreInit.append( ' OutLoop = 1 ' ) +PyMoreInit.append( ' return OutLoop,Adder,anObjRef,Index ' ) +PyMoreInit.append( '' ) +PyNextInit = [] +PyNextInit.append( 'def Nextfori( Adder , anObjRef , Index ) : ' ) +PyNextInit.append( ' Index = Index + 1 ' ) +PyNextInit.append( ' return Adder,anObjRef,Index ' ) +PyNextInit.append( '' ) +Init,EndInit = GraphObjRef.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Nextfori' , PyNextInit ) +EndInit.SetName( 'EndInit' ) +EndInit.SetAuthor( '' ) +EndInit.SetComment( '' ) +EndInit.Coords( 441 , 177 ) +Init.InPort( 'Addder' , 'objref' ) +Init.InPort( 'anObjRef' , 'objref' ) +Init.InPort( 'Index' , 'long' ) +Init.OutPort( 'Addder' , 'objref' ) +Init.OutPort( 'anObjRef' , 'objref' ) +Init.OutPort( 'Index' , 'long' ) +Init.SetName( 'Init' ) +Init.SetAuthor( '' ) +Init.SetComment( '' ) +Init.Coords( 236 , 161 ) + +# Creation of Links +AdditionAdder = Addition.Port( 'Adder' ) +InitAddder = GraphObjRef.Link( AdditionAdder , Init.Port( 'Addder' ) ) +InitAddder.AddCoord( 1 , 202 , 194 ) +InitAddder.AddCoord( 2 , 201 , 95 ) + +SyrComponentanObjRef = SyrComponent.Port( 'anObjRef' ) +InitanObjRef = GraphObjRef.Link( SyrComponentanObjRef , Init.Port( 'anObjRef' ) ) +InitanObjRef.AddCoord( 1 , 209 , 224 ) +InitanObjRef.AddCoord( 2 , 208 , 289 ) + +InitAddder = Init.Port( 'Addder' ) +EndInitAddder = GraphObjRef.Link( InitAddder , EndInit.Port( 'Addder' ) ) + +InitanObjRef = Init.Port( 'anObjRef' ) +EndInitanObjRef = GraphObjRef.Link( InitanObjRef , EndInit.Port( 'anObjRef' ) ) + +InitIndex = Init.Port( 'Index' ) +EndInitIndex = GraphObjRef.Link( InitIndex , EndInit.Port( 'Index' ) ) + +# Creation of Input datas +SyrComponentaContainer = SyrComponent.Input( 'aContainer' , 'FactoryServer') +SyrComponentaComponent = SyrComponent.Input( 'aComponent' , 'SyrComponent') +InitIndex = Init.Input( 'Index' , 0) + +# Creation of Output variables +EndInitAddder = EndInit.Port( 'Addder' ) +EndInitanObjRef = EndInit.Port( 'anObjRef' ) +EndInitIndex = EndInit.Port( 'Index' ) + +GraphObjRef.Run() +GraphObjRef.DoneW() +GraphObjRef.State() +GraphObjRef.PrintPorts() diff --git a/examples/GraphObjRef.xml b/examples/GraphObjRef.xml new file mode 100755 index 0000000..7350c0d --- /dev/null +++ b/examples/GraphObjRef.xml @@ -0,0 +1,287 @@ + + + + +? + ? + GraphObjRef + 1 + ? + +GraphObjRef + + +string + SyrComponent\aContainer + +string + SyrComponent\aComponent + +long + Init\Index + + +objref + EndInit\Addder + +objref + EndInit\anObjRef + +long + EndInit\Index + + + 1/7/2003 - 19:4:59 + 18/9/2003 - 17:38:33 + 1.04 + ? + ? + ? + 0 + 0 + + +AddComponent + AddComponent + Addition + 0 + ? + +Addition + + + +Adder + Adder + + + 18/9/2003 - 17:38:33 + 18/9/2003 - 17:38:33 + 1.04 + ? + localhost/AdditionServer + Addition from AddComponent + 10 + 15 + +? + ? + SyrComponent + 3 + ? + +SyrComponent + + +string + aContainer + +string + aComponent + + +objref + anObjRef + + + +SyrComponent + + + + + + + + + + ",ComponentRef ]]> + + + 18/9/2003 - 17:38:33 + 18/9/2003 - 17:38:33 + 1.04 + ? + ? + Compute Node + 26 + 209 + +? + ? + Init + 4 + EndInit + +Init + + +objref + Addder + +objref + anObjRef + +long + Index + + +objref + Addder + +objref + anObjRef + +long + Index + + + +Init + + + + +More + + + Index : ]]> + + + + +Nextfori + + + + + 18/9/2003 - 17:38:33 + 18/9/2003 - 17:38:33 + 1.04 + ? + ? + ? + 236 + 161 + +? + ? + EndInit + 5 + Init + +EndInit + + +objref + Addder + +objref + anObjRef + +long + Index + + +objref + Addder + +objref + anObjRef + +long + Index + + + + 18/9/2003 - 17:38:33 + 18/9/2003 - 17:38:33 + 1.04 + ? + ? + ? + 441 + 177 + + +Addition + Adder + Init + Addder + + +202 + 194 + +201 + 95 + +SyrComponent + anObjRef + Init + anObjRef + + +209 + 224 + +208 + 289 + +Init + DoLoop + EndInit + DoLoop + + +Init + Addder + EndInit + Addder + + +Init + anObjRef + EndInit + anObjRef + + +Init + Index + EndInit + Index + + +EndInit + DoLoop + Init + InitLoop + + + +GraphObjRef + SyrComponent\aContainer + SyrComponent + aContainer + +18 + FactoryServer + + +GraphObjRef + SyrComponent\aComponent + SyrComponent + aComponent + +18 + SyrComponent + + +GraphObjRef + Init\Index + Init + Index + +3 + 0 + diff --git a/examples/GraphPyFunctions.py b/examples/GraphPyFunctions.py new file mode 100755 index 0000000..ddd184e --- /dev/null +++ b/examples/GraphPyFunctions.py @@ -0,0 +1,217 @@ + +# Generated python file of Graph GraphSwitch + +from SuperV import * +# Graph creation +GraphPyFunctions = Graph( 'GraphPyFunctions' ) +GraphPyFunctions.SetName( 'GraphPyFunctions' ) +GraphPyFunctions.SetAuthor( '' ) +GraphPyFunctions.SetComment( '' ) +GraphPyFunctions.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyIsOdd = [] +IsOdd = GraphPyFunctions.INode( 'IsOdd' , PyIsOdd ) +IsOdd.SetName( 'IsOdd' ) +IsOdd.SetAuthor( '' ) +IsOdd.SetComment( 'Python function' ) +IsOdd.Coords( 388 , 50 ) +IsOdd.InPort( 'a' , 'long' ) +IsOdd.OutPort( 'a' , 'long' ) + +PyIsOdd_1 = [] +PyIsOdd_1.append( 'from time import * ' ) +PyIsOdd_1.append( 'def IsOdd(a) : ' ) +PyIsOdd_1.append( ' print a,"IsOdd" ' ) +PyIsOdd_1.append( ' sleep( 1 ) ' ) +PyIsOdd_1.append( ' return a ' ) +IsOdd_1 = GraphPyFunctions.INode( 'IsOdd' , PyIsOdd_1 ) +IsOdd_1.SetName( 'IsOdd_1' ) +IsOdd_1.SetAuthor( '' ) +IsOdd_1.SetComment( 'Python function' ) +IsOdd_1.Coords( 391 , 288 ) +IsOdd_1.InPort( 'a' , 'long' ) +IsOdd_1.OutPort( 'a' , 'long' ) + +# Creation of Loop Nodes +PyInitLoop = [] +PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' ) +PyInitLoop.append( ' return Index,Min,Max ' ) +PyMoreInitLoop = [] +PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' ) +PyMoreInitLoop.append( ' if Index <= Max : ' ) +PyMoreInitLoop.append( ' DoLoop = 1 ' ) +PyMoreInitLoop.append( ' else : ' ) +PyMoreInitLoop.append( ' DoLoop = 0 ' ) +PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' ) +PyNextInitLoop = [] +PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' ) +PyNextInitLoop.append( ' Index = Index + 1 ' ) +PyNextInitLoop.append( ' return Index,Min,Max ' ) +InitLoop,EndOfInitLoop = GraphPyFunctions.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop ) +EndOfInitLoop.SetName( 'EndOfInitLoop' ) +EndOfInitLoop.SetAuthor( '' ) +EndOfInitLoop.SetComment( '' ) +EndOfInitLoop.Coords( 766 , 127 ) +PyEndOfInitLoop = [] +EndOfInitLoop.SetPyFunction( 'EndInitLoop' , PyEndOfInitLoop ) +InitLoop.SetName( 'InitLoop' ) +InitLoop.SetAuthor( '' ) +InitLoop.SetComment( '' ) +InitLoop.Coords( 10 , 129 ) +InitLoop.InPort( 'Index' , 'long' ) +InitLoop.InPort( 'Min' , 'long' ) +InitLoop.InPort( 'Max' , 'long' ) +InitLoop.OutPort( 'Index' , 'long' ) +InitLoop.OutPort( 'Min' , 'long' ) +InitLoop.OutPort( 'Max' , 'long' ) + +PyInitLoop_1 = [] +PyMoreInitLoop_1 = [] +PyMoreInitLoop_1.append( '' ) +PyNextInitLoop_1 = [] +PyNextInitLoop_1.append( '' ) +InitLoop_1,EndOfInitLoop_1 = GraphPyFunctions.LNode( 'InitLoop' , PyInitLoop_1 , 'MoreLoop' , PyMoreInitLoop_1 , 'NextLoop' , PyNextInitLoop_1 ) +EndOfInitLoop_1.SetName( 'EndOfInitLoop_1' ) +EndOfInitLoop_1.SetAuthor( '' ) +EndOfInitLoop_1.SetComment( '' ) +EndOfInitLoop_1.Coords( 784 , 361 ) +PyEndOfInitLoop_1 = [] +EndOfInitLoop_1.SetPyFunction( 'EndInitLoop' , PyEndOfInitLoop_1 ) +InitLoop_1.SetName( 'InitLoop_1' ) +InitLoop_1.SetAuthor( '' ) +InitLoop_1.SetComment( '' ) +InitLoop_1.Coords( 12 , 369 ) +InitLoop_1.InPort( 'Index' , 'long' ) +InitLoop_1.InPort( 'Min' , 'long' ) +InitLoop_1.InPort( 'Max' , 'long' ) +InitLoop_1.OutPort( 'Index' , 'long' ) +InitLoop_1.OutPort( 'Min' , 'long' ) +InitLoop_1.OutPort( 'Max' , 'long' ) + +# Creation of Switch Nodes +PySwitch = [] +Switch,EndOfSwitch = GraphPyFunctions.SNode( 'Switch' , PySwitch ) +EndOfSwitch.SetName( 'EndOfSwitch' ) +EndOfSwitch.SetAuthor( '' ) +EndOfSwitch.SetComment( '' ) +EndOfSwitch.Coords( 587 , 126 ) +PyEndOfSwitch = [] +EndOfSwitch.SetPyFunction( 'EndOfSwitch_1' , PyEndOfSwitch ) +EndOfSwitch.InPort( 'a' , 'long' ) +EndOfSwitch.OutPort( 'a' , 'long' ) +Switch.SetName( 'Switch' ) +Switch.SetAuthor( '' ) +Switch.SetComment( '' ) +Switch.Coords( 186 , 130 ) +Switch.InPort( 'a' , 'long' ) +Switch.OutPort( 'Odd' , 'long' ) +Switch.OutPort( 'Even' , 'int' ) +Switch.OutPort( 'a' , 'int' ) + +PySwitch_1 = [] +PySwitch_1.append( 'from time import * ' ) +PySwitch_1.append( 'def Switch(a) : ' ) +PySwitch_1.append( ' if ( a & 1 ) == 0 : ' ) +PySwitch_1.append( ' sleep(1) ' ) +PySwitch_1.append( ' return a & 1,1-(a&1),a ' ) +Switch_1,EndOfSwitch_1 = GraphPyFunctions.SNode( 'Switch' , PySwitch_1 ) +EndOfSwitch_1.SetName( 'EndOfSwitch_1' ) +EndOfSwitch_1.SetAuthor( '' ) +EndOfSwitch_1.SetComment( '' ) +EndOfSwitch_1.Coords( 594 , 362 ) +PyEndOfSwitch_1 = [] +EndOfSwitch_1.SetPyFunction( 'EndOfSwitch_1' , PyEndOfSwitch_1 ) +EndOfSwitch_1.InPort( 'a' , 'long' ) +EndOfSwitch_1.OutPort( 'a' , 'long' ) +Switch_1.SetName( 'Switch_1' ) +Switch_1.SetAuthor( '' ) +Switch_1.SetComment( '' ) +Switch_1.Coords( 185 , 368 ) +Switch_1.InPort( 'a' , 'long' ) +Switch_1.OutPort( 'Odd' , 'long' ) +Switch_1.OutPort( 'Even' , 'int' ) +Switch_1.OutPort( 'a' , 'int' ) + +# Creation of Links +IsOdda = IsOdd.Port( 'a' ) +EndOfSwitcha = GraphPyFunctions.Link( IsOdda , EndOfSwitch.Port( 'a' ) ) +EndOfSwitcha.AddCoord( 1 , 571 , 160 ) +EndOfSwitcha.AddCoord( 2 , 571 , 129 ) + +InitLoopIndex = InitLoop.Port( 'Index' ) +Switcha = GraphPyFunctions.Link( InitLoopIndex , Switch.Port( 'a' ) ) + +InitLoopMin = InitLoop.Port( 'Min' ) +EndOfInitLoopMin = GraphPyFunctions.Link( InitLoopMin , EndOfInitLoop.Port( 'Min' ) ) + +InitLoopMax = InitLoop.Port( 'Max' ) +EndOfInitLoopMax = GraphPyFunctions.Link( InitLoopMax , EndOfInitLoop.Port( 'Max' ) ) + +SwitchOdd = Switch.Port( 'Odd' ) +IsOddInGate = GraphPyFunctions.Link( SwitchOdd , IsOdd.Port( 'InGate' ) ) + +Switcha = Switch.Port( 'a' ) +IsOdda = GraphPyFunctions.Link( Switcha , IsOdd.Port( 'a' ) ) +IsOdda.AddCoord( 1 , 366 , 131 ) +IsOdda.AddCoord( 2 , 365 , 223 ) + +SwitchDefault = Switch.Port( 'Default' ) +EndOfSwitchDefault = GraphPyFunctions.Link( SwitchDefault , EndOfSwitch.Port( 'Default' ) ) +EndOfSwitchDefault.AddCoord( 1 , 572 , 194 ) +EndOfSwitchDefault.AddCoord( 2 , 571 , 257 ) + +EndOfSwitcha = EndOfSwitch.Port( 'a' ) +EndOfInitLoopIndex = GraphPyFunctions.Link( EndOfSwitcha , EndOfInitLoop.Port( 'Index' ) ) + +IsOdd_1a = IsOdd_1.Port( 'a' ) +EndOfSwitch_1a = GraphPyFunctions.Link( IsOdd_1a , EndOfSwitch_1.Port( 'a' ) ) +EndOfSwitch_1a.AddCoord( 1 , 580 , 396 ) +EndOfSwitch_1a.AddCoord( 2 , 580 , 368 ) + +InitLoop_1Index = InitLoop_1.Port( 'Index' ) +Switch_1a = GraphPyFunctions.Link( InitLoop_1Index , Switch_1.Port( 'a' ) ) + +InitLoop_1Min = InitLoop_1.Port( 'Min' ) +EndOfInitLoop_1Min = GraphPyFunctions.Link( InitLoop_1Min , EndOfInitLoop_1.Port( 'Min' ) ) + +InitLoop_1Max = InitLoop_1.Port( 'Max' ) +EndOfInitLoop_1Max = GraphPyFunctions.Link( InitLoop_1Max , EndOfInitLoop_1.Port( 'Max' ) ) + +Switch_1Odd = Switch_1.Port( 'Odd' ) +IsOdd_1InGate = GraphPyFunctions.Link( Switch_1Odd , IsOdd_1.Port( 'InGate' ) ) + +Switch_1Even = Switch_1.Port( 'Even' ) +EndOfSwitch_1Default = GraphPyFunctions.Link( Switch_1Even , EndOfSwitch_1.Port( 'Default' ) ) + +Switch_1a = Switch_1.Port( 'a' ) +IsOdd_1a = GraphPyFunctions.Link( Switch_1a , IsOdd_1.Port( 'a' ) ) +IsOdd_1a.AddCoord( 1 , 368 , 368 ) +IsOdd_1a.AddCoord( 2 , 367 , 460 ) + +EndOfSwitch_1a = EndOfSwitch_1.Port( 'a' ) +EndOfInitLoop_1Index = GraphPyFunctions.Link( EndOfSwitch_1a , EndOfInitLoop_1.Port( 'Index' ) ) + +# Creation of Input datas +InitLoopIndex = InitLoop.Input( 'Index' , 0) +InitLoopMin = InitLoop.Input( 'Min' , 0) +InitLoopMax = InitLoop.Input( 'Max' , 100) +InitLoop_1Index = InitLoop_1.Input( 'Index' , 0) +InitLoop_1Min = InitLoop_1.Input( 'Min' , 0) +InitLoop_1Max = InitLoop_1.Input( 'Max' , 100) + +# Creation of Output variables +EndOfInitLoopIndex = EndOfInitLoop.Port( 'Index' ) +EndOfInitLoopMin = EndOfInitLoop.Port( 'Min' ) +EndOfInitLoopMax = EndOfInitLoop.Port( 'Max' ) +SwitchEven = Switch.Port( 'Even' ) +EndOfInitLoop_1Index = EndOfInitLoop_1.Port( 'Index' ) +EndOfInitLoop_1Min = EndOfInitLoop_1.Port( 'Min' ) +EndOfInitLoop_1Max = EndOfInitLoop_1.Port( 'Max' ) + +GraphPyFunctions.Run() +GraphPyFunctions.DoneW() +GraphPyFunctions.State() +GraphPyFunctions.PrintPorts() diff --git a/examples/GraphPyFunctions.xml b/examples/GraphPyFunctions.xml new file mode 100755 index 0000000..d99958d --- /dev/null +++ b/examples/GraphPyFunctions.xml @@ -0,0 +1,647 @@ + + + + +? + ? + GraphPyFunctions + 1 + ? + +GraphPyFunctions + + +long + InitLoop\Index + +long + InitLoop\Min + +long + InitLoop\Max + +long + InitLoop_1\Index + +long + InitLoop_1\Min + +long + InitLoop_1\Max + + +long + EndOfInitLoop\Index + +long + EndOfInitLoop\Min + +long + EndOfInitLoop\Max + +long + EndOfInitLoop_1\Index + +long + EndOfInitLoop_1\Min + +long + EndOfInitLoop_1\Max + +int + Switch\Even + + + 23/10/2003 - 17:46:20 + 23/10/2003 - 17:47:28 + 1.05 + ? + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + 23/10/2003 - 17:46:20 + 23/10/2003 - 17:46:20 + 1.05 + ? + ? + Python function + 388 + 50 + +? + ? + IsOdd_1 + 3 + ? + +IsOdd_1 + + +long + a + + +long + a + + + +IsOdd + + + + + + 23/10/2003 - 17:46:21 + 23/10/2003 - 17:46:21 + 1.05 + ? + ? + Python function + 391 + 288 + +? + ? + InitLoop + 4 + EndOfInitLoop + +InitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 23/10/2003 - 17:46:23 + 23/10/2003 - 17:46:23 + 1.05 + ? + ? + ? + 10 + 129 + +? + ? + EndOfInitLoop + 5 + InitLoop + +EndInitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndInitLoop + + 23/10/2003 - 17:46:23 + 23/10/2003 - 17:46:23 + 1.05 + ? + ? + ? + 766 + 127 + +? + ? + InitLoop_1 + 4 + EndOfInitLoop_1 + +InitLoop_1 + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + +MoreLoop + + +NextLoop + + 23/10/2003 - 17:46:24 + 23/10/2003 - 17:46:24 + 1.05 + ? + ? + ? + 12 + 369 + +? + ? + EndOfInitLoop_1 + 5 + InitLoop_1 + +EndInitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +EndInitLoop + + 23/10/2003 - 17:46:24 + 23/10/2003 - 17:46:24 + 1.05 + ? + ? + ? + 784 + 361 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + 23/10/2003 - 17:46:26 + 23/10/2003 - 17:46:26 + 1.05 + ? + ? + ? + 186 + 130 + +? + ? + EndOfSwitch + 7 + Switch + +EndSwitch + + +long + a + + +long + a + + + +EndOfSwitch_1 + + 23/10/2003 - 17:46:26 + 23/10/2003 - 17:46:26 + 1.05 + ? + ? + ? + 587 + 126 + +? + ? + Switch_1 + 6 + EndOfSwitch_1 + +Switch_1 + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + + + + + 23/10/2003 - 17:46:27 + 23/10/2003 - 17:46:27 + 1.05 + ? + ? + ? + 185 + 368 + +? + ? + EndOfSwitch_1 + 7 + Switch_1 + +EndSwitch + + +long + a + + +long + a + + + +EndOfSwitch_1 + + 23/10/2003 - 17:46:27 + 23/10/2003 - 17:46:27 + 1.05 + ? + ? + ? + 594 + 362 + + +IsOdd + a + EndOfSwitch + a + + +571 + 160 + +571 + 129 + +IsOdd_1 + a + EndOfSwitch_1 + a + + +580 + 396 + +580 + 368 + +InitLoop + DoLoop + EndOfInitLoop + DoLoop + + +InitLoop + Index + Switch + a + + +InitLoop + Min + EndOfInitLoop + Min + + +InitLoop + Max + EndOfInitLoop + Max + + +EndOfInitLoop + DoLoop + InitLoop + InitLoop + + +InitLoop_1 + DoLoop + EndOfInitLoop_1 + DoLoop + + +InitLoop_1 + Index + Switch_1 + a + + +InitLoop_1 + Min + EndOfInitLoop_1 + Min + + +InitLoop_1 + Max + EndOfInitLoop_1 + Max + + +EndOfInitLoop_1 + DoLoop + InitLoop_1 + InitLoop + + +Switch + Odd + IsOdd + InGate + + +Switch + a + IsOdd + a + + +366 + 131 + +365 + 223 + +Switch + Default + EndOfSwitch + Default + + +572 + 194 + +571 + 257 + +EndOfSwitch + a + EndOfInitLoop + Index + + +Switch_1 + Odd + IsOdd_1 + InGate + + +Switch_1 + Even + EndOfSwitch_1 + Default + + +Switch_1 + a + IsOdd_1 + a + + +368 + 368 + +367 + 460 + +EndOfSwitch_1 + a + EndOfInitLoop_1 + Index + + + +GraphPyFunctions + InitLoop\Index + InitLoop + Index + +3 + 0 + + +GraphPyFunctions + InitLoop\Min + InitLoop + Min + +3 + 0 + + +GraphPyFunctions + InitLoop\Max + InitLoop + Max + +3 + 100 + + +GraphPyFunctions + InitLoop_1\Index + InitLoop_1 + Index + +3 + 0 + + +GraphPyFunctions + InitLoop_1\Min + InitLoop_1 + Min + +3 + 0 + + +GraphPyFunctions + InitLoop_1\Max + InitLoop_1 + Max + +3 + 100 + diff --git a/examples/GraphRunSyr.py b/examples/GraphRunSyr.py index 44df2e7..922833b 100644 --- a/examples/GraphRunSyr.py +++ b/examples/GraphRunSyr.py @@ -1,3 +1,9 @@ +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# +# +# File : GraphRunSyr.py +# Module : SuperVisionTest from SuperV import * diff --git a/examples/GraphStream.py b/examples/GraphStream.py new file mode 100644 index 0000000..8edec6f --- /dev/null +++ b/examples/GraphStream.py @@ -0,0 +1,221 @@ + +# Generated python file of Graph GraphStream + +from SuperV import * +# Graph creation +GraphStream = StreamGraph( 'GraphStream' ) +GraphStream.SetStreamParams( 0 , SUPERV.WithoutTrace , 0 ) +GraphStream.SetName( 'GraphStream' ) +GraphStream.SetAuthor( '' ) +GraphStream.SetComment( 'Test of DataStreamPorts in FactoryNodes' ) +GraphStream.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +NewDataStream = GraphStream.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'NewDataStream' ) +NewDataStream.SetName( 'NewDataStream' ) +NewDataStream.SetAuthor( '' ) +NewDataStream.SetContainer( 'FactoryServer' ) +NewDataStream.SetComment( 'NewDataStream from DataStreamFactory' ) +NewDataStream.Coords( 4 , 10 ) +INewDataStreamGate = NewDataStream.GetInPort( 'Gate' ) +ONewDataStreamDataStream = NewDataStream.GetOutPort( 'DataStream' ) +ONewDataStreamGate = NewDataStream.GetOutPort( 'Gate' ) + +Add = GraphStream.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Add' ) +Add.SetName( 'Add' ) +Add.SetAuthor( '' ) +Add.SetContainer( 'FactoryServer' ) +Add.SetComment( 'Add from DataStreamFactory from DataStreamComponent' ) +Add.Coords( 6 , 370 ) +IAddx = Add.GetInPort( 'x' ) +IAddy = Add.GetInPort( 'y' ) +IAddGate = Add.GetInPort( 'Gate' ) +OAddz = Add.GetOutPort( 'z' ) +OAddGate = Add.GetOutPort( 'Gate' ) +IAddistream = Add.GetInStreamPort( 'istream' ) +IAddistream.SetParams( SUPERV.SCHENULL , SUPERV.INTERNULL , SUPERV.EXTRANULL ) +OAddostream = Add.GetOutStreamPort( 'ostream' ) +OAddostream.SetNumberOfValues( 0 ) +OAddOStream = Add.GetOutStreamPort( 'OStream' ) +OAddOStream.SetNumberOfValues( 0 ) + +Sub = GraphStream.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Sub' ) +Sub.SetName( 'Sub' ) +Sub.SetAuthor( '' ) +Sub.SetContainer( 'FactoryServer' ) +Sub.SetComment( 'Sub from DataStreamFactory from DataStreamComponent' ) +Sub.Coords( 234 , 216 ) +ISubx = Sub.GetInPort( 'x' ) +ISuby = Sub.GetInPort( 'y' ) +ISubGate = Sub.GetInPort( 'Gate' ) +OSubz = Sub.GetOutPort( 'z' ) +OSubGate = Sub.GetOutPort( 'Gate' ) +ISubistream = Sub.GetInStreamPort( 'istream' ) +ISubistream.SetParams( SUPERV.SCHENULL , SUPERV.INTERNULL , SUPERV.EXTRANULL ) +ISubIstream = Sub.GetInStreamPort( 'Istream' ) +ISubIstream.SetParams( SUPERV.SCHENULL , SUPERV.INTERNULL , SUPERV.EXTRANULL ) + +Mul = GraphStream.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Mul' ) +Mul.SetName( 'Mul' ) +Mul.SetAuthor( '' ) +Mul.SetContainer( 'FactoryServer' ) +Mul.SetComment( 'Mul from DataStreamFactory from DataStreamComponent' ) +Mul.Coords( 448 , 342 ) +IMulx = Mul.GetInPort( 'x' ) +IMuly = Mul.GetInPort( 'y' ) +IMulGate = Mul.GetInPort( 'Gate' ) +OMulz = Mul.GetOutPort( 'z' ) +OMulGate = Mul.GetOutPort( 'Gate' ) + +Div = GraphStream.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Div' ) +Div.SetName( 'Div' ) +Div.SetAuthor( '' ) +Div.SetContainer( 'FactoryServer' ) +Div.SetComment( 'Div from DataStreamFactory from DataStreamComponent' ) +Div.Coords( 678 , 214 ) +IDivx = Div.GetInPort( 'x' ) +IDivy = Div.GetInPort( 'y' ) +IDivGate = Div.GetInPort( 'Gate' ) +ODivz = Div.GetOutPort( 'z' ) +ODivGate = Div.GetOutPort( 'Gate' ) +ODivostream = Div.GetOutStreamPort( 'ostream' ) +ODivostream.SetNumberOfValues( 0 ) + +# Creation of Computing Nodes +StreamAdd_ServiceinParameter = [] +StreamAdd_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'objref' , 'this' ) ) +StreamAdd_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'long' , 'x' ) ) +StreamAdd_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'long' , 'y' ) ) +StreamAdd_ServiceoutParameter = [] +StreamAdd_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'long' , 'z' ) ) +StreamAdd_ServiceinStreamParameter = [] +StreamAdd_ServiceinStreamParameter.append( SALOME_ModuleCatalog.ServicesDataStreamParameter( SALOME_ModuleCatalog.DATASTREAM_INTEGER , 'istream' , SALOME_ModuleCatalog.DATASTREAM_ITERATIVE ) ) +StreamAdd_ServiceoutStreamParameter = [] +StreamAdd_ServiceoutStreamParameter.append( SALOME_ModuleCatalog.ServicesDataStreamParameter( SALOME_ModuleCatalog.DATASTREAM_INTEGER , 'ostream' , SALOME_ModuleCatalog.DATASTREAM_ITERATIVE ) ) +StreamAdd_ServiceoutStreamParameter.append( SALOME_ModuleCatalog.ServicesDataStreamParameter( SALOME_ModuleCatalog.DATASTREAM_INTEGER , 'OStream' , SALOME_ModuleCatalog.DATASTREAM_ITERATIVE ) ) +StreamAdd_Service = SALOME_ModuleCatalog.Service( 'StreamAdd' , StreamAdd_ServiceinParameter , StreamAdd_ServiceoutParameter , StreamAdd_ServiceinStreamParameter , StreamAdd_ServiceoutStreamParameter , 0 , 0 ) +StreamAdd = GraphStream.CNode( StreamAdd_Service ) +StreamAdd.SetName( 'StreamAdd' ) +StreamAdd.SetAuthor( '' ) +StreamAdd.SetComment( 'Compute Node' ) +StreamAdd.Coords( 448 , 9 ) +IStreamAddthis = StreamAdd.GetInPort( 'this' ) +IStreamAddx = StreamAdd.GetInPort( 'x' ) +IStreamAddy = StreamAdd.GetInPort( 'y' ) +IStreamAddGate = StreamAdd.GetInPort( 'Gate' ) +OStreamAddz = StreamAdd.GetOutPort( 'z' ) +OStreamAddGate = StreamAdd.GetOutPort( 'Gate' ) +IStreamAddistream = StreamAdd.GetInStreamPort( 'istream' ) +IStreamAddistream.SetParams( SUPERV.SCHENULL , SUPERV.INTERNULL , SUPERV.EXTRANULL ) +OStreamAddostream = StreamAdd.GetOutStreamPort( 'ostream' ) +OStreamAddostream.SetNumberOfValues( 0 ) +OStreamAddOStream = StreamAdd.GetOutStreamPort( 'OStream' ) +OStreamAddOStream.SetNumberOfValues( 0 ) + +# Creation of Links +LNewDataStreamDataStreamStreamAddthis = GraphStream.Link( ONewDataStreamDataStream , IStreamAddthis ) + +LAddzSuby = GraphStream.Link( OAddz , ISuby ) +LAddzSuby.AddCoord( 1 , 185 , 310 ) +LAddzSuby.AddCoord( 2 , 185 , 437 ) + +LAddzMuly = GraphStream.Link( OAddz , IMuly ) + +LAddostreamSubistream = GraphStream.StreamLink( OAddostream , ISubistream ) +LAddostreamSubistream.AddCoord( 1 , 199 , 343 ) +LAddostreamSubistream.AddCoord( 2 , 200 , 497 ) + +LAddOStreamSubIstream = GraphStream.StreamLink( OAddOStream , ISubIstream ) +LAddOStreamSubIstream.AddCoord( 1 , 219 , 374 ) +LAddOStreamSubIstream.AddCoord( 2 , 218 , 529 ) + +LSubzMulx = GraphStream.Link( OSubz , IMulx ) +LSubzMulx.AddCoord( 1 , 426 , 408 ) +LSubzMulx.AddCoord( 2 , 427 , 282 ) + +LSubzDivx = GraphStream.Link( OSubz , IDivx ) + +LMulzDivy = GraphStream.Link( OMulz , IDivy ) +LMulzDivy.AddCoord( 1 , 648 , 309 ) +LMulzDivy.AddCoord( 2 , 648 , 406 ) + +# Input datas +IAddx.Input( 3 ) +IAddy.Input( 7 ) +ISubx.Input( 1 ) +IStreamAddx.Input( 1 ) +IStreamAddy.Input( 2 ) +IAddistream.Input( 1 ) +IStreamAddistream.Input( 136159896 ) + +# Output Ports of the graph +#ODivz = Div.GetOutPort( 'z' ) +#OStreamAddz = StreamAdd.GetOutPort( 'z' ) + +GraphStream.PrintPorts() +GraphStream.IsValid() +status = GraphStream.IsExecutable() +if status == 0 : + print 'Input of port IStreamAddistream is required : Ok' +else : + print 'Input of port IStreamAddistream is required : ERROR' +# Following input is required : +IStreamAddistream.Input( 1 ) +GraphStream.IsExecutable() + +GraphStream.Run() +GraphStream.DoneW() +GraphStream.PrintPorts() +GraphStream.State() + +subgraphs = GraphStream.SubGraphsNumber() +i = 1 +while i <= subgraphs : + nodes = GraphStream.SubGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +substreamgraphs = GraphStream.SubStreamGraphsNumber() +i = 1 +while i <= substreamgraphs : + nodes = GraphStream.SubStreamGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubStreamGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + +GraphStream.Export('/tmp/GraphStream.xml') + +GraphStream = StreamGraph( '/tmp/GraphStream.xml' ) +GraphStream.Run() +GraphStream.DoneW() +GraphStream.PrintPorts() +print GraphStream.State() + +subgraphs = GraphStream.SubGraphsNumber() +i = 1 +while i <= subgraphs : + nodes = GraphStream.SubGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +substreamgraphs = GraphStream.SubStreamGraphsNumber() +i = 1 +while i <= substreamgraphs : + nodes = GraphStream.SubStreamGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubStreamGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + diff --git a/examples/GraphStream.xml b/examples/GraphStream.xml new file mode 100644 index 0000000..08526d6 --- /dev/null +++ b/examples/GraphStream.xml @@ -0,0 +1,444 @@ + + + + +? + ? + GraphStream + 9 + 0 + 0 + 0 + ? + +GraphStream + + +long + Add\x + +long + Add\y + +long + Sub\x + +long + StreamAdd\x + +long + StreamAdd\y + + +long + Div\z + +long + StreamAdd\z + + +1 + Add\istream + 2 + 0 + 0 + 0 + +1 + StreamAdd\istream + 2 + 0 + 0 + 0 + +1 + Div\ostream + 2 + 0 + +1 + StreamAdd\ostream + 2 + 0 + +1 + StreamAdd\OStream + 2 + 0 + + 23/4/2004 - 17:0:10 + 12/5/2004 - 10:38:33 + 2.0 + ? + ? + Test of DataStreamPorts in FactoryNodes + 0 + 0 + + +DataStreamFactory + DataStreamFactory + NewDataStream + 0 + ? + +NewDataStream + + + +DataStream + DataStream + + + 12/5/2004 - 10:38:32 + 12/5/2004 - 10:38:32 + 2.0 + ? + FactoryServer + NewDataStream from DataStreamFactory + 4 + 10 + +DataStreamFactory + DataStreamFactory + Add + 0 + ? + +Add + + +long + x + +long + y + + +long + z + + +1 + istream + 2 + 0 + 0 + 0 + +1 + ostream + 2 + 0 + +1 + OStream + 2 + 0 + + 12/5/2004 - 10:38:33 + 12/5/2004 - 10:38:33 + 2.0 + ? + FactoryServer + Add from DataStreamFactory from DataStreamComponent + 6 + 370 + +DataStreamFactory + DataStreamFactory + Sub + 0 + ? + +Sub + + +long + x + +long + y + + +long + z + + +1 + istream + 2 + 0 + 0 + 0 + +1 + Istream + 2 + 0 + 0 + 0 + + 12/5/2004 - 10:38:33 + 12/5/2004 - 10:38:33 + 2.0 + ? + FactoryServer + Sub from DataStreamFactory from DataStreamComponent + 234 + 216 + +DataStreamFactory + DataStreamFactory + Mul + 0 + ? + +Mul + + +long + x + +long + y + + +long + z + + + 12/5/2004 - 10:38:33 + 12/5/2004 - 10:38:33 + 2.0 + ? + FactoryServer + Mul from DataStreamFactory from DataStreamComponent + 448 + 342 + +DataStreamFactory + DataStreamFactory + Div + 0 + ? + +Div + + +long + x + +long + y + + +long + z + + +1 + ostream + 2 + 0 + + 12/5/2004 - 10:38:33 + 12/5/2004 - 10:38:33 + 2.0 + ? + FactoryServer + Div from DataStreamFactory from DataStreamComponent + 678 + 214 + +? + ? + StreamAdd + 2 + ? + +StreamAdd + + +objref + this + +long + x + +long + y + + +long + z + + +1 + istream + 2 + 0 + 0 + 0 + +1 + ostream + 2 + 0 + +1 + OStream + 2 + 0 + + 12/5/2004 - 10:38:33 + 12/5/2004 - 10:38:33 + 2.0 + ? + ? + Compute Node + 448 + 9 + + +NewDataStream + DataStream + StreamAdd + this + + +Add + z + Sub + y + + +185 + 310 + +185 + 437 + +Add + z + Mul + y + + +Add + ostream + Sub + istream + + +199 + 343 + +200 + 497 + +Add + OStream + Sub + Istream + + +219 + 374 + +218 + 529 + +Sub + z + Mul + x + + +426 + 408 + +427 + 282 + +Sub + z + Div + x + + +Mul + z + Div + y + + +648 + 309 + +648 + 406 + + +GraphStream + Add\x + Add + x + +3 + 3 + + +GraphStream + Add\y + Add + y + +3 + 7 + + +GraphStream + Sub\x + Sub + x + +3 + 1 + + +GraphStream + StreamAdd\x + StreamAdd + x + +3 + 1 + + +GraphStream + StreamAdd\y + StreamAdd + y + +3 + 2 + + +GraphStream + Add\istream + Add + istream + +3 + 1 + + +GraphStream + StreamAdd\istream + StreamAdd + istream + +3 + 136159896 + diff --git a/examples/GraphStreamInLines.py b/examples/GraphStreamInLines.py new file mode 100644 index 0000000..b46483a --- /dev/null +++ b/examples/GraphStreamInLines.py @@ -0,0 +1,256 @@ + +# Generated python file of Graph GraphStreamInLines + +from SuperV import * +# Graph creation +GraphStreamInLines = StreamGraph( 'GraphStreamInLines' ) +GraphStreamInLines.SetStreamParams( 300 , SUPERV.WithoutTrace , 0 ) +GraphStreamInLines.SetName( 'GraphStreamInLines' ) +GraphStreamInLines.SetAuthor( '' ) +GraphStreamInLines.SetComment( '' ) +GraphStreamInLines.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyIsOdd = [] +PyIsOdd.append( 'from time import * ' ) +PyIsOdd.append( 'def IsOdd(a,Even) : ' ) +PyIsOdd.append( ' print a,"IsOdd (GraphStreamInLines1)" ' ) +PyIsOdd.append( ' sleep( 1 ) ' ) +PyIsOdd.append( ' return a ' ) +IsOdd = GraphStreamInLines.INode( 'IsOdd' , PyIsOdd ) +IsOdd.SetName( 'IsOdd' ) +IsOdd.SetAuthor( '' ) +IsOdd.SetComment( 'Python function' ) +IsOdd.Coords( 394 , 59 ) +IIsOdda = IsOdd.InPort( 'a' , 'long' ) +IIsOddEven = IsOdd.InPort( 'Even' , 'boolean' ) +IIsOddGate = IsOdd.GetInPort( 'Gate' ) +OIsOdda = IsOdd.OutPort( 'a' , 'long' ) +OIsOddGate = IsOdd.GetOutPort( 'Gate' ) +IIsOddistream = IsOdd.InStreamPort( 'istream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +IIsOddistream.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +OIsOddostream = IsOdd.OutStreamPort( 'ostream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_ITERATIVE ) +OIsOddostream.SetNumberOfValues( 0 ) + +# Creation of Loop Nodes +PyInitLoop = [] +PyMoreInitLoop = [] +PyMoreInitLoop.append( '' ) +PyNextInitLoop = [] +PyNextInitLoop.append( '' ) +InitLoop,EndOfInitLoop = GraphStreamInLines.LNode( '' , PyInitLoop , '' , PyMoreInitLoop , '' , PyNextInitLoop ) +EndOfInitLoop.SetName( 'EndOfInitLoop' ) +EndOfInitLoop.SetAuthor( '' ) +EndOfInitLoop.SetComment( '' ) +EndOfInitLoop.Coords( 776 , 105 ) +PyEndOfInitLoop = [] +PyEndOfInitLoop.append( 'def EndOfInitLoop( DoLoop , Index , Min , Max ) :' ) +PyEndOfInitLoop.append( ' Index = Index + 1 ' ) +PyEndOfInitLoop.append( ' if Index <= Max : ' ) +PyEndOfInitLoop.append( ' DoLoop = 1 ' ) +PyEndOfInitLoop.append( ' else : ' ) +PyEndOfInitLoop.append( ' DoLoop = 0 ' ) +PyEndOfInitLoop.append( ' return DoLoop,Index,Min,Max ' ) +EndOfInitLoop.SetPyFunction( 'EndOfInitLoop' , PyEndOfInitLoop ) +IInitLoopInitLoop = InitLoop.GetInPort( 'InitLoop' ) +IInitLoopIndex = InitLoop.InPort( 'Index' , 'long' ) +IInitLoopMin = InitLoop.InPort( 'Min' , 'long' ) +IInitLoopMax = InitLoop.InPort( 'Max' , 'long' ) +IInitLoopistream = InitLoop.InStreamPort( 'istream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +IInitLoopistream.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +IInitLoopGate = InitLoop.GetInPort( 'Gate' ) +OInitLoopDoLoop = InitLoop.GetOutPort( 'DoLoop' ) +OInitLoopIndex = InitLoop.GetOutPort( 'Index' ) +OInitLoopMin = InitLoop.GetOutPort( 'Min' ) +OInitLoopMax = InitLoop.GetOutPort( 'Max' ) +OInitLoopostream = InitLoop.OutStreamPort( 'ostream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_ITERATIVE ) +OInitLoopostream.SetNumberOfValues( 0 ) +IEndOfInitLoopDoLoop = EndOfInitLoop.GetInPort( 'DoLoop' ) +IEndOfInitLoopIndex = EndOfInitLoop.GetInPort( 'Index' ) +IEndOfInitLoopMin = EndOfInitLoop.GetInPort( 'Min' ) +IEndOfInitLoopMax = EndOfInitLoop.GetInPort( 'Max' ) +IEndOfInitLoopistream = EndOfInitLoop.InStreamPort( 'istream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_ITERATIVE ) +IEndOfInitLoopistream.SetParams( SUPERV.SCHENULL , SUPERV.INTERNULL , SUPERV.EXTRANULL ) +IEndOfInitLoopGate = EndOfInitLoop.GetInPort( 'Gate' ) +OEndOfInitLoopDoLoop = EndOfInitLoop.GetOutPort( 'DoLoop' ) +OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) +OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) +OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) +OEndOfInitLoopostream = EndOfInitLoop.OutStreamPort( 'ostream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +OEndOfInitLoopostream.SetNumberOfValues( 0 ) +InitLoop.SetName( 'InitLoop' ) +InitLoop.SetAuthor( '' ) +InitLoop.SetComment( '' ) +InitLoop.Coords( 11 , 119 ) +IInitLoopistream = InitLoop.InStreamPort( 'istream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +IInitLoopistream.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +OInitLoopostream = InitLoop.OutStreamPort( 'ostream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_ITERATIVE ) +OInitLoopostream.SetNumberOfValues( 0 ) + +# Creation of Switch Nodes +PySwitch = [] +PySwitch.append( 'from time import * ' ) +PySwitch.append( 'def Switch(a) : ' ) +PySwitch.append( ' if ( a & 1 ) == 0 : ' ) +PySwitch.append( ' sleep(1) ' ) +PySwitch.append( ' return a & 1,1-(a&1),a ' ) +Switch,EndSwitch = GraphStreamInLines.SNode( 'Switch' , PySwitch ) +EndSwitch.SetName( 'EndSwitch' ) +EndSwitch.SetAuthor( '' ) +EndSwitch.SetComment( '' ) +EndSwitch.Coords( 587 , 104 ) +PyEndSwitch = [] +PyEndSwitch.append( 'def EndOfSwitch(a) : ' ) +PyEndSwitch.append( ' if ( a & 1 ) == 0 : ' ) +PyEndSwitch.append( ' sleep(1) ' ) +PyEndSwitch.append( ' return a ' ) +EndSwitch.SetPyFunction( 'EndOfSwitch' , PyEndSwitch ) +IEndSwitcha = EndSwitch.InPort( 'a' , 'long' ) +IEndSwitchistream = EndSwitch.InStreamPort( 'istream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +IEndSwitchistream.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +IEndSwitchDefault = EndSwitch.GetInPort( 'Default' ) +OEndSwitcha = EndSwitch.OutPort( 'a' , 'long' ) +OEndSwitchostream = EndSwitch.OutStreamPort( 'ostream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +OEndSwitchostream.SetNumberOfValues( 0 ) +OEndSwitchGate = EndSwitch.GetOutPort( 'Gate' ) +Switch.SetName( 'Switch' ) +Switch.SetAuthor( '' ) +Switch.SetComment( '' ) +Switch.Coords( 197 , 119 ) +ISwitcha = Switch.InPort( 'a' , 'long' ) +ISwitchGate = Switch.GetInPort( 'Gate' ) +OSwitchOdd = Switch.OutPort( 'Odd' , 'long' ) +OSwitchEven = Switch.OutPort( 'Even' , 'int' ) +OSwitcha = Switch.OutPort( 'a' , 'int' ) +OSwitchDefault = Switch.GetOutPort( 'Default' ) +ISwitchistream = Switch.InStreamPort( 'istream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +ISwitchistream.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +OSwitchostream = Switch.OutStreamPort( 'ostream' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_ITERATIVE ) +OSwitchostream.SetNumberOfValues( 0 ) + +# Creation of Links +LIsOddaEndSwitcha = GraphStreamInLines.Link( OIsOdda , IEndSwitcha ) + +LIsOddostreamInitLoopistream = GraphStreamInLines.StreamLink( OIsOddostream , IInitLoopistream ) +LIsOddostreamInitLoopistream.AddCoord( 1 , 3 , 240 ) +LIsOddostreamInitLoopistream.AddCoord( 2 , 3 , 395 ) +LIsOddostreamInitLoopistream.AddCoord( 3 , 571 , 394 ) +LIsOddostreamInitLoopistream.AddCoord( 4 , 571 , 187 ) + +LInitLoopIndexSwitcha = GraphStreamInLines.Link( OInitLoopIndex , ISwitcha ) + +LInitLoopMinEndOfInitLoopMin = GraphStreamInLines.Link( OInitLoopMin , IEndOfInitLoopMin ) + +LInitLoopMaxEndOfInitLoopMax = GraphStreamInLines.Link( OInitLoopMax , IEndOfInitLoopMax ) + +LInitLoopostreamEndSwitchistream = GraphStreamInLines.StreamLink( OInitLoopostream , IEndSwitchistream ) +LInitLoopostreamEndSwitchistream.AddCoord( 1 , 584 , 167 ) +LInitLoopostreamEndSwitchistream.AddCoord( 2 , 584 , 369 ) +LInitLoopostreamEndSwitchistream.AddCoord( 3 , 184 , 368 ) +LInitLoopostreamEndSwitchistream.AddCoord( 4 , 185 , 240 ) + +LSwitchOddIsOddGate = GraphStreamInLines.Link( OSwitchOdd , IIsOddGate ) +LSwitchOddIsOddGate.AddCoord( 1 , 373 , 222 ) +LSwitchOddIsOddGate.AddCoord( 2 , 373 , 147 ) + +LSwitchEvenEndSwitchDefault = GraphStreamInLines.Link( OSwitchEven , IEndSwitchDefault ) + +LSwitchEvenIsOddEven = GraphStreamInLines.Link( OSwitchEven , IIsOddEven ) +LSwitchEvenIsOddEven.AddCoord( 1 , 363 , 154 ) +LSwitchEvenIsOddEven.AddCoord( 2 , 362 , 177 ) + +LSwitchaIsOdda = GraphStreamInLines.Link( OSwitcha , IIsOdda ) +LSwitchaIsOdda.AddCoord( 1 , 385 , 123 ) +LSwitchaIsOdda.AddCoord( 2 , 386 , 206 ) + +LSwitchostreamIsOddistream = GraphStreamInLines.StreamLink( OSwitchostream , IIsOddistream ) +LSwitchostreamIsOddistream.AddCoord( 1 , 360 , 185 ) +LSwitchostreamIsOddistream.AddCoord( 2 , 361 , 240 ) + +LSwitchostreamEndOfInitLoopistream = GraphStreamInLines.StreamLink( OSwitchostream , IEndOfInitLoopistream ) +LSwitchostreamEndOfInitLoopistream.AddCoord( 1 , 775 , 226 ) +LSwitchostreamEndOfInitLoopistream.AddCoord( 2 , 775 , 261 ) +LSwitchostreamEndOfInitLoopistream.AddCoord( 3 , 361 , 261 ) +LSwitchostreamEndOfInitLoopistream.AddCoord( 4 , 361 , 240 ) + +LEndSwitchaEndOfInitLoopIndex = GraphStreamInLines.Link( OEndSwitcha , IEndOfInitLoopIndex ) + +LEndSwitchostreamSwitchistream = GraphStreamInLines.StreamLink( OEndSwitchostream , ISwitchistream ) +LEndSwitchostreamSwitchistream.AddCoord( 1 , 186 , 240 ) +LEndSwitchostreamSwitchistream.AddCoord( 2 , 186 , 331 ) +LEndSwitchostreamSwitchistream.AddCoord( 3 , 766 , 330 ) +LEndSwitchostreamSwitchistream.AddCoord( 4 , 766 , 167 ) + +# Input datas +IInitLoopIndex.Input( 0 ) +IInitLoopMin.Input( 0 ) +IInitLoopMax.Input( 100 ) + +# Output Ports of the graph +#OEndOfInitLoopIndex = EndOfInitLoop.GetOutPort( 'Index' ) +#OEndOfInitLoopMin = EndOfInitLoop.GetOutPort( 'Min' ) +#OEndOfInitLoopMax = EndOfInitLoop.GetOutPort( 'Max' ) + + + +GraphStreamInLines.Run() +GraphStreamInLines.DoneW() +print GraphStreamInLines.State() + +GraphStreamInLines.PrintPorts() + + +subgraphs = GraphStreamInLines.SubGraphsNumber() +i = 1 +while i <= subgraphs : + nodes = GraphStreamInLines.SubGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +substreamgraphs = GraphStreamInLines.SubStreamGraphsNumber() +i = 1 +while i <= substreamgraphs : + nodes = GraphStreamInLines.SubStreamGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubStreamGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + +GraphStreamInLines.Export('/tmp/GraphStreamInLines.xml') + +from SuperV import * +GraphStreamInLines = StreamGraph('/tmp/GraphStreamInLines.xml') + + +GraphStreamInLines.Run() +GraphStreamInLines.DoneW() +print GraphStreamInLines.State() + +subgraphs = GraphStreamInLines.SubGraphsNumber() +i = 1 +while i <= subgraphs : + nodes = GraphStreamInLines.SubGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +substreamgraphs = GraphStreamInLines.SubStreamGraphsNumber() +i = 1 +while i <= substreamgraphs : + nodes = GraphStreamInLines.SubStreamGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubStreamGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + diff --git a/examples/GraphStreamInLines.xml b/examples/GraphStreamInLines.xml new file mode 100644 index 0000000..d450676 --- /dev/null +++ b/examples/GraphStreamInLines.xml @@ -0,0 +1,508 @@ + + + + +? + ? + GraphStreamInLines + 9 + 300 + 0 + 0 + ? + +GraphStreamInLines + + +long + InitLoop\Index + +long + InitLoop\Min + +long + InitLoop\Max + + +long + EndOfInitLoop\Index + +long + EndOfInitLoop\Min + +long + EndOfInitLoop\Max + + +1 + EndOfInitLoop\ostream + 1 + 0 + + 27/4/2004 - 15:5:25 + 21/5/2004 - 10:45:38 + 2.0 + ? + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + +boolean + Even + + +long + a + + +1 + istream + 1 + 1 + 2 + 0 + +1 + ostream + 2 + 0 + + +IsOdd + + + + + + 21/5/2004 - 10:45:38 + 21/5/2004 - 10:45:38 + 2.0 + ? + ? + Python function + 394 + 59 + +? + ? + InitLoop + 4 + EndOfInitLoop + +InitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + +1 + istream + 1 + 1 + 2 + 0 + +1 + ostream + 2 + 0 + + +? + + +? + + +? + + 21/5/2004 - 10:45:38 + 21/5/2004 - 10:45:38 + 2.0 + ? + ? + ? + 11 + 119 + +? + ? + EndOfInitLoop + 5 + InitLoop + +EndOfInitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + +1 + istream + 2 + 0 + 0 + 0 + +1 + ostream + 1 + 0 + + +EndOfInitLoop + + + + + + + + 21/5/2004 - 10:45:38 + 21/5/2004 - 10:45:38 + 2.0 + ? + ? + ? + 776 + 105 + +? + ? + Switch + 6 + EndSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + + +1 + istream + 1 + 1 + 2 + 0 + +1 + ostream + 2 + 0 + + +Switch + + + + + + 21/5/2004 - 10:45:38 + 21/5/2004 - 10:45:38 + 2.0 + ? + ? + ? + 197 + 119 + +? + ? + EndSwitch + 7 + Switch + +EndSwitch + + +long + a + + +long + a + + +1 + istream + 1 + 1 + 2 + 0 + +1 + ostream + 1 + 0 + + +EndOfSwitch + + + + + 21/5/2004 - 10:45:38 + 21/5/2004 - 10:45:38 + 2.0 + ? + ? + ? + 587 + 104 + + +IsOdd + a + EndSwitch + a + + +IsOdd + ostream + InitLoop + istream + + +3 + 240 + +3 + 395 + +571 + 394 + +571 + 187 + +InitLoop + DoLoop + EndOfInitLoop + DoLoop + + +InitLoop + Index + Switch + a + + +InitLoop + Min + EndOfInitLoop + Min + + +InitLoop + Max + EndOfInitLoop + Max + + +InitLoop + ostream + EndSwitch + istream + + +584 + 167 + +584 + 369 + +184 + 368 + +185 + 240 + +EndOfInitLoop + DoLoop + InitLoop + InitLoop + + +Switch + Odd + IsOdd + Gate + + +373 + 222 + +373 + 147 + +Switch + Even + EndSwitch + Default + + +Switch + Even + IsOdd + Even + + +363 + 154 + +362 + 177 + +Switch + a + IsOdd + a + + +385 + 123 + +386 + 206 + +Switch + ostream + IsOdd + istream + + +360 + 185 + +361 + 240 + +Switch + ostream + EndOfInitLoop + istream + + +775 + 226 + +775 + 261 + +361 + 261 + +361 + 240 + +EndSwitch + a + EndOfInitLoop + Index + + +EndSwitch + ostream + Switch + istream + + +186 + 240 + +186 + 331 + +766 + 330 + +766 + 167 + + +GraphStreamInLines + InitLoop\Index + InitLoop + Index + +3 + 0 + + +GraphStreamInLines + InitLoop\Min + InitLoop + Min + +3 + 0 + + +GraphStreamInLines + InitLoop\Max + InitLoop + Max + +3 + 100 + diff --git a/examples/GraphStreamInLines_1.cpl b/examples/GraphStreamInLines_1.cpl new file mode 100644 index 0000000..91c3a29 --- /dev/null +++ b/examples/GraphStreamInLines_1.cpl @@ -0,0 +1,77 @@ +DEBUT GraphStreamInLines_1 + TIMEOUT 300 + TRACE SANS + DELTA_T 0 + + +# Liste des codes + + CODE EndOfInitLoop + istream I IN ENTIER + ostream T OUT ENTIER + FIN #EndOfInitLoop + + + CODE EndSwitch + istream T IN ENTIER + ostream T OUT ENTIER + FIN #EndSwitch + + + CODE InitLoop + istream T IN ENTIER + ostream I OUT ENTIER + FIN #InitLoop + + + CODE IsOdd + istream T IN ENTIER + ostream I OUT ENTIER + FIN #IsOdd + + + CODE Switch + istream T IN ENTIER + ostream I OUT ENTIER + FIN #Switch + + + + +# Liste des instances + + INSTANCE IsOdd + CODE IsOdd + FIN + + INSTANCE InitLoop + CODE InitLoop + FIN + + INSTANCE EndOfInitLoop + CODE EndOfInitLoop + FIN + + INSTANCE Switch + CODE Switch + FIN + + INSTANCE EndSwitch + CODE EndSwitch + FIN + + + + + +# Liste des liens + + LIEN + IsOdd.ostream 0 => InitLoop.istream TI L1 EXTRANULL ; + InitLoop.ostream 0 => EndSwitch.istream TI L1 EXTRANULL ; + Switch.ostream 0 => IsOdd.istream TI L1 EXTRANULL ; + Switch.ostream 0 => EndOfInitLoop.istream SCHENULL INTERNULL EXTRANULL ; + EndSwitch.ostream 0 => Switch.istream TI L1 EXTRANULL ; + FIN + +FIN diff --git a/examples/GraphStreamTopologies.py b/examples/GraphStreamTopologies.py new file mode 100644 index 0000000..95f8c6f --- /dev/null +++ b/examples/GraphStreamTopologies.py @@ -0,0 +1,235 @@ + +# Generated python file of Graph GraphStreamTopologies + +from SuperV import * +# Graph creation +GraphStreamTopologies = StreamGraph( 'GraphStreamTopologies' ) +GraphStreamTopologies.SetStreamParams( 300 , SUPERV.WithoutTrace , 0 ) +GraphStreamTopologies.SetName( 'GraphStreamTopologies' ) +GraphStreamTopologies.SetAuthor( 'JR' ) +GraphStreamTopologies.SetComment( 'Test of SubStreamGraphs of a StreamGraph' ) +GraphStreamTopologies.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyNode_A_1 = [] +PyNode_A_1.append( 'def Node_A_1() : ' ) +PyNode_A_1.append( ' return 1 ' ) +Node_A_1 = GraphStreamTopologies.INode( 'Node_A_1' , PyNode_A_1 ) +Node_A_1.SetName( 'Node_A_1' ) +Node_A_1.SetAuthor( '' ) +Node_A_1.SetComment( 'Python function' ) +Node_A_1.Coords( 29 , 66 ) +INode_A_1Gate = Node_A_1.GetInPort( 'Gate' ) +ONode_A_1a_1 = Node_A_1.OutPort( 'a_1' , 'long' ) +ONode_A_1Gate = Node_A_1.GetOutPort( 'Gate' ) +INode_A_1istream_A_1_1 = Node_A_1.InStreamPort( 'istream_A_1_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_A_1istream_A_1_1.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +INode_A_1istream_A_1_2 = Node_A_1.InStreamPort( 'istream_A_1_2' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_A_1istream_A_1_2.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +INode_A_1istream_A_1_3 = Node_A_1.InStreamPort( 'istream_A_1_3' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_A_1istream_A_1_3.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) + +PyNode_A_2 = [] +PyNode_A_2.append( 'def Node_A_2() : ' ) +PyNode_A_2.append( ' return 1 ' ) +Node_A_2 = GraphStreamTopologies.INode( 'Node_A_2' , PyNode_A_2 ) +Node_A_2.SetName( 'Node_A_2' ) +Node_A_2.SetAuthor( '' ) +Node_A_2.SetComment( 'Python function' ) +Node_A_2.Coords( 23 , 309 ) +INode_A_2Gate = Node_A_2.GetInPort( 'Gate' ) +ONode_A_2a_2 = Node_A_2.OutPort( 'a_2' , 'long' ) +ONode_A_2Gate = Node_A_2.GetOutPort( 'Gate' ) +INode_A_2istream_A_2_1 = Node_A_2.InStreamPort( 'istream_A_2_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_A_2istream_A_2_1.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +ONode_A_2ostream_A_2_1 = Node_A_2.OutStreamPort( 'ostream_A_2_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +ONode_A_2ostream_A_2_1.SetNumberOfValues( 0 ) + +PyNode_B_1 = [] +PyNode_B_1.append( 'def Node_B_1( n ) : ' ) +PyNode_B_1.append( ' return n ' ) +Node_B_1 = GraphStreamTopologies.INode( 'Node_B_1' , PyNode_B_1 ) +Node_B_1.SetName( 'Node_B_1' ) +Node_B_1.SetAuthor( '' ) +Node_B_1.SetComment( 'Python function' ) +Node_B_1.Coords( 249 , 66 ) +INode_B_1b_1 = Node_B_1.InPort( 'b_1' , 'long' ) +INode_B_1Gate = Node_B_1.GetInPort( 'Gate' ) +ONode_B_1b_1 = Node_B_1.OutPort( 'b_1' , 'long' ) +ONode_B_1Gate = Node_B_1.GetOutPort( 'Gate' ) +INode_B_1istream_B_1_1 = Node_B_1.InStreamPort( 'istream_B_1_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_B_1istream_B_1_1.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) + +PyNode_B_2 = [] +PyNode_B_2.append( 'def Node_B_2( n ) : ' ) +PyNode_B_2.append( ' return n ' ) +Node_B_2 = GraphStreamTopologies.INode( 'Node_B_2' , PyNode_B_2 ) +Node_B_2.SetName( 'Node_B_2' ) +Node_B_2.SetAuthor( '' ) +Node_B_2.SetComment( 'Python function' ) +Node_B_2.Coords( 245 , 308 ) +INode_B_2b_2 = Node_B_2.InPort( 'b_2' , 'long' ) +INode_B_2Gate = Node_B_2.GetInPort( 'Gate' ) +ONode_B_2b_2 = Node_B_2.OutPort( 'b_2' , 'long' ) +ONode_B_2Gate = Node_B_2.GetOutPort( 'Gate' ) +INode_B_2istream_B_2_1 = Node_B_2.InStreamPort( 'istream_B_2_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_B_2istream_B_2_1.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +ONode_B_2ostream_B_2_1 = Node_B_2.OutStreamPort( 'ostream_B_2_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +ONode_B_2ostream_B_2_1.SetNumberOfValues( 0 ) +ONode_B_2ostream_B_2_2 = Node_B_2.OutStreamPort( 'ostream_B_2_2' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +ONode_B_2ostream_B_2_2.SetNumberOfValues( 0 ) + +PyNode_C_1 = [] +PyNode_C_1.append( 'def Node_C_1( n ) : ' ) +PyNode_C_1.append( ' return ' ) +Node_C_1 = GraphStreamTopologies.INode( 'Node_C_1' , PyNode_C_1 ) +Node_C_1.SetName( 'Node_C_1' ) +Node_C_1.SetAuthor( '' ) +Node_C_1.SetComment( 'Python function' ) +Node_C_1.Coords( 481 , 67 ) +INode_C_1c_1 = Node_C_1.InPort( 'c_1' , 'long' ) +INode_C_1Gate = Node_C_1.GetInPort( 'Gate' ) +ONode_C_1Gate = Node_C_1.GetOutPort( 'Gate' ) +ONode_C_1ostream_C_1_1 = Node_C_1.OutStreamPort( 'ostream_C_1_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +ONode_C_1ostream_C_1_1.SetNumberOfValues( 0 ) + +PyNode_C_2 = [] +PyNode_C_2.append( 'def Node_C_2( n ) : ' ) +PyNode_C_2.append( ' return n ' ) +Node_C_2 = GraphStreamTopologies.INode( 'Node_C_2' , PyNode_C_2 ) +Node_C_2.SetName( 'Node_C_2' ) +Node_C_2.SetAuthor( '' ) +Node_C_2.SetComment( 'Python function' ) +Node_C_2.Coords( 476 , 307 ) +INode_C_2c_2 = Node_C_2.InPort( 'c_2' , 'long' ) +INode_C_2Gate = Node_C_2.GetInPort( 'Gate' ) +ONode_C_2c_2 = Node_C_2.OutPort( 'c_2' , 'long' ) +ONode_C_2Gate = Node_C_2.GetOutPort( 'Gate' ) +INode_C_2istream_C_2_1 = Node_C_2.InStreamPort( 'istream_C_2_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_C_2istream_C_2_1.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) + +PyNode_D_1 = [] +PyNode_D_1.append( 'def Node_D_1( n ) : ' ) +PyNode_D_1.append( ' return ' ) +Node_D_1 = GraphStreamTopologies.INode( 'Node_D_1' , PyNode_D_1 ) +Node_D_1.SetName( 'Node_D_1' ) +Node_D_1.SetAuthor( '' ) +Node_D_1.SetComment( 'Python function' ) +Node_D_1.Coords( 703 , 306 ) +INode_D_1d_1 = Node_D_1.InPort( 'd_1' , 'long' ) +INode_D_1Gate = Node_D_1.GetInPort( 'Gate' ) +ONode_D_1Gate = Node_D_1.GetOutPort( 'Gate' ) +ONode_D_1ostream_D_1_1 = Node_D_1.OutStreamPort( 'ostream_D_1_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +ONode_D_1ostream_D_1_1.SetNumberOfValues( 0 ) + +# Creation of Links +LNode_A_1a_1Node_B_1b_1 = GraphStreamTopologies.Link( ONode_A_1a_1 , INode_B_1b_1 ) + +LNode_A_2a_2Node_B_2b_2 = GraphStreamTopologies.Link( ONode_A_2a_2 , INode_B_2b_2 ) + +LNode_A_2ostream_A_2_1Node_A_1istream_A_1_1 = GraphStreamTopologies.StreamLink( ONode_A_2ostream_A_2_1 , INode_A_1istream_A_1_1 ) +LNode_A_2ostream_A_2_1Node_A_1istream_A_1_1.AddCoord( 1 , 13 , 164 ) +LNode_A_2ostream_A_2_1Node_A_1istream_A_1_1.AddCoord( 2 , 13 , 44 ) +LNode_A_2ostream_A_2_1Node_A_1istream_A_1_1.AddCoord( 3 , 207 , 44 ) +LNode_A_2ostream_A_2_1Node_A_1istream_A_1_1.AddCoord( 4 , 207 , 409 ) + +LNode_B_1b_1Node_C_1c_1 = GraphStreamTopologies.Link( ONode_B_1b_1 , INode_C_1c_1 ) + +LNode_B_2b_2Node_C_2c_2 = GraphStreamTopologies.Link( ONode_B_2b_2 , INode_C_2c_2 ) + +LNode_B_2ostream_B_2_1Node_A_1istream_A_1_2 = GraphStreamTopologies.StreamLink( ONode_B_2ostream_B_2_1 , INode_A_1istream_A_1_2 ) +LNode_B_2ostream_B_2_1Node_A_1istream_A_1_2.AddCoord( 1 , 14 , 195 ) +LNode_B_2ostream_B_2_1Node_A_1istream_A_1_2.AddCoord( 2 , 13 , 299 ) +LNode_B_2ostream_B_2_1Node_A_1istream_A_1_2.AddCoord( 3 , 428 , 300 ) +LNode_B_2ostream_B_2_1Node_A_1istream_A_1_2.AddCoord( 4 , 428 , 407 ) + +LNode_B_2ostream_B_2_2Node_A_2istream_A_2_1 = GraphStreamTopologies.StreamLink( ONode_B_2ostream_B_2_2 , INode_A_2istream_A_2_1 ) +LNode_B_2ostream_B_2_2Node_A_2istream_A_2_1.AddCoord( 1 , 12 , 406 ) +LNode_B_2ostream_B_2_2Node_A_2istream_A_2_1.AddCoord( 2 , 11 , 525 ) +LNode_B_2ostream_B_2_2Node_A_2istream_A_2_1.AddCoord( 3 , 427 , 525 ) +LNode_B_2ostream_B_2_2Node_A_2istream_A_2_1.AddCoord( 4 , 426 , 438 ) + +LNode_C_1ostream_C_1_1Node_A_1istream_A_1_3 = GraphStreamTopologies.StreamLink( ONode_C_1ostream_C_1_1 , INode_A_1istream_A_1_3 ) +LNode_C_1ostream_C_1_1Node_A_1istream_A_1_3.AddCoord( 1 , 5 , 227 ) +LNode_C_1ostream_C_1_1Node_A_1istream_A_1_3.AddCoord( 2 , 5 , 16 ) +LNode_C_1ostream_C_1_1Node_A_1istream_A_1_3.AddCoord( 3 , 672 , 16 ) +LNode_C_1ostream_C_1_1Node_A_1istream_A_1_3.AddCoord( 4 , 671 , 166 ) + +LNode_C_2c_2Node_D_1d_1 = GraphStreamTopologies.Link( ONode_C_2c_2 , INode_D_1d_1 ) + +LNode_D_1ostream_D_1_1Node_C_2istream_C_2_1 = GraphStreamTopologies.StreamLink( ONode_D_1ostream_D_1_1 , INode_C_2istream_C_2_1 ) +LNode_D_1ostream_D_1_1Node_C_2istream_C_2_1.AddCoord( 1 , 453 , 406 ) +LNode_D_1ostream_D_1_1Node_C_2istream_C_2_1.AddCoord( 2 , 454 , 499 ) +LNode_D_1ostream_D_1_1Node_C_2istream_C_2_1.AddCoord( 3 , 903 , 500 ) +LNode_D_1ostream_D_1_1Node_C_2istream_C_2_1.AddCoord( 4 , 903 , 404 ) + +LNode_D_1ostream_D_1_1Node_B_1istream_B_1_1 = GraphStreamTopologies.StreamLink( ONode_D_1ostream_D_1_1 , INode_B_1istream_B_1_1 ) +LNode_D_1ostream_D_1_1Node_B_1istream_B_1_1.AddCoord( 1 , 229 , 163 ) +LNode_D_1ostream_D_1_1Node_B_1istream_B_1_1.AddCoord( 2 , 229 , 282 ) +LNode_D_1ostream_D_1_1Node_B_1istream_B_1_1.AddCoord( 3 , 902 , 282 ) +LNode_D_1ostream_D_1_1Node_B_1istream_B_1_1.AddCoord( 4 , 903 , 404 ) + +# Input datas +INode_B_2istream_B_2_1.Input( 1 ) + +# Output Ports of the graph + +GraphStreamTopologies.Run() +GraphStreamTopologies.DoneW() +GraphStreamTopologies.State() + +subgraphs = GraphStreamTopologies.SubGraphsNumber() +i = 1 +while i <= subgraphs : + nodes = GraphStreamTopologies.SubGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +substreamgraphs = GraphStreamTopologies.SubStreamGraphsNumber() +i = 1 +while i <= substreamgraphs : + nodes = GraphStreamTopologies.SubStreamGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubStreamGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +GraphStreamTopologies.Export( '/tmp/GraphStreamTopologies.xml' ) + +GraphStreamTopologies = StreamGraph( '/tmp/GraphStreamTopologies.xml' ) + +GraphStreamTopologies.PrintPorts() + +GraphStreamTopologies.Run() +GraphStreamTopologies.DoneW() +GraphStreamTopologies.State() + +subgraphs = GraphStreamTopologies.SubGraphsNumber() +i = 1 +while i <= subgraphs : + nodes = GraphStreamTopologies.SubGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +substreamgraphs = GraphStreamTopologies.SubStreamGraphsNumber() +i = 1 +while i <= substreamgraphs : + nodes = GraphStreamTopologies.SubStreamGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubStreamGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + diff --git a/examples/GraphStreamTopologies.xml b/examples/GraphStreamTopologies.xml new file mode 100644 index 0000000..e56882d --- /dev/null +++ b/examples/GraphStreamTopologies.xml @@ -0,0 +1,455 @@ + + + + +? + ? + GraphStreamTopologies + 9 + 300 + 0 + 0 + ? + +GraphStreamTopologies + + + + +1 + Node_B_2\istream_B_2_1 + 1 + 1 + 2 + 0 + + 4/5/2004 - 10:13:53 + 21/5/2004 - 9:18:58 + 2.0 + JR + ? + Test of SubStreamGraphs of a StreamGraph + 0 + 0 + + +? + ? + Node_A_1 + 3 + ? + +Node_A_1 + + + +long + a_1 + + +1 + istream_A_1_1 + 1 + 1 + 2 + 0 + +1 + istream_A_1_2 + 1 + 1 + 2 + 0 + +1 + istream_A_1_3 + 1 + 1 + 2 + 0 + + +Node_A_1 + + + 21/5/2004 - 9:18:58 + 21/5/2004 - 9:18:58 + 2.0 + ? + ? + Python function + 29 + 66 + +? + ? + Node_A_2 + 3 + ? + +Node_A_2 + + + +long + a_2 + + +1 + istream_A_2_1 + 1 + 1 + 2 + 0 + +1 + ostream_A_2_1 + 1 + 0 + + +Node_A_2 + + + 21/5/2004 - 9:18:58 + 21/5/2004 - 9:18:58 + 2.0 + ? + ? + Python function + 23 + 309 + +? + ? + Node_B_1 + 3 + ? + +Node_B_1 + + +long + b_1 + + +long + b_1 + + +1 + istream_B_1_1 + 1 + 1 + 2 + 0 + + +Node_B_1 + + + 21/5/2004 - 9:18:58 + 21/5/2004 - 9:18:58 + 2.0 + ? + ? + Python function + 249 + 66 + +? + ? + Node_B_2 + 3 + ? + +Node_B_2 + + +long + b_2 + + +long + b_2 + + +1 + istream_B_2_1 + 1 + 1 + 2 + 0 + +1 + ostream_B_2_1 + 1 + 0 + +1 + ostream_B_2_2 + 1 + 0 + + +Node_B_2 + + + 21/5/2004 - 9:18:58 + 21/5/2004 - 9:18:58 + 2.0 + ? + ? + Python function + 245 + 308 + +? + ? + Node_C_1 + 3 + ? + +Node_C_1 + + +long + c_1 + + + +1 + ostream_C_1_1 + 1 + 0 + + +Node_C_1 + + + 21/5/2004 - 9:18:58 + 21/5/2004 - 9:18:58 + 2.0 + ? + ? + Python function + 481 + 67 + +? + ? + Node_C_2 + 3 + ? + +Node_C_2 + + +long + c_2 + + +long + c_2 + + +1 + istream_C_2_1 + 1 + 1 + 2 + 0 + + +Node_C_2 + + + 21/5/2004 - 9:18:58 + 21/5/2004 - 9:18:58 + 2.0 + ? + ? + Python function + 476 + 307 + +? + ? + Node_D_1 + 3 + ? + +Node_D_1 + + +long + d_1 + + + +1 + ostream_D_1_1 + 1 + 0 + + +Node_D_1 + + + 21/5/2004 - 9:18:58 + 21/5/2004 - 9:18:58 + 2.0 + ? + ? + Python function + 703 + 306 + + +Node_A_1 + a_1 + Node_B_1 + b_1 + + +Node_A_2 + a_2 + Node_B_2 + b_2 + + +Node_A_2 + ostream_A_2_1 + Node_A_1 + istream_A_1_1 + + +13 + 164 + +13 + 44 + +207 + 44 + +207 + 409 + +Node_B_1 + b_1 + Node_C_1 + c_1 + + +Node_B_2 + b_2 + Node_C_2 + c_2 + + +Node_B_2 + ostream_B_2_1 + Node_A_1 + istream_A_1_2 + + +14 + 195 + +13 + 299 + +428 + 300 + +428 + 407 + +Node_B_2 + ostream_B_2_2 + Node_A_2 + istream_A_2_1 + + +12 + 406 + +11 + 525 + +427 + 525 + +426 + 438 + +Node_C_1 + ostream_C_1_1 + Node_A_1 + istream_A_1_3 + + +5 + 227 + +5 + 16 + +672 + 16 + +671 + 166 + +Node_C_2 + c_2 + Node_D_1 + d_1 + + +Node_D_1 + ostream_D_1_1 + Node_C_2 + istream_C_2_1 + + +453 + 406 + +454 + 499 + +903 + 500 + +903 + 404 + +Node_D_1 + ostream_D_1_1 + Node_B_1 + istream_B_1_1 + + +229 + 163 + +229 + 282 + +902 + 282 + +903 + 404 + + +GraphStreamTopologies + Node_B_2\istream_B_2_1 + Node_B_2 + istream_B_2_1 + +3 + 1 + diff --git a/examples/GraphStreamTopologies_1.cpl b/examples/GraphStreamTopologies_1.cpl new file mode 100644 index 0000000..b0e6528 --- /dev/null +++ b/examples/GraphStreamTopologies_1.cpl @@ -0,0 +1,68 @@ +DEBUT GraphStreamTopologies_1 + TIMEOUT 300 + TRACE SANS + DELTA_T 0 + + +# Liste des codes + + CODE Node_A_1 + istream_A_1_1 T IN ENTIER + istream_A_1_2 T IN ENTIER + istream_A_1_3 T IN ENTIER + FIN #Node_A_1 + + + CODE Node_A_2 + istream_A_2_1 T IN ENTIER + ostream_A_2_1 T OUT ENTIER + FIN #Node_A_2 + + + CODE Node_B_2 + istream_B_2_1 T IN ENTIER + ostream_B_2_1 T OUT ENTIER + ostream_B_2_2 T OUT ENTIER + FIN #Node_B_2 + + + CODE Node_C_1 + istream_B_2_1 T IN ENTIER + ostream_C_1_1 T OUT ENTIER + FIN #Node_C_1 + + + + +# Liste des instances + + INSTANCE Node_A_1 + CODE Node_A_1 + FIN + + INSTANCE Node_A_2 + CODE Node_A_2 + FIN + + INSTANCE Node_B_2 + CODE Node_B_2 + FIN + + INSTANCE Node_C_1 + CODE Node_C_1 + FIN + + + + + +# Liste des liens + + LIEN + Node_A_2.ostream_A_2_1 0 => Node_A_1.istream_A_1_1 TI L1 EXTRANULL ; + Node_B_2.ostream_B_2_1 0 => Node_A_1.istream_A_1_2 TI L1 EXTRANULL ; + Node_B_2.ostream_B_2_2 0 => Node_A_2.istream_A_2_1 TI L1 EXTRANULL ; + Node_C_1.ostream_C_1_1 0 => Node_A_1.istream_A_1_3 TI L1 EXTRANULL ; + FIN + +FIN diff --git a/examples/GraphStreamTopologies_2.cpl b/examples/GraphStreamTopologies_2.cpl new file mode 100644 index 0000000..0916ccc --- /dev/null +++ b/examples/GraphStreamTopologies_2.cpl @@ -0,0 +1,54 @@ +DEBUT GraphStreamTopologies_2 + TIMEOUT 300 + TRACE SANS + DELTA_T 0 + + +# Liste des codes + + CODE Node_B_1 + istream_B_1_1 T IN ENTIER + ostream_A_2_1 T OUT ENTIER + FIN #Node_B_1 + + + CODE Node_C_2 + istream_C_2_1 T IN ENTIER + ostream_C_1_1 T OUT ENTIER + FIN #Node_C_2 + + + CODE Node_D_1 + istream_C_2_1 T IN ENTIER + ostream_D_1_1 T OUT ENTIER + FIN #Node_D_1 + + + + +# Liste des instances + + INSTANCE Node_B_1 + CODE Node_B_1 + FIN + + INSTANCE Node_C_2 + CODE Node_C_2 + FIN + + INSTANCE Node_D_1 + CODE Node_D_1 + FIN + + + + + +# Liste des liens + + LIEN + Node_D_1.ostream_D_1_1 0 => Node_C_2.istream_C_2_1 TI L1 EXTRANULL ; + Node_D_1.ostream_D_1_1 0 => Node_B_1.istream_B_1_1 TI L1 EXTRANULL ; + FIN + +FIN diff --git a/examples/GraphStreamTopology.py b/examples/GraphStreamTopology.py new file mode 100644 index 0000000..b80db91 --- /dev/null +++ b/examples/GraphStreamTopology.py @@ -0,0 +1,244 @@ + +# Generated python file of Graph GraphStreamTopology + +from SuperV import * +# Graph creation +GraphStreamTopology = StreamGraph( 'GraphStreamTopology' ) +GraphStreamTopology.SetStreamParams( 300 , SUPERV.WithoutTrace , 0 ) +GraphStreamTopology.SetName( 'GraphStreamTopology' ) +GraphStreamTopology.SetAuthor( 'JR' ) +GraphStreamTopology.SetComment( 'Test of SubStreamGraphs of a StreamGraph' ) +GraphStreamTopology.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyNode_A_1 = [] +PyNode_A_1.append( 'def Node_A_1() : ' ) +PyNode_A_1.append( ' return 1 ' ) +Node_A_1 = GraphStreamTopology.INode( 'Node_A_1' , PyNode_A_1 ) +Node_A_1.SetName( 'Node_A_1' ) +Node_A_1.SetAuthor( '' ) +Node_A_1.SetComment( 'Python function' ) +Node_A_1.Coords( 32 , 65 ) +INode_A_1Gate = Node_A_1.GetInPort( 'Gate' ) +ONode_A_1a_1 = Node_A_1.OutPort( 'a_1' , 'long' ) +ONode_A_1Gate = Node_A_1.GetOutPort( 'Gate' ) +INode_A_1istream_A_1_1 = Node_A_1.InStreamPort( 'istream_A_1_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_A_1istream_A_1_1.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +INode_A_1istream_A_1_2 = Node_A_1.InStreamPort( 'istream_A_1_2' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_A_1istream_A_1_2.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +INode_A_1istream_A_1_3 = Node_A_1.InStreamPort( 'istream_A_1_3' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_A_1istream_A_1_3.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) + +PyNode_A_2 = [] +PyNode_A_2.append( 'def Node_A_2() : ' ) +PyNode_A_2.append( ' return 1 ' ) +Node_A_2 = GraphStreamTopology.INode( 'Node_A_2' , PyNode_A_2 ) +Node_A_2.SetName( 'Node_A_2' ) +Node_A_2.SetAuthor( '' ) +Node_A_2.SetComment( 'Python function' ) +Node_A_2.Coords( 31 , 336 ) +INode_A_2Gate = Node_A_2.GetInPort( 'Gate' ) +ONode_A_2a_2 = Node_A_2.OutPort( 'a_2' , 'long' ) +ONode_A_2Gate = Node_A_2.GetOutPort( 'Gate' ) +INode_A_2istream_A_2_1 = Node_A_2.InStreamPort( 'istream_A_2_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_A_2istream_A_2_1.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +ONode_A_2ostream_A_2_1 = Node_A_2.OutStreamPort( 'ostream_A_2_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +ONode_A_2ostream_A_2_1.SetNumberOfValues( 0 ) + +PyNode_B_1 = [] +PyNode_B_1.append( 'def Node_B_1( n ) : ' ) +PyNode_B_1.append( ' return n ' ) +Node_B_1 = GraphStreamTopology.INode( 'Node_B_1' , PyNode_B_1 ) +Node_B_1.SetName( 'Node_B_1' ) +Node_B_1.SetAuthor( '' ) +Node_B_1.SetComment( 'Python function' ) +Node_B_1.Coords( 254 , 64 ) +INode_B_1b_1 = Node_B_1.InPort( 'b_1' , 'long' ) +INode_B_1Gate = Node_B_1.GetInPort( 'Gate' ) +ONode_B_1b_1 = Node_B_1.OutPort( 'b_1' , 'long' ) +ONode_B_1Gate = Node_B_1.GetOutPort( 'Gate' ) +INode_B_1istream_B_1_1 = Node_B_1.InStreamPort( 'istream_B_1_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_B_1istream_B_1_1.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) + +PyNode_B_2 = [] +PyNode_B_2.append( 'def Node_B_2( n ) : ' ) +PyNode_B_2.append( ' return n ' ) +Node_B_2 = GraphStreamTopology.INode( 'Node_B_2' , PyNode_B_2 ) +Node_B_2.SetName( 'Node_B_2' ) +Node_B_2.SetAuthor( '' ) +Node_B_2.SetComment( 'Python function' ) +Node_B_2.Coords( 255 , 336 ) +INode_B_2b_2 = Node_B_2.InPort( 'b_2' , 'long' ) +INode_B_2Gate = Node_B_2.GetInPort( 'Gate' ) +ONode_B_2b_2 = Node_B_2.OutPort( 'b_2' , 'long' ) +ONode_B_2Gate = Node_B_2.GetOutPort( 'Gate' ) +INode_B_2istream_B_2_1 = Node_B_2.InStreamPort( 'istream_B_2_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_B_2istream_B_2_1.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) +ONode_B_2ostream_B_2_1 = Node_B_2.OutStreamPort( 'ostream_B_2_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +ONode_B_2ostream_B_2_1.SetNumberOfValues( 0 ) +ONode_B_2ostream_B_2_2 = Node_B_2.OutStreamPort( 'ostream_B_2_2' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +ONode_B_2ostream_B_2_2.SetNumberOfValues( 0 ) + +PyNode_C_1 = [] +PyNode_C_1.append( 'def Node_C_1( n ) : ' ) +PyNode_C_1.append( ' return ' ) +Node_C_1 = GraphStreamTopology.INode( 'Node_C_1' , PyNode_C_1 ) +Node_C_1.SetName( 'Node_C_1' ) +Node_C_1.SetAuthor( '' ) +Node_C_1.SetComment( 'Python function' ) +Node_C_1.Coords( 478 , 63 ) +INode_C_1c_1 = Node_C_1.InPort( 'c_1' , 'long' ) +INode_C_1Gate = Node_C_1.GetInPort( 'Gate' ) +ONode_C_1Gate = Node_C_1.GetOutPort( 'Gate' ) +ONode_C_1ostream_C_1_1 = Node_C_1.OutStreamPort( 'ostream_C_1_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +ONode_C_1ostream_C_1_1.SetNumberOfValues( 0 ) + +PyNode_C_2 = [] +PyNode_C_2.append( 'def Node_C_2( n ) : ' ) +PyNode_C_2.append( ' return n ' ) +Node_C_2 = GraphStreamTopology.INode( 'Node_C_2' , PyNode_C_2 ) +Node_C_2.SetName( 'Node_C_2' ) +Node_C_2.SetAuthor( '' ) +Node_C_2.SetComment( 'Python function' ) +Node_C_2.Coords( 477 , 337 ) +INode_C_2c_2 = Node_C_2.InPort( 'c_2' , 'long' ) +INode_C_2Gate = Node_C_2.GetInPort( 'Gate' ) +ONode_C_2c_2 = Node_C_2.OutPort( 'c_2' , 'long' ) +ONode_C_2Gate = Node_C_2.GetOutPort( 'Gate' ) +INode_C_2istream_C_2_1 = Node_C_2.InStreamPort( 'istream_C_2_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +INode_C_2istream_C_2_1.SetParams( SUPERV.TI , SUPERV.L1 , SUPERV.EXTRANULL ) + +PyNode_D_1 = [] +PyNode_D_1.append( 'def Node_D_1( n ) : ' ) +PyNode_D_1.append( ' return ' ) +Node_D_1 = GraphStreamTopology.INode( 'Node_D_1' , PyNode_D_1 ) +Node_D_1.SetName( 'Node_D_1' ) +Node_D_1.SetAuthor( '' ) +Node_D_1.SetComment( 'Python function' ) +Node_D_1.Coords( 702 , 336 ) +INode_D_1d_1 = Node_D_1.InPort( 'd_1' , 'long' ) +INode_D_1Gate = Node_D_1.GetInPort( 'Gate' ) +ONode_D_1Gate = Node_D_1.GetOutPort( 'Gate' ) +ONode_D_1ostream_D_1_1 = Node_D_1.OutStreamPort( 'ostream_D_1_1' , SALOME_ModuleCatalog.DATASTREAM_INTEGER , SALOME_ModuleCatalog.DATASTREAM_TEMPORAL ) +ONode_D_1ostream_D_1_1.SetNumberOfValues( 0 ) + +# Creation of Links +LNode_A_1a_1Node_B_1b_1 = GraphStreamTopology.Link( ONode_A_1a_1 , INode_B_1b_1 ) + +LNode_A_2a_2Node_B_2b_2 = GraphStreamTopology.Link( ONode_A_2a_2 , INode_B_2b_2 ) + +LNode_A_2ostream_A_2_1Node_A_1istream_A_1_1 = GraphStreamTopology.StreamLink( ONode_A_2ostream_A_2_1 , INode_A_1istream_A_1_1 ) +LNode_A_2ostream_A_2_1Node_A_1istream_A_1_1.AddCoord( 1 , 14 , 162 ) +LNode_A_2ostream_A_2_1Node_A_1istream_A_1_1.AddCoord( 2 , 13 , 37 ) +LNode_A_2ostream_A_2_1Node_A_1istream_A_1_1.AddCoord( 3 , 211 , 36 ) +LNode_A_2ostream_A_2_1Node_A_1istream_A_1_1.AddCoord( 4 , 210 , 435 ) + +LNode_B_1b_1Node_C_1c_1 = GraphStreamTopology.Link( ONode_B_1b_1 , INode_C_1c_1 ) + +LNode_B_2b_2Node_C_2c_2 = GraphStreamTopology.Link( ONode_B_2b_2 , INode_C_2c_2 ) + +LNode_B_2ostream_B_2_1Node_A_1istream_A_1_2 = GraphStreamTopology.StreamLink( ONode_B_2ostream_B_2_1 , INode_A_1istream_A_1_2 ) +LNode_B_2ostream_B_2_1Node_A_1istream_A_1_2.AddCoord( 1 , 8 , 195 ) +LNode_B_2ostream_B_2_1Node_A_1istream_A_1_2.AddCoord( 2 , 7 , 324 ) +LNode_B_2ostream_B_2_1Node_A_1istream_A_1_2.AddCoord( 3 , 443 , 323 ) +LNode_B_2ostream_B_2_1Node_A_1istream_A_1_2.AddCoord( 4 , 442 , 434 ) + +LNode_B_2ostream_B_2_2Node_A_2istream_A_2_1 = GraphStreamTopology.StreamLink( ONode_B_2ostream_B_2_2 , INode_A_2istream_A_2_1 ) +LNode_B_2ostream_B_2_2Node_A_2istream_A_2_1.AddCoord( 1 , 16 , 433 ) +LNode_B_2ostream_B_2_2Node_A_2istream_A_2_1.AddCoord( 2 , 15 , 583 ) +LNode_B_2ostream_B_2_2Node_A_2istream_A_2_1.AddCoord( 3 , 434 , 584 ) +LNode_B_2ostream_B_2_2Node_A_2istream_A_2_1.AddCoord( 4 , 434 , 467 ) + +LNode_C_1ostream_C_1_1Node_A_1istream_A_1_3 = GraphStreamTopology.StreamLink( ONode_C_1ostream_C_1_1 , INode_A_1istream_A_1_3 ) +LNode_C_1ostream_C_1_1Node_A_1istream_A_1_3.AddCoord( 1 , 21 , 226 ) +LNode_C_1ostream_C_1_1Node_A_1istream_A_1_3.AddCoord( 2 , 20 , 296 ) +LNode_C_1ostream_C_1_1Node_A_1istream_A_1_3.AddCoord( 3 , 663 , 295 ) +LNode_C_1ostream_C_1_1Node_A_1istream_A_1_3.AddCoord( 4 , 662 , 161 ) + +LNode_C_2c_2Node_D_1d_1 = GraphStreamTopology.Link( ONode_C_2c_2 , INode_D_1d_1 ) + +LNode_D_1ostream_D_1_1Node_B_2istream_B_2_1 = GraphStreamTopology.StreamLink( ONode_D_1ostream_D_1_1 , INode_B_2istream_B_2_1 ) +LNode_D_1ostream_D_1_1Node_B_2istream_B_2_1.AddCoord( 1 , 232 , 433 ) +LNode_D_1ostream_D_1_1Node_B_2istream_B_2_1.AddCoord( 2 , 231 , 553 ) +LNode_D_1ostream_D_1_1Node_B_2istream_B_2_1.AddCoord( 3 , 903 , 553 ) +LNode_D_1ostream_D_1_1Node_B_2istream_B_2_1.AddCoord( 4 , 902 , 434 ) + +LNode_D_1ostream_D_1_1Node_C_2istream_C_2_1 = GraphStreamTopology.StreamLink( ONode_D_1ostream_D_1_1 , INode_C_2istream_C_2_1 ) +LNode_D_1ostream_D_1_1Node_C_2istream_C_2_1.AddCoord( 1 , 461 , 434 ) +LNode_D_1ostream_D_1_1Node_C_2istream_C_2_1.AddCoord( 2 , 461 , 524 ) +LNode_D_1ostream_D_1_1Node_C_2istream_C_2_1.AddCoord( 3 , 889 , 525 ) +LNode_D_1ostream_D_1_1Node_C_2istream_C_2_1.AddCoord( 4 , 888 , 434 ) + +LNode_D_1ostream_D_1_1Node_B_1istream_B_1_1 = GraphStreamTopology.StreamLink( ONode_D_1ostream_D_1_1 , INode_B_1istream_B_1_1 ) +LNode_D_1ostream_D_1_1Node_B_1istream_B_1_1.AddCoord( 1 , 236 , 162 ) +LNode_D_1ostream_D_1_1Node_B_1istream_B_1_1.AddCoord( 2 , 236 , 249 ) +LNode_D_1ostream_D_1_1Node_B_1istream_B_1_1.AddCoord( 3 , 887 , 249 ) +LNode_D_1ostream_D_1_1Node_B_1istream_B_1_1.AddCoord( 4 , 888 , 432 ) + +# Output Ports of the graph + + + + +GraphStreamTopology.Run() +GraphStreamTopology.DoneW() +print GraphStreamTopology.State() + +GraphStreamTopology.PrintPorts() + +subgraphs = GraphStreamTopology.SubGraphsNumber() +i = 1 +while i <= subgraphs : + nodes = GraphStreamTopology.SubGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +substreamgraphs = GraphStreamTopology.SubStreamGraphsNumber() +i = 1 +while i <= substreamgraphs : + nodes = GraphStreamTopology.SubStreamGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubStreamGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + + +GraphStreamTopology.Export( '/tmp/GraphStreamTopology.xml' ) + +GraphStreamTopology = StreamGraph( '/tmp/GraphStreamTopology.xml' ) + +GraphStreamTopology.PrintPorts() + +GraphStreamTopology.Run() +GraphStreamTopology.DoneW() +GraphStreamTopology.State() + +subgraphs = GraphStreamTopology.SubGraphsNumber() +i = 1 +while i <= subgraphs : + nodes = GraphStreamTopology.SubGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +substreamgraphs = GraphStreamTopology.SubStreamGraphsNumber() +i = 1 +while i <= substreamgraphs : + nodes = GraphStreamTopology.SubStreamGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubStreamGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + diff --git a/examples/GraphStreamTopology.xml b/examples/GraphStreamTopology.xml new file mode 100644 index 0000000..0339d49 --- /dev/null +++ b/examples/GraphStreamTopology.xml @@ -0,0 +1,457 @@ + + + + +? + ? + GraphStreamTopology + 9 + 300 + 0 + 0 + ? + +GraphStreamTopology + + + + + 4/5/2004 - 10:4:18 + 21/5/2004 - 10:17:39 + 2.0 + JR + ? + Test of SubStreamGraphs of a StreamGraph + 0 + 0 + + +? + ? + Node_A_1 + 3 + ? + +Node_A_1 + + + +long + a_1 + + +1 + istream_A_1_1 + 1 + 1 + 2 + 0 + +1 + istream_A_1_2 + 1 + 1 + 2 + 0 + +1 + istream_A_1_3 + 1 + 1 + 2 + 0 + + +Node_A_1 + + + 21/5/2004 - 10:17:39 + 21/5/2004 - 10:17:39 + 2.0 + ? + ? + Python function + 32 + 65 + +? + ? + Node_A_2 + 3 + ? + +Node_A_2 + + + +long + a_2 + + +1 + istream_A_2_1 + 1 + 1 + 2 + 0 + +1 + ostream_A_2_1 + 1 + 0 + + +Node_A_2 + + + 21/5/2004 - 10:17:39 + 21/5/2004 - 10:17:39 + 2.0 + ? + ? + Python function + 31 + 336 + +? + ? + Node_B_1 + 3 + ? + +Node_B_1 + + +long + b_1 + + +long + b_1 + + +1 + istream_B_1_1 + 1 + 1 + 2 + 0 + + +Node_B_1 + + + 21/5/2004 - 10:17:39 + 21/5/2004 - 10:17:39 + 2.0 + ? + ? + Python function + 254 + 64 + +? + ? + Node_B_2 + 3 + ? + +Node_B_2 + + +long + b_2 + + +long + b_2 + + +1 + istream_B_2_1 + 1 + 1 + 2 + 0 + +1 + ostream_B_2_1 + 1 + 0 + +1 + ostream_B_2_2 + 1 + 0 + + +Node_B_2 + + + 21/5/2004 - 10:17:39 + 21/5/2004 - 10:17:39 + 2.0 + ? + ? + Python function + 255 + 336 + +? + ? + Node_C_1 + 3 + ? + +Node_C_1 + + +long + c_1 + + + +1 + ostream_C_1_1 + 1 + 0 + + +Node_C_1 + + + 21/5/2004 - 10:17:39 + 21/5/2004 - 10:17:39 + 2.0 + ? + ? + Python function + 478 + 63 + +? + ? + Node_C_2 + 3 + ? + +Node_C_2 + + +long + c_2 + + +long + c_2 + + +1 + istream_C_2_1 + 1 + 1 + 2 + 0 + + +Node_C_2 + + + 21/5/2004 - 10:17:39 + 21/5/2004 - 10:17:39 + 2.0 + ? + ? + Python function + 477 + 337 + +? + ? + Node_D_1 + 3 + ? + +Node_D_1 + + +long + d_1 + + + +1 + ostream_D_1_1 + 1 + 0 + + +Node_D_1 + + + 21/5/2004 - 10:17:39 + 21/5/2004 - 10:17:39 + 2.0 + ? + ? + Python function + 702 + 336 + + +Node_A_1 + a_1 + Node_B_1 + b_1 + + +Node_A_2 + a_2 + Node_B_2 + b_2 + + +Node_A_2 + ostream_A_2_1 + Node_A_1 + istream_A_1_1 + + +14 + 162 + +13 + 37 + +211 + 36 + +210 + 435 + +Node_B_1 + b_1 + Node_C_1 + c_1 + + +Node_B_2 + b_2 + Node_C_2 + c_2 + + +Node_B_2 + ostream_B_2_1 + Node_A_1 + istream_A_1_2 + + +8 + 195 + +7 + 324 + +443 + 323 + +442 + 434 + +Node_B_2 + ostream_B_2_2 + Node_A_2 + istream_A_2_1 + + +16 + 433 + +15 + 583 + +434 + 584 + +434 + 467 + +Node_C_1 + ostream_C_1_1 + Node_A_1 + istream_A_1_3 + + +21 + 226 + +20 + 296 + +663 + 295 + +662 + 161 + +Node_C_2 + c_2 + Node_D_1 + d_1 + + +Node_D_1 + ostream_D_1_1 + Node_B_2 + istream_B_2_1 + + +232 + 433 + +231 + 553 + +903 + 553 + +902 + 434 + +Node_D_1 + ostream_D_1_1 + Node_C_2 + istream_C_2_1 + + +461 + 434 + +461 + 524 + +889 + 525 + +888 + 434 + +Node_D_1 + ostream_D_1_1 + Node_B_1 + istream_B_1_1 + + +236 + 162 + +236 + 249 + +887 + 249 + +888 + 432 + diff --git a/examples/GraphStreamTopology_1.cpl b/examples/GraphStreamTopology_1.cpl new file mode 100644 index 0000000..a9cd739 --- /dev/null +++ b/examples/GraphStreamTopology_1.cpl @@ -0,0 +1,101 @@ +DEBUT GraphStreamTopology_1 + TIMEOUT 300 + TRACE SANS + DELTA_T 0 + + +# Liste des codes + + CODE Node_A_1 + istream_A_1_1 T IN ENTIER + istream_A_1_2 T IN ENTIER + istream_A_1_3 T IN ENTIER + FIN #Node_A_1 + + + CODE Node_A_2 + istream_A_2_1 T IN ENTIER + ostream_A_2_1 T OUT ENTIER + FIN #Node_A_2 + + + CODE Node_B_1 + istream_B_1_1 T IN ENTIER + ostream_A_2_1 T OUT ENTIER + FIN #Node_B_1 + + + CODE Node_B_2 + istream_B_2_1 T IN ENTIER + ostream_B_2_1 T OUT ENTIER + ostream_B_2_2 T OUT ENTIER + FIN #Node_B_2 + + + CODE Node_C_1 + istream_B_2_1 T IN ENTIER + ostream_C_1_1 T OUT ENTIER + FIN #Node_C_1 + + + CODE Node_C_2 + istream_C_2_1 T IN ENTIER + ostream_C_1_1 T OUT ENTIER + FIN #Node_C_2 + + + CODE Node_D_1 + istream_C_2_1 T IN ENTIER + ostream_D_1_1 T OUT ENTIER + FIN #Node_D_1 + + + + +# Liste des instances + + INSTANCE Node_A_1 + CODE Node_A_1 + FIN + + INSTANCE Node_A_2 + CODE Node_A_2 + FIN + + INSTANCE Node_B_1 + CODE Node_B_1 + FIN + + INSTANCE Node_B_2 + CODE Node_B_2 + FIN + + INSTANCE Node_C_1 + CODE Node_C_1 + FIN + + INSTANCE Node_C_2 + CODE Node_C_2 + FIN + + INSTANCE Node_D_1 + CODE Node_D_1 + FIN + + + + + +# Liste des liens + + LIEN + Node_A_2.ostream_A_2_1 0 => Node_A_1.istream_A_1_1 TI L1 EXTRANULL ; + Node_B_2.ostream_B_2_1 0 => Node_A_1.istream_A_1_2 TI L1 EXTRANULL ; + Node_B_2.ostream_B_2_2 0 => Node_A_2.istream_A_2_1 TI L1 EXTRANULL ; + Node_C_1.ostream_C_1_1 0 => Node_A_1.istream_A_1_3 TI L1 EXTRANULL ; + Node_D_1.ostream_D_1_1 0 => Node_B_2.istream_B_2_1 TI L1 EXTRANULL ; + Node_D_1.ostream_D_1_1 0 => Node_C_2.istream_C_2_1 TI L1 EXTRANULL ; + Node_D_1.ostream_D_1_1 0 => Node_B_1.istream_B_1_1 TI L1 EXTRANULL ; + FIN + +FIN diff --git a/examples/GraphStream_1.cpl b/examples/GraphStream_1.cpl new file mode 100644 index 0000000..963a85c --- /dev/null +++ b/examples/GraphStream_1.cpl @@ -0,0 +1,45 @@ +DEBUT GraphStream_1 + TIMEOUT 300 + TRACE SANS + DELTA_T 0 + + +# Liste des codes + + CODE Add + istream I IN ENTIER + ostream I OUT ENTIER + OStream I OUT ENTIER + FIN #Add + + + CODE Sub + istream I IN ENTIER + Istream I IN ENTIER + FIN #Sub + + + + +# Liste des instances + + INSTANCE Add + CODE Add + FIN + + INSTANCE Sub + CODE Sub + FIN + + + + + +# Liste des liens + + LIEN + Add.ostream 0 => Sub.istream SCHENULL INTERNULL EXTRANULL ; + Add.OStream 0 => Sub.Istream SCHENULL INTERNULL EXTRANULL ; + FIN + +FIN diff --git a/examples/GraphStream_2.cpl b/examples/GraphStream_2.cpl new file mode 100644 index 0000000..cb8df94 --- /dev/null +++ b/examples/GraphStream_2.cpl @@ -0,0 +1,33 @@ +DEBUT GraphStream_2 + TIMEOUT 300 + TRACE SANS + DELTA_T 0 + + +# Liste des codes + + CODE StreamAdd + istream I IN ENTIER + ostream I OUT ENTIER + OStream I OUT ENTIER + FIN #StreamAdd + + + + +# Liste des instances + + INSTANCE StreamAdd + CODE StreamAdd + FIN + + + + + +# Liste des liens + + LIEN + FIN + +FIN diff --git a/examples/GraphStream_3.cpl b/examples/GraphStream_3.cpl new file mode 100644 index 0000000..4f31cef --- /dev/null +++ b/examples/GraphStream_3.cpl @@ -0,0 +1,31 @@ +DEBUT GraphStream_3 + TIMEOUT 300 + TRACE SANS + DELTA_T 0 + + +# Liste des codes + + CODE Div + ostream I OUT ENTIER + FIN #Div + + + + +# Liste des instances + + INSTANCE Div + CODE Div + FIN + + + + + +# Liste des liens + + LIEN + FIN + +FIN diff --git a/examples/GraphStreams.py b/examples/GraphStreams.py new file mode 100644 index 0000000..c9a9601 --- /dev/null +++ b/examples/GraphStreams.py @@ -0,0 +1,404 @@ + +# Generated python file of Graph GraphStreams + +from SuperV import * +# Graph creation +GraphStreams = StreamGraph( 'GraphStreams' ) +GraphStreams.SetStreamParams( 1000 , SUPERV.SummaryTrace , 1.5 ) +GraphStreams.SetName( 'GraphStreams' ) +GraphStreams.SetAuthor( 'JR' ) +GraphStreams.SetComment( 'Graph with DataStreamPorts CEA/EDF : Calcium' ) +GraphStreams.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +Add = GraphStreams.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Add' ) +Add.SetName( 'Add' ) +Add.SetAuthor( '' ) +Add.SetContainer( 'FactoryServer' ) +Add.SetComment( 'Add from DataStreamFactory' ) +Add.Coords( 255 , 171 ) +IAddx = Add.GetInPort( 'x' ) +IAddy = Add.GetInPort( 'y' ) +IAddGate = Add.GetInPort( 'Gate' ) +OAddz = Add.GetOutPort( 'z' ) +OAddGate = Add.GetOutPort( 'Gate' ) +IAddistream = Add.GetInStreamPort( 'istream' ) +IAddistream.SetParams( SUPERV.SCHENULL , SUPERV.INTERNULL , SUPERV.EXTRANULL ) +OAddostream = Add.GetOutStreamPort( 'ostream' ) +OAddostream.SetNumberOfValues( 0 ) +OAddOStream = Add.GetOutStreamPort( 'OStream' ) +OAddOStream.SetNumberOfValues( 10 ) + +Sub = GraphStreams.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Sub' ) +Sub.SetName( 'Sub' ) +Sub.SetAuthor( '' ) +Sub.SetContainer( 'FactoryServer' ) +Sub.SetComment( 'Sub from DataStreamFactory' ) +Sub.Coords( 519 , 48 ) +ISubx = Sub.GetInPort( 'x' ) +ISuby = Sub.GetInPort( 'y' ) +ISubGate = Sub.GetInPort( 'Gate' ) +OSubz = Sub.GetOutPort( 'z' ) +OSubGate = Sub.GetOutPort( 'Gate' ) +ISubistream = Sub.GetInStreamPort( 'istream' ) +ISubistream.SetParams( SUPERV.SCHENULL , SUPERV.INTERNULL , SUPERV.EXTRANULL ) +ISubIstream = Sub.GetInStreamPort( 'Istream' ) +ISubIstream.SetParams( SUPERV.SCHENULL , SUPERV.INTERNULL , SUPERV.EXTRANULL ) + +Mul = GraphStreams.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Mul' ) +Mul.SetName( 'Mul' ) +Mul.SetAuthor( '' ) +Mul.SetContainer( 'FactoryServer' ) +Mul.SetComment( 'Mul from DataStreamFactory' ) +Mul.Coords( 724 , 142 ) +IMulx = Mul.GetInPort( 'x' ) +IMuly = Mul.GetInPort( 'y' ) +IMulGate = Mul.GetInPort( 'Gate' ) +OMulz = Mul.GetOutPort( 'z' ) +OMulGate = Mul.GetOutPort( 'Gate' ) + +Div = GraphStreams.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Div' ) +Div.SetName( 'Div' ) +Div.SetAuthor( '' ) +Div.SetContainer( 'FactoryServer' ) +Div.SetComment( 'Div from DataStreamFactory' ) +Div.Coords( 935 , 48 ) +IDivx = Div.GetInPort( 'x' ) +IDivy = Div.GetInPort( 'y' ) +IDivGate = Div.GetInPort( 'Gate' ) +ODivz = Div.GetOutPort( 'z' ) +ODivGate = Div.GetOutPort( 'Gate' ) +ODivostream = Div.GetOutStreamPort( 'ostream' ) +ODivostream.SetNumberOfValues( 0 ) + +Add_1 = GraphStreams.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Add' ) +Add_1.SetName( 'Add_1' ) +Add_1.SetAuthor( '' ) +Add_1.SetContainer( 'localhost/FactoryServer' ) +Add_1.SetComment( 'Add from DataStreamFactory' ) +Add_1.Coords( 252 , 499 ) +IAdd_1x = Add_1.GetInPort( 'x' ) +IAdd_1y = Add_1.GetInPort( 'y' ) +IAdd_1Gate = Add_1.GetInPort( 'Gate' ) +OAdd_1z = Add_1.GetOutPort( 'z' ) +OAdd_1Gate = Add_1.GetOutPort( 'Gate' ) +IAdd_1istream = Add_1.GetInStreamPort( 'istream' ) +IAdd_1istream.SetParams( SUPERV.SCHENULL , SUPERV.INTERNULL , SUPERV.EXTRANULL ) +OAdd_1ostream = Add_1.GetOutStreamPort( 'ostream' ) +OAdd_1ostream.SetNumberOfValues( 0 ) +OAdd_1OStream = Add_1.GetOutStreamPort( 'OStream' ) +OAdd_1OStream.SetNumberOfValues( 0 ) + +Sub_1 = GraphStreams.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Sub' ) +Sub_1.SetName( 'Sub_1' ) +Sub_1.SetAuthor( '' ) +Sub_1.SetContainer( 'localhost/FactoryServer' ) +Sub_1.SetComment( 'Sub from DataStreamFactory' ) +Sub_1.Coords( 516 , 385 ) +ISub_1x = Sub_1.GetInPort( 'x' ) +ISub_1y = Sub_1.GetInPort( 'y' ) +ISub_1Gate = Sub_1.GetInPort( 'Gate' ) +OSub_1z = Sub_1.GetOutPort( 'z' ) +OSub_1Gate = Sub_1.GetOutPort( 'Gate' ) +ISub_1istream = Sub_1.GetInStreamPort( 'istream' ) +ISub_1istream.SetParams( SUPERV.SCHENULL , SUPERV.INTERNULL , SUPERV.EXTRANULL ) +ISub_1Istream = Sub_1.GetInStreamPort( 'Istream' ) +ISub_1Istream.SetParams( SUPERV.SCHENULL , SUPERV.INTERNULL , SUPERV.EXTRANULL ) + +Mul_1 = GraphStreams.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Mul' ) +Mul_1.SetName( 'Mul_1' ) +Mul_1.SetAuthor( '' ) +Mul_1.SetContainer( 'localhost/FactoryServer' ) +Mul_1.SetComment( 'Mul from DataStreamFactory' ) +Mul_1.Coords( 731 , 487 ) +IMul_1x = Mul_1.GetInPort( 'x' ) +IMul_1y = Mul_1.GetInPort( 'y' ) +IMul_1Gate = Mul_1.GetInPort( 'Gate' ) +OMul_1z = Mul_1.GetOutPort( 'z' ) +OMul_1Gate = Mul_1.GetOutPort( 'Gate' ) + +Div_1 = GraphStreams.FNode( 'DataStreamFactory' , 'DataStreamFactory' , 'Div' ) +Div_1.SetName( 'Div_1' ) +Div_1.SetAuthor( '' ) +Div_1.SetContainer( 'localhost/FactoryServer' ) +Div_1.SetComment( 'Div from DataStreamFactory' ) +Div_1.Coords( 931 , 385 ) +IDiv_1x = Div_1.GetInPort( 'x' ) +IDiv_1y = Div_1.GetInPort( 'y' ) +IDiv_1Gate = Div_1.GetInPort( 'Gate' ) +ODiv_1z = Div_1.GetOutPort( 'z' ) +ODiv_1Gate = Div_1.GetOutPort( 'Gate' ) +ODiv_1ostream = Div_1.GetOutStreamPort( 'ostream' ) +ODiv_1ostream.SetNumberOfValues( 0 ) + +# Creation of Loop Nodes +PyLoop = [] +PyLoop.append( 'import time ' ) +PyLoop.append( 'def Init(Index,Min,Max,Incr,Z_Div,Z_Div_1,y_Add,x_Sub) : ' ) +PyLoop.append( ' if Min <= Max : ' ) +PyLoop.append( ' Index = Min ' ) +PyLoop.append( ' else : ' ) +PyLoop.append( ' Index = Max ' ) +PyLoop.append( ' time.sleep( 1 ) ' ) +PyLoop.append( ' return Index,Min,Max,Incr,Z_Div,Z_Div_1,y_Add,x_Sub ' ) +PyMoreLoop = [] +PyMoreLoop.append( 'import time ' ) +PyMoreLoop.append( 'def More(Index,Min,Max,Incr,Z_Div,Z_Div_1,y_Add,x_Sub) : ' ) +PyMoreLoop.append( ' if Index < Max : ' ) +PyMoreLoop.append( ' DoLoop = 1 ' ) +PyMoreLoop.append( ' else : ' ) +PyMoreLoop.append( ' DoLoop = 0 ' ) +PyMoreLoop.append( ' time.sleep( 1 ) ' ) +PyMoreLoop.append( ' return DoLoop,Index,Min,Max,Incr,Z_Div,Z_Div_1,y_Add,x_Sub ' ) +PyNextLoop = [] +PyNextLoop.append( 'import time ' ) +PyNextLoop.append( 'def Next(Index,Min,Max,Incr,Z_Div,Z_Div_1,y_Add,x_Sub) : ' ) +PyNextLoop.append( ' Index = Index + Incr ' ) +PyNextLoop.append( ' time.sleep( 1 ) ' ) +PyNextLoop.append( ' return Index,Min,Max,Incr,Z_Div,Z_Div_1,y_Add,x_Sub ' ) +Loop,EndLoop = GraphStreams.LNode( 'Init' , PyLoop , 'More' , PyMoreLoop , 'Next' , PyNextLoop ) +EndLoop.SetName( 'EndLoop' ) +EndLoop.SetAuthor( '' ) +EndLoop.SetComment( '' ) +EndLoop.Coords( 1158 , 393 ) +PyEndLoop = [] +EndLoop.SetPyFunction( 'EndInit' , PyEndLoop ) +ILoopInitLoop = Loop.GetInPort( 'InitLoop' ) +ILoopIndex = Loop.InPort( 'Index' , 'long' ) +ILoopMin = Loop.InPort( 'Min' , 'long' ) +ILoopMax = Loop.InPort( 'Max' , 'long' ) +ILoopIncr = Loop.InPort( 'Incr' , 'long' ) +ILoopz_Div = Loop.InPort( 'z_Div' , 'double' ) +ILoopz_Div_1 = Loop.InPort( 'z_Div_1' , 'double' ) +ILoopy_Add = Loop.InPort( 'y_Add' , 'double' ) +ILoopx_Sub = Loop.InPort( 'x_Sub' , 'double' ) +ILoopGate = Loop.GetInPort( 'Gate' ) +OLoopDoLoop = Loop.GetOutPort( 'DoLoop' ) +OLoopIndex = Loop.GetOutPort( 'Index' ) +OLoopMin = Loop.GetOutPort( 'Min' ) +OLoopMax = Loop.GetOutPort( 'Max' ) +OLoopIncr = Loop.GetOutPort( 'Incr' ) +OLoopz_Div = Loop.GetOutPort( 'z_Div' ) +OLoopz_Div_1 = Loop.GetOutPort( 'z_Div_1' ) +OLoopy_Add = Loop.GetOutPort( 'y_Add' ) +OLoopx_Sub = Loop.GetOutPort( 'x_Sub' ) +IEndLoopDoLoop = EndLoop.GetInPort( 'DoLoop' ) +IEndLoopIndex = EndLoop.GetInPort( 'Index' ) +IEndLoopMin = EndLoop.GetInPort( 'Min' ) +IEndLoopMax = EndLoop.GetInPort( 'Max' ) +IEndLoopIncr = EndLoop.GetInPort( 'Incr' ) +IEndLoopz_Div = EndLoop.GetInPort( 'z_Div' ) +IEndLoopz_Div_1 = EndLoop.GetInPort( 'z_Div_1' ) +IEndLoopy_Add = EndLoop.GetInPort( 'y_Add' ) +IEndLoopx_Sub = EndLoop.GetInPort( 'x_Sub' ) +IEndLoopGate = EndLoop.GetInPort( 'Gate' ) +OEndLoopDoLoop = EndLoop.GetOutPort( 'DoLoop' ) +OEndLoopIndex = EndLoop.GetOutPort( 'Index' ) +OEndLoopMin = EndLoop.GetOutPort( 'Min' ) +OEndLoopMax = EndLoop.GetOutPort( 'Max' ) +OEndLoopIncr = EndLoop.GetOutPort( 'Incr' ) +OEndLoopz_Div = EndLoop.GetOutPort( 'z_Div' ) +OEndLoopz_Div_1 = EndLoop.GetOutPort( 'z_Div_1' ) +OEndLoopy_Add = EndLoop.GetOutPort( 'y_Add' ) +OEndLoopx_Sub = EndLoop.GetOutPort( 'x_Sub' ) +Loop.SetName( 'Loop' ) +Loop.SetAuthor( '' ) +Loop.SetComment( '' ) +Loop.Coords( 5 , 391 ) + +# Creation of Links +LAddzSuby = GraphStreams.Link( OAddz , ISuby ) +LAddzSuby.AddCoord( 1 , 448 , 143 ) +LAddzSuby.AddCoord( 2 , 449 , 237 ) + +LAddzMuly = GraphStreams.Link( OAddz , IMuly ) +LAddzMuly.AddCoord( 1 , 708 , 237 ) +LAddzMuly.AddCoord( 2 , 708 , 270 ) +LAddzMuly.AddCoord( 3 , 449 , 270 ) +LAddzMuly.AddCoord( 4 , 448 , 238 ) + +LAddostreamSubistream = GraphStreams.StreamLink( OAddostream , ISubistream ) +LAddostreamSubistream.AddCoord( 1 , 474 , 175 ) +LAddostreamSubistream.AddCoord( 2 , 474 , 297 ) + +LAddOStreamSubIstream = GraphStreams.StreamLink( OAddOStream , ISubIstream ) +LAddOStreamSubIstream.AddCoord( 1 , 497 , 207 ) +LAddOStreamSubIstream.AddCoord( 2 , 498 , 328 ) + +LSubzMulx = GraphStreams.Link( OSubz , IMulx ) +LSubzMulx.AddCoord( 1 , 706 , 207 ) +LSubzMulx.AddCoord( 2 , 706 , 114 ) + +LSubzDivx = GraphStreams.Link( OSubz , IDivx ) + +LMulzDivy = GraphStreams.Link( OMulz , IDivy ) +LMulzDivy.AddCoord( 1 , 912 , 143 ) +LMulzDivy.AddCoord( 2 , 911 , 208 ) + +LDivzEndLoopz_Div = GraphStreams.Link( ODivz , IEndLoopz_Div ) +LDivzEndLoopz_Div.AddCoord( 1 , 1147 , 537 ) +LDivzEndLoopz_Div.AddCoord( 2 , 1148 , 113 ) + +LDivostreamAdd_1istream = GraphStreams.StreamLink( ODivostream , IAdd_1istream ) +LDivostreamAdd_1istream.AddCoord( 1 , 233 , 626 ) +LDivostreamAdd_1istream.AddCoord( 2 , 232 , 763 ) +LDivostreamAdd_1istream.AddCoord( 3 , 1126 , 763 ) +LDivostreamAdd_1istream.AddCoord( 4 , 1125 , 175 ) + +LAdd_1zSub_1y = GraphStreams.Link( OAdd_1z , ISub_1y ) +LAdd_1zSub_1y.AddCoord( 1 , 445 , 478 ) +LAdd_1zSub_1y.AddCoord( 2 , 444 , 566 ) + +LAdd_1zMul_1y = GraphStreams.Link( OAdd_1z , IMul_1y ) +LAdd_1zMul_1y.AddCoord( 1 , 703 , 582 ) +LAdd_1zMul_1y.AddCoord( 2 , 703 , 677 ) +LAdd_1zMul_1y.AddCoord( 3 , 445 , 678 ) +LAdd_1zMul_1y.AddCoord( 4 , 444 , 567 ) + +LAdd_1ostreamSub_1istream = GraphStreams.StreamLink( OAdd_1ostream , ISub_1istream ) +LAdd_1ostreamSub_1istream.AddCoord( 1 , 473 , 511 ) +LAdd_1ostreamSub_1istream.AddCoord( 2 , 473 , 627 ) + +LAdd_1OStreamSub_1Istream = GraphStreams.StreamLink( OAdd_1OStream , ISub_1Istream ) +LAdd_1OStreamSub_1Istream.AddCoord( 1 , 498 , 543 ) +LAdd_1OStreamSub_1Istream.AddCoord( 2 , 497 , 658 ) + +LSub_1zMul_1x = GraphStreams.Link( OSub_1z , IMul_1x ) +LSub_1zMul_1x.AddCoord( 1 , 708 , 552 ) +LSub_1zMul_1x.AddCoord( 2 , 707 , 450 ) + +LSub_1zDiv_1x = GraphStreams.Link( OSub_1z , IDiv_1x ) + +LMul_1zDiv_1y = GraphStreams.Link( OMul_1z , IDiv_1y ) +LMul_1zDiv_1y.AddCoord( 1 , 913 , 479 ) +LMul_1zDiv_1y.AddCoord( 2 , 913 , 551 ) + +LDiv_1zEndLoopz_Div_1 = GraphStreams.Link( ODiv_1z , IEndLoopz_Div_1 ) +LDiv_1zEndLoopz_Div_1.AddCoord( 1 , 1138 , 567 ) +LDiv_1zEndLoopz_Div_1.AddCoord( 2 , 1138 , 449 ) + +LDiv_1ostreamAddistream = GraphStreams.StreamLink( ODiv_1ostream , IAddistream ) +LDiv_1ostreamAddistream.AddCoord( 1 , 229 , 297 ) +LDiv_1ostreamAddistream.AddCoord( 2 , 229 , 426 ) +LDiv_1ostreamAddistream.AddCoord( 3 , 475 , 425 ) +LDiv_1ostreamAddistream.AddCoord( 4 , 475 , 352 ) +LDiv_1ostreamAddistream.AddCoord( 5 , 1110 , 352 ) +LDiv_1ostreamAddistream.AddCoord( 6 , 1111 , 512 ) + +LLoopIndexEndLoopIndex = GraphStreams.Link( OLoopIndex , IEndLoopIndex ) + +LLoopIndexAddx = GraphStreams.Link( OLoopIndex , IAddx ) +LLoopIndexAddx.AddCoord( 1 , 201 , 236 ) +LLoopIndexAddx.AddCoord( 2 , 202 , 420 ) + +LLoopIndexAdd_1x = GraphStreams.Link( OLoopIndex , IAdd_1x ) +LLoopIndexAdd_1x.AddCoord( 1 , 201 , 562 ) +LLoopIndexAdd_1x.AddCoord( 2 , 202 , 422 ) + +LLoopMinEndLoopMin = GraphStreams.Link( OLoopMin , IEndLoopMin ) + +LLoopMaxEndLoopMax = GraphStreams.Link( OLoopMax , IEndLoopMax ) + +LLoopIncrEndLoopIncr = GraphStreams.Link( OLoopIncr , IEndLoopIncr ) + +LLoopy_AddEndLoopy_Add = GraphStreams.Link( OLoopy_Add , IEndLoopy_Add ) + +LLoopy_AddAddy = GraphStreams.Link( OLoopy_Add , IAddy ) +LLoopy_AddAddy.AddCoord( 1 , 183 , 266 ) +LLoopy_AddAddy.AddCoord( 2 , 182 , 593 ) + +LLoopy_AddAdd_1y = GraphStreams.Link( OLoopy_Add , IAdd_1y ) + +LLoopx_SubEndLoopx_Sub = GraphStreams.Link( OLoopx_Sub , IEndLoopx_Sub ) + +LLoopx_SubSubx = GraphStreams.Link( OLoopx_Sub , ISubx ) +LLoopx_SubSubx.AddCoord( 1 , 167 , 113 ) +LLoopx_SubSubx.AddCoord( 2 , 167 , 625 ) + +LLoopx_SubSub_1x = GraphStreams.Link( OLoopx_Sub , ISub_1x ) +LLoopx_SubSub_1x.AddCoord( 1 , 167 , 450 ) +LLoopx_SubSub_1x.AddCoord( 2 , 168 , 624 ) + +# Input datas +ILoopIndex.Input( 0 ) +ILoopMin.Input( 1 ) +ILoopMax.Input( 10 ) +ILoopIncr.Input( 1 ) +ILoopz_Div.Input( 0 ) +ILoopz_Div_1.Input( 0 ) +ILoopy_Add.Input( 4.5 ) +ILoopx_Sub.Input( 1.5 ) + +# Output Ports of the graph +#OLoopz_Div = Loop.GetOutPort( 'z_Div' ) +#OLoopz_Div_1 = Loop.GetOutPort( 'z_Div_1' ) +#OEndLoopIndex = EndLoop.GetOutPort( 'Index' ) +#OEndLoopMin = EndLoop.GetOutPort( 'Min' ) +#OEndLoopMax = EndLoop.GetOutPort( 'Max' ) +#OEndLoopIncr = EndLoop.GetOutPort( 'Incr' ) +#OEndLoopz_Div = EndLoop.GetOutPort( 'z_Div' ) +#OEndLoopz_Div_1 = EndLoop.GetOutPort( 'z_Div_1' ) +#OEndLoopy_Add = EndLoop.GetOutPort( 'y_Add' ) +#OEndLoopx_Sub = EndLoop.GetOutPort( 'x_Sub' ) + + +GraphStreams.Run() +GraphStreams.DoneW() +GraphStreams.State() + +GraphStreams.PrintPorts() + +subgraphs = GraphStreams.SubGraphsNumber() +i = 1 +while i <= subgraphs : + nodes = GraphStreams.SubGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +substreamgraphs = GraphStreams.SubStreamGraphsNumber() +i = 1 +while i <= substreamgraphs : + nodes = GraphStreams.SubStreamGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubStreamGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +GraphStreams.Export('/tmp/GraphStreams.xml') + +GraphStreams = StreamGraph( '/tmp/GraphStreams.xml' ) +GraphStreams.Run() +GraphStreams.DoneW() +GraphStreams.PrintPorts() +print GraphStreams.State() + +GraphStreams.IsExecutable() + +subgraphs = GraphStreams.SubGraphsNumber() +i = 1 +while i <= subgraphs : + nodes = GraphStreams.SubGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +substreamgraphs = GraphStreams.SubStreamGraphsNumber() +i = 1 +while i <= substreamgraphs : + nodes = GraphStreams.SubStreamGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubStreamGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + diff --git a/examples/GraphStreams.xml b/examples/GraphStreams.xml new file mode 100644 index 0000000..c374a34 --- /dev/null +++ b/examples/GraphStreams.xml @@ -0,0 +1,973 @@ + + + + +? + ? + GraphStreams + 9 + 1000 + 1 + 1.5 + ? + +GraphStreams + + +long + Loop\Index + +long + Loop\Min + +long + Loop\Max + +long + Loop\Incr + +double + Loop\z_Div + +double + Loop\z_Div_1 + +double + Loop\y_Add + +double + Loop\x_Sub + + +double + Loop\z_Div + +double + Loop\z_Div_1 + +long + EndLoop\Index + +long + EndLoop\Min + +long + EndLoop\Max + +long + EndLoop\Incr + +double + EndLoop\z_Div + +double + EndLoop\z_Div_1 + +double + EndLoop\y_Add + +double + EndLoop\x_Sub + + + 23/4/2004 - 18:20:13 + 21/5/2004 - 10:32:29 + 2.0 + JR + ? + Graph with DataStreamPorts CEA/EDF : Calcium + 0 + 0 + + +DataStreamFactory + DataStreamFactory + Add + 0 + ? + +Add + + +long + x + +long + y + + +long + z + + +1 + istream + 2 + 0 + 0 + 0 + +1 + ostream + 2 + 0 + +1 + OStream + 2 + 10 + + 21/5/2004 - 10:32:29 + 21/5/2004 - 10:32:29 + 2.0 + ? + FactoryServer + Add from DataStreamFactory + 255 + 171 + +DataStreamFactory + DataStreamFactory + Sub + 0 + ? + +Sub + + +long + x + +long + y + + +long + z + + +1 + istream + 2 + 0 + 0 + 0 + +1 + Istream + 2 + 0 + 0 + 0 + + 21/5/2004 - 10:32:29 + 21/5/2004 - 10:32:29 + 2.0 + ? + FactoryServer + Sub from DataStreamFactory + 519 + 48 + +DataStreamFactory + DataStreamFactory + Mul + 0 + ? + +Mul + + +long + x + +long + y + + +long + z + + + 21/5/2004 - 10:32:29 + 21/5/2004 - 10:32:29 + 2.0 + ? + FactoryServer + Mul from DataStreamFactory + 724 + 142 + +DataStreamFactory + DataStreamFactory + Div + 0 + ? + +Div + + +long + x + +long + y + + +long + z + + +1 + ostream + 2 + 0 + + 21/5/2004 - 10:32:29 + 21/5/2004 - 10:32:29 + 2.0 + ? + FactoryServer + Div from DataStreamFactory + 935 + 48 + +DataStreamFactory + DataStreamFactory + Add_1 + 0 + ? + +Add + + +long + x + +long + y + + +long + z + + +1 + istream + 2 + 0 + 0 + 0 + +1 + ostream + 2 + 0 + +1 + OStream + 2 + 0 + + 21/5/2004 - 10:32:29 + 21/5/2004 - 10:32:29 + 2.0 + ? + localhost/FactoryServer + Add from DataStreamFactory + 252 + 499 + +DataStreamFactory + DataStreamFactory + Sub_1 + 0 + ? + +Sub + + +long + x + +long + y + + +long + z + + +1 + istream + 2 + 0 + 0 + 0 + +1 + Istream + 2 + 0 + 0 + 0 + + 21/5/2004 - 10:32:29 + 21/5/2004 - 10:32:29 + 2.0 + ? + localhost/FactoryServer + Sub from DataStreamFactory + 516 + 385 + +DataStreamFactory + DataStreamFactory + Mul_1 + 0 + ? + +Mul + + +long + x + +long + y + + +long + z + + + 21/5/2004 - 10:32:29 + 21/5/2004 - 10:32:29 + 2.0 + ? + localhost/FactoryServer + Mul from DataStreamFactory + 731 + 487 + +DataStreamFactory + DataStreamFactory + Div_1 + 0 + ? + +Div + + +long + x + +long + y + + +long + z + + +1 + ostream + 2 + 0 + + 21/5/2004 - 10:32:29 + 21/5/2004 - 10:32:29 + 2.0 + ? + localhost/FactoryServer + Div from DataStreamFactory + 931 + 385 + +? + ? + Loop + 4 + EndLoop + +Loop + + +long + Index + +long + Min + +long + Max + +long + Incr + +double + z_Div + +double + z_Div_1 + +double + y_Add + +double + x_Sub + + +long + Index + +long + Min + +long + Max + +long + Incr + +double + z_Div + +double + z_Div_1 + +double + y_Add + +double + x_Sub + + + +Init + + + + + + + + + +More + + + + + + + + + +Next + + + + + + 21/5/2004 - 10:32:29 + 21/5/2004 - 10:32:29 + 2.0 + ? + ? + ? + 5 + 391 + +? + ? + EndLoop + 5 + Loop + +EndLoop + + +long + Index + +long + Min + +long + Max + +long + Incr + +double + z_Div + +double + z_Div_1 + +double + y_Add + +double + x_Sub + + +long + Index + +long + Min + +long + Max + +long + Incr + +double + z_Div + +double + z_Div_1 + +double + y_Add + +double + x_Sub + + + +EndInit + + 21/5/2004 - 10:32:29 + 21/5/2004 - 10:32:29 + 2.0 + ? + ? + ? + 1158 + 393 + + +Add + z + Sub + y + + +448 + 143 + +449 + 237 + +Add + z + Mul + y + + +708 + 237 + +708 + 270 + +449 + 270 + +448 + 238 + +Add + ostream + Sub + istream + + +474 + 175 + +474 + 297 + +Add + OStream + Sub + Istream + + +497 + 207 + +498 + 328 + +Sub + z + Mul + x + + +706 + 207 + +706 + 114 + +Sub + z + Div + x + + +Mul + z + Div + y + + +912 + 143 + +911 + 208 + +Div + z + EndLoop + z_Div + + +1147 + 537 + +1148 + 113 + +Div + ostream + Add_1 + istream + + +233 + 626 + +232 + 763 + +1126 + 763 + +1125 + 175 + +Add_1 + z + Sub_1 + y + + +445 + 478 + +444 + 566 + +Add_1 + z + Mul_1 + y + + +703 + 582 + +703 + 677 + +445 + 678 + +444 + 567 + +Add_1 + ostream + Sub_1 + istream + + +473 + 511 + +473 + 627 + +Add_1 + OStream + Sub_1 + Istream + + +498 + 543 + +497 + 658 + +Sub_1 + z + Mul_1 + x + + +708 + 552 + +707 + 450 + +Sub_1 + z + Div_1 + x + + +Mul_1 + z + Div_1 + y + + +913 + 479 + +913 + 551 + +Div_1 + z + EndLoop + z_Div_1 + + +1138 + 567 + +1138 + 449 + +Div_1 + ostream + Add + istream + + +229 + 297 + +229 + 426 + +475 + 425 + +475 + 352 + +1110 + 352 + +1111 + 512 + +Loop + DoLoop + EndLoop + DoLoop + + +Loop + Index + EndLoop + Index + + +Loop + Index + Add + x + + +201 + 236 + +202 + 420 + +Loop + Index + Add_1 + x + + +201 + 562 + +202 + 422 + +Loop + Min + EndLoop + Min + + +Loop + Max + EndLoop + Max + + +Loop + Incr + EndLoop + Incr + + +Loop + y_Add + EndLoop + y_Add + + +Loop + y_Add + Add + y + + +183 + 266 + +182 + 593 + +Loop + y_Add + Add_1 + y + + +Loop + x_Sub + EndLoop + x_Sub + + +Loop + x_Sub + Sub + x + + +167 + 113 + +167 + 625 + +Loop + x_Sub + Sub_1 + x + + +167 + 450 + +168 + 624 + +EndLoop + DoLoop + Loop + InitLoop + + + +GraphStreams + Loop\Index + Loop + Index + +3 + 0 + + +GraphStreams + Loop\Min + Loop + Min + +3 + 1 + + +GraphStreams + Loop\Max + Loop + Max + +3 + 10 + + +GraphStreams + Loop\Incr + Loop + Incr + +3 + 1 + + +GraphStreams + Loop\z_Div + Loop + z_Div + +7 + 0 + + +GraphStreams + Loop\z_Div_1 + Loop + z_Div_1 + +7 + 0 + + +GraphStreams + Loop\y_Add + Loop + y_Add + +7 + 4.5 + + +GraphStreams + Loop\x_Sub + Loop + x_Sub + +7 + 1.5 + diff --git a/examples/GraphStreamsXmlTest.py b/examples/GraphStreamsXmlTest.py new file mode 100644 index 0000000..37799a2 --- /dev/null +++ b/examples/GraphStreamsXmlTest.py @@ -0,0 +1,111 @@ +from SuperV import * + +FlowGraph = Graph( 'FlowGraph' ) +Add = FlowGraph.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) + +Sub = FlowGraph.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) +Addz = Add.GetOutStreamPort( 'z' ) +if Addz != None : + print "Error : GetOutStreamPort of a FlowPort in a FlowGraph" +else : + print 'None : Ok' + +Addz = Add.Port( 'z' ) +try : + Suby = FlowGraph.StreamLink( Addz , Sub.Port( 'y' ) ) + print "Error : creation of a StreamLink in a FlowGraph" +except : + print "Ok" + +links = FlowGraph.StreamLinks() +if len(links) != 0 : + print "Error : StreamLinks in a FlowGraph" + +ports = FlowGraph.StreamPorts() +if len( ports ) != 0 : + print "Error : StreamPorts in a FlowGraph" + +links = Add.StreamLinks() +if len(links) != 0 : + print "Error : StreamLinks in a FlowNode" + +ports = Add.StreamPorts() +if len( ports ) != 0 : + print "Error : StreamPorts in a FlowNode" + +try : + FlowGraph.SetStreamParams( 100 , SUPERV.WithoutTrace , 10. ) +except : + print "No SetStreamParams Ok" + +try : + Timeout,DataStreamTrace,DeltaTime = FlowGraph.StreamParams() +except : + print "No StreamParams Ok" + + + + +from SuperV import * +GraphStreams = StreamGraph( '/home/Salome2/SUPERV_DataStream/SUPERV_SRC/examples/GraphStreams.xml') + +GraphStreams.PrintPorts() +GraphStreams.PrintLinks() + +exec GraphStreams.ListNodes() +Add.PrintPorts() +Add.PrintLinks() + +exec Loop.ListPorts() +ILoopIndex.Print() +OLoopIndex.Print() +exec EndLoop.ListPorts() +IEndLoopGate.Print() +OEndLoopx_Sub.Print() +exec Add.ListPorts() +IAddx.Print() +IAddistream.Print() +OAddOStream.Print() +exec Sub.ListPorts() +exec Mul.ListPorts() +exec Div.ListPorts() +exec Add_1.ListPorts() +exec Sub_1.ListPorts() +exec Mul_1.ListPorts() +exec Div_1.ListPorts() +exec Add.ListLinks() +LLoopIndexAddx.Print() +LAddzMuly.Print() +LDiv_1ostreamAddistream.Print() +LAddOStreamSubIstream.Print() + + +GraphStreams.IsExecutable() + +GraphStreams.Run() +GraphStreams.DoneW() +GraphStreams.PrintPorts() + + + +subgraphs = GraphStreams.SubGraphsNumber() +i = 1 +while i <= subgraphs : + nodes = GraphStreams.SubGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + + +substreamgraphs = GraphStreams.SubStreamGraphsNumber() +i = 1 +while i <= substreamgraphs : + nodes = GraphStreams.SubStreamGraphsNodes( i ) + j = 0 + while j < len(nodes) : + print 'SubStreamGraph',i,nodes[j].Name() + j = j + 1 + i = i + 1 + diff --git a/examples/GraphStreams_1.cpl b/examples/GraphStreams_1.cpl new file mode 100644 index 0000000..799f81e --- /dev/null +++ b/examples/GraphStreams_1.cpl @@ -0,0 +1,55 @@ +DEBUT GraphStreams_1 + TIMEOUT 1000 + TRACE SUCCINT + DELTA_T 1.5 + + +# Liste des codes + + CODE Add + istream I IN ENTIER + ostream I OUT ENTIER + OStream I OUT ENTIER + FIN #Add + + + CODE Div + ostream I OUT ENTIER + FIN #Div + + + CODE Sub + istream I IN ENTIER + Istream I IN ENTIER + FIN #Sub + + + + +# Liste des instances + + INSTANCE Add + CODE Add + FIN + + INSTANCE Sub + CODE Sub + FIN + + INSTANCE Div_1 + CODE Div + FIN + + + + + +# Liste des liens + + LIEN + Add.ostream 0 => Sub.istream SCHENULL INTERNULL EXTRANULL ; + Add.OStream 10 => Sub.Istream SCHENULL INTERNULL EXTRANULL ; + Div_1.ostream 0 => Add.istream SCHENULL INTERNULL EXTRANULL ; + FIN + +FIN diff --git a/examples/GraphStreams_2.cpl b/examples/GraphStreams_2.cpl new file mode 100644 index 0000000..3a8205c --- /dev/null +++ b/examples/GraphStreams_2.cpl @@ -0,0 +1,55 @@ +DEBUT GraphStreams_2 + TIMEOUT 1000 + TRACE SUCCINT + DELTA_T 1.5 + + +# Liste des codes + + CODE Add + istream I IN ENTIER + ostream I OUT ENTIER + OStream I OUT ENTIER + FIN #Add + + + CODE Div + ostream I OUT ENTIER + FIN #Div + + + CODE Sub + istream I IN ENTIER + Istream I IN ENTIER + FIN #Sub + + + + +# Liste des instances + + INSTANCE Div + CODE Div + FIN + + INSTANCE Add_1 + CODE Add + FIN + + INSTANCE Sub_1 + CODE Sub + FIN + + + + + +# Liste des liens + + LIEN + Div.ostream 0 => Add_1.istream SCHENULL INTERNULL EXTRANULL ; + Add_1.ostream 0 => Sub_1.istream SCHENULL INTERNULL EXTRANULL ; + Add_1.OStream 0 => Sub_1.Istream SCHENULL INTERNULL EXTRANULL ; + FIN + +FIN diff --git a/examples/GraphSwitch.py b/examples/GraphSwitch.py index 6e82ad3..51a98e6 100644 --- a/examples/GraphSwitch.py +++ b/examples/GraphSwitch.py @@ -13,66 +13,118 @@ GraphSwitch.Coords( 0 , 0 ) # Creation of InLine Nodes PyIsOdd = [] -PyIsOdd.append( 'import time' ) -PyIsOdd.append( 'def IsOdd(a) : ' ) -PyIsOdd.append( ' print a,"IsOdd" ' ) -PyIsOdd.append( ' time.sleep( 1 )' ) -PyIsOdd.append( ' return a ' ) +PyIsOdd.append( 'from time import * ' ) +PyIsOdd.append( 'def IsOdd(a) : ' ) +PyIsOdd.append( ' print a,"IsOdd (GraphSwitch)" ' ) +PyIsOdd.append( ' sleep( 1 ) ' ) +PyIsOdd.append( ' return a ' ) IsOdd = GraphSwitch.INode( 'IsOdd' , PyIsOdd ) -IsOdd.InPort( 'a' , 'long' ) -IsOdd.OutPort( 'a' , 'long' ) IsOdd.SetName( 'IsOdd' ) IsOdd.SetAuthor( '' ) IsOdd.SetComment( 'Python function' ) -IsOdd.Coords( 296 , 249 ) +IsOdd.Coords( 388 , 50 ) +IsOdd.InPort( 'a' , 'long' ) +IsOdd.OutPort( 'a' , 'long' ) + +# Creation of Loop Nodes +PyInitLoopSwitch = [] +PyInitLoopSwitch.append( 'def InitLoop(Index,Min,Max) : ' ) +PyInitLoopSwitch.append( ' return Index,Min,Max ' ) +PyMoreInitLoopSwitch = [] +PyMoreInitLoopSwitch.append( 'def MoreLoop(Index,Min,Max) : ' ) +PyMoreInitLoopSwitch.append( ' if Index <= Max : ' ) +PyMoreInitLoopSwitch.append( ' DoLoop = 1 ' ) +PyMoreInitLoopSwitch.append( ' else : ' ) +PyMoreInitLoopSwitch.append( ' DoLoop = 0 ' ) +PyMoreInitLoopSwitch.append( ' return DoLoop,Index,Min,Max ' ) +PyNextInitLoopSwitch = [] +PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) : ' ) +PyNextInitLoopSwitch.append( ' Index = Index + 1 ' ) +PyNextInitLoopSwitch.append( ' return Index,Min,Max ' ) +InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitch.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) +EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) +EndOfInitLoopSwitch.SetAuthor( '' ) +EndOfInitLoopSwitch.SetComment( '' ) +EndOfInitLoopSwitch.Coords( 766 , 127 ) +InitLoopSwitch.SetName( 'InitLoopSwitch' ) +InitLoopSwitch.SetAuthor( '' ) +InitLoopSwitch.SetComment( '' ) +InitLoopSwitch.Coords( 10 , 129 ) +InitLoopSwitch.InPort( 'Index' , 'long' ) +InitLoopSwitch.InPort( 'Min' , 'long' ) +InitLoopSwitch.InPort( 'Max' , 'long' ) +InitLoopSwitch.OutPort( 'Index' , 'long' ) +InitLoopSwitch.OutPort( 'Min' , 'long' ) +InitLoopSwitch.OutPort( 'Max' , 'long' ) # Creation of Switch Nodes PySwitch = [] -PySwitch.append( 'import time' ) -PySwitch.append( 'def Switch(a) : ' ) -PySwitch.append( ' time.sleep( 1 )' ) -PySwitch.append( ' return a & 1,a ' ) -Switch,EndSwitch = GraphSwitch.SNode( 'Switch' , PySwitch ) -EndSwitch.SetName( 'EndSwitch' ) -EndSwitch.SetAuthor( '' ) -EndSwitch.SetComment( '' ) -EndSwitch.Coords( 569 , 94 ) -PyEndSwitch = [] -EndSwitch.SetPyFunction( 'EndSwitch' , PyEndSwitch ) -EndSwitch.InPort( 'a' , 'long' ) -EndSwitch.OutPort( 'a' , 'long' ) -Switch.InPort( 'a' , 'long' ) -Switch.OutPort( 'Odd' , 'long' ) -Switch.OutPort( 'a' , 'long' ) +PySwitch.append( 'from time import * ' ) +PySwitch.append( 'def Switch(a) : ' ) +PySwitch.append( ' if ( a & 1 ) == 0 : ' ) +PySwitch.append( ' sleep(1) ' ) +PySwitch.append( ' return a & 1,1-(a&1),a ' ) +Switch,EndOfSwitch = GraphSwitch.SNode( 'Switch' , PySwitch ) +EndOfSwitch.SetName( 'EndOfSwitch' ) +EndOfSwitch.SetAuthor( '' ) +EndOfSwitch.SetComment( '' ) +EndOfSwitch.Coords( 587 , 126 ) +PyEndOfSwitch = [] +EndOfSwitch.SetPyFunction( 'EndSwitch' , PyEndOfSwitch ) +EndOfSwitch.InPort( 'a' , 'long' ) +EndOfSwitch.OutPort( 'a' , 'long' ) Switch.SetName( 'Switch' ) Switch.SetAuthor( '' ) Switch.SetComment( '' ) -Switch.Coords( 25 , 94 ) +Switch.Coords( 186 , 130 ) +Switch.InPort( 'a' , 'long' ) +Switch.OutPort( 'Odd' , 'long' ) +Switch.OutPort( 'Even' , 'int' ) +Switch.OutPort( 'a' , 'int' ) -# Creation of intermediate Output variables and of Control Links +# Creation of Links IsOdda = IsOdd.Port( 'a' ) -EndSwitcha = GraphSwitch.Link( IsOdda , EndSwitch.Port( 'a' ) ) -SwitchDefault = Switch.Port( 'Default' ) -EndSwitchDefault = GraphSwitch.Link( SwitchDefault , EndSwitch.Port( 'Default' ) ) +EndOfSwitcha = GraphSwitch.Link( IsOdda , EndOfSwitch.Port( 'a' ) ) +EndOfSwitcha.AddCoord( 1 , 571 , 161 ) +EndOfSwitcha.AddCoord( 2 , 571 , 131 ) + +InitLoopSwitchIndex = InitLoopSwitch.Port( 'Index' ) +Switcha = GraphSwitch.Link( InitLoopSwitchIndex , Switch.Port( 'a' ) ) + +InitLoopSwitchMin = InitLoopSwitch.Port( 'Min' ) +EndOfInitLoopSwitchMin = GraphSwitch.Link( InitLoopSwitchMin , EndOfInitLoopSwitch.Port( 'Min' ) ) + +InitLoopSwitchMax = InitLoopSwitch.Port( 'Max' ) +EndOfInitLoopSwitchMax = GraphSwitch.Link( InitLoopSwitchMax , EndOfInitLoopSwitch.Port( 'Max' ) ) + SwitchOdd = Switch.Port( 'Odd' ) IsOddInGate = GraphSwitch.Link( SwitchOdd , IsOdd.Port( 'InGate' ) ) -IsOddInGate.AddCoord( 1 , 249 , 323 ) -IsOddInGate.AddCoord( 2 , 249 , 157 ) -IsOddInGate.AddCoord( 3 , 247 , 157 ) + Switcha = Switch.Port( 'a' ) IsOdda = GraphSwitch.Link( Switcha , IsOdd.Port( 'a' ) ) -IsOdda.AddCoord( 1 , 196 , 357 ) -IsOdda.AddCoord( 2 , 196 , 186 ) +IsOdda.AddCoord( 1 , 372 , 129 ) +IsOdda.AddCoord( 2 , 371 , 223 ) + +SwitchDefault = Switch.Port( 'Default' ) +EndOfSwitchDefault = GraphSwitch.Link( SwitchDefault , EndOfSwitch.Port( 'Default' ) ) +EndOfSwitchDefault.AddCoord( 1 , 572 , 194 ) +EndOfSwitchDefault.AddCoord( 2 , 571 , 257 ) + +EndOfSwitcha = EndOfSwitch.Port( 'a' ) +EndOfInitLoopSwitchIndex = GraphSwitch.Link( EndOfSwitcha , EndOfInitLoopSwitch.Port( 'Index' ) ) # Creation of Input datas -Switcha = Switch.Input( 'a' , 2) +InitLoopSwitchIndex = InitLoopSwitch.Input( 'Index' , 0) +InitLoopSwitchMin = InitLoopSwitch.Input( 'Min' , 0) +InitLoopSwitchMax = InitLoopSwitch.Input( 'Max' , 100) # Creation of Output variables -EndSwitcha = EndSwitch.Port( 'a' ) +EndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.Port( 'Index' ) +EndOfInitLoopSwitchMin = EndOfInitLoopSwitch.Port( 'Min' ) +EndOfInitLoopSwitchMax = EndOfInitLoopSwitch.Port( 'Max' ) +SwitchEven = Switch.Port( 'Even' ) GraphSwitch.Run() - GraphSwitch.DoneW() - +GraphSwitch.State() GraphSwitch.PrintPorts() - diff --git a/examples/GraphSwitch.xml b/examples/GraphSwitch.xml index 49076f6..5267cfc 100644 --- a/examples/GraphSwitch.xml +++ b/examples/GraphSwitch.xml @@ -12,16 +12,31 @@ long - Switch\a + InitLoopSwitch\Index + +long + InitLoopSwitch\Min + +long + InitLoopSwitch\Max long - EndSwitch\a + EndOfInitLoopSwitch\Index + +long + EndOfInitLoopSwitch\Min + +long + EndOfInitLoopSwitch\Max + +int + Switch\Even - 24/3/2003 - 15:32:28 - 24/3/2003 - 15:35:29 - 1.04 + 1/10/2003 - 17:23:54 + 13/10/2003 - 10:53:44 + 1.05 ? ? ? @@ -48,23 +63,119 @@ IsOdd - - - - 24/3/2003 - 15:34:50 - 24/3/2003 - 15:34:50 - 1.04 + + + + + + 13/10/2003 - 10:53:44 + 13/10/2003 - 10:53:44 + 1.05 ? ? Python function - 296 - 249 + 388 + 50 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 13/10/2003 - 10:53:44 + 13/10/2003 - 10:53:44 + 1.05 + ? + ? + ? + 10 + 129 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + + 13/10/2003 - 10:53:44 + 13/10/2003 - 10:53:44 + 1.05 + ? + ? + ? + 766 + 127 ? ? Switch 6 - EndSwitch + EndOfSwitch Switch @@ -76,30 +187,36 @@ long Odd -long +int + Even + +int a Switch - - - 24/3/2003 - 15:34:50 - 24/3/2003 - 15:34:50 - 1.04 + + + + + + 13/10/2003 - 10:53:44 + 13/10/2003 - 10:53:44 + 1.05 ? ? ? - 25 - 94 + 186 + 130 ? ? - EndSwitch + EndOfSwitch 7 Switch -EndSwitch +EndOfSwitch long @@ -111,42 +228,63 @@ - 24/3/2003 - 15:34:50 - 24/3/2003 - 15:34:50 - 1.04 + 13/10/2003 - 10:53:44 + 13/10/2003 - 10:53:44 + 1.05 ? ? ? - 569 - 94 + 587 + 126 IsOdd a - EndSwitch + EndOfSwitch a + + +571 + 161 + +571 + 131 + +InitLoopSwitch + DoLoop + EndOfInitLoopSwitch + DoLoop -Switch - Default - EndSwitch - Default +InitLoopSwitch + Index + Switch + a + + +InitLoopSwitch + Min + EndOfInitLoopSwitch + Min + + +InitLoopSwitch + Max + EndOfInitLoopSwitch + Max + + +EndOfInitLoopSwitch + DoLoop + InitLoopSwitch + InitLoop Switch Odd IsOdd InGate - - -249 - 323 - -249 - 157 - -247 - 157 + Switch a @@ -154,18 +292,54 @@ a -196 - 357 +372 + 129 + +371 + 223 + +Switch + Default + EndOfSwitch + Default + + +572 + 194 -196 - 186 +571 + 257 + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + GraphSwitch - Switch\a - Switch - a + InitLoopSwitch\Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitch + InitLoopSwitch\Min + InitLoopSwitch + Min + +3 + 0 + + +GraphSwitch + InitLoopSwitch\Max + InitLoopSwitch + Max 3 - 2 + 100 diff --git a/examples/GraphSwitch1.py b/examples/GraphSwitch1.py new file mode 100755 index 0000000..fd38739 --- /dev/null +++ b/examples/GraphSwitch1.py @@ -0,0 +1,131 @@ + +# Generated python file of Graph GraphSwitch1 + +from SuperV import * +# Graph creation +GraphSwitch1 = Graph( 'GraphSwitch1' ) +GraphSwitch1.SetName( 'GraphSwitch1' ) +GraphSwitch1.SetAuthor( '' ) +GraphSwitch1.SetComment( '' ) +GraphSwitch1.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyIsOdd = [] +PyIsOdd.append( 'from time import * ' ) +PyIsOdd.append( 'def IsOdd(a) : ' ) +PyIsOdd.append( ' print a,"IsOdd (GraphSwitch1)" ' ) +PyIsOdd.append( ' sleep( 1 ) ' ) +PyIsOdd.append( ' return a ' ) +IsOdd = GraphSwitch1.INode( 'IsOdd' , PyIsOdd ) +IsOdd.SetName( 'IsOdd' ) +IsOdd.SetAuthor( '' ) +IsOdd.SetComment( 'Python function' ) +IsOdd.Coords( 388 , 50 ) +IsOdd.InPort( 'a' , 'long' ) +IsOdd.OutPort( 'a' , 'long' ) + +# Creation of Loop Nodes +PyInitLoop = [] +PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' ) +PyInitLoop.append( ' return Index,Min,Max ' ) +PyMoreInitLoop = [] +PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' ) +PyMoreInitLoop.append( ' if Index <= Max : ' ) +PyMoreInitLoop.append( ' DoLoop = 1 ' ) +PyMoreInitLoop.append( ' else : ' ) +PyMoreInitLoop.append( ' DoLoop = 0 ' ) +PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' ) +PyNextInitLoop = [] +PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' ) +PyNextInitLoop.append( ' Index = Index + 1 ' ) +PyNextInitLoop.append( ' return Index,Min,Max ' ) +InitLoop,EndOfInitLoop = GraphSwitch1.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop ) +EndOfInitLoop.SetName( 'EndOfInitLoop' ) +EndOfInitLoop.SetAuthor( '' ) +EndOfInitLoop.SetComment( '' ) +EndOfInitLoop.Coords( 766 , 127 ) +InitLoop.SetName( 'InitLoop' ) +InitLoop.SetAuthor( '' ) +InitLoop.SetComment( '' ) +InitLoop.Coords( 10 , 129 ) +InitLoop.InPort( 'Index' , 'long' ) +InitLoop.InPort( 'Min' , 'long' ) +InitLoop.InPort( 'Max' , 'long' ) +InitLoop.OutPort( 'Index' , 'long' ) +InitLoop.OutPort( 'Min' , 'long' ) +InitLoop.OutPort( 'Max' , 'long' ) + +# Creation of Switch Nodes +PySwitch = [] +PySwitch.append( 'from time import * ' ) +PySwitch.append( 'def Switch(a) : ' ) +PySwitch.append( ' if ( a & 1 ) == 0 : ' ) +PySwitch.append( ' sleep(1) ' ) +PySwitch.append( ' return a & 1,1-(a&1),a ' ) +Switch,EndOfSwitch = GraphSwitch1.SNode( 'Switch' , PySwitch ) +EndOfSwitch.SetName( 'EndOfSwitch' ) +EndOfSwitch.SetAuthor( '' ) +EndOfSwitch.SetComment( '' ) +EndOfSwitch.Coords( 587 , 126 ) +PyEndOfSwitch = [] +EndOfSwitch.SetPyFunction( 'EndSwitch' , PyEndOfSwitch ) +EndOfSwitch.InPort( 'a' , 'long' ) +EndOfSwitch.OutPort( 'a' , 'long' ) +Switch.SetName( 'Switch' ) +Switch.SetAuthor( '' ) +Switch.SetComment( '' ) +Switch.Coords( 186 , 130 ) +Switch.InPort( 'a' , 'long' ) +Switch.OutPort( 'Odd' , 'long' ) +Switch.OutPort( 'Even' , 'int' ) +Switch.OutPort( 'a' , 'int' ) + +# Creation of Links +IsOdda = IsOdd.Port( 'a' ) +EndOfSwitcha = GraphSwitch1.Link( IsOdda , EndOfSwitch.Port( 'a' ) ) +EndOfSwitcha.AddCoord( 1 , 571 , 161 ) +EndOfSwitcha.AddCoord( 2 , 571 , 131 ) + +InitLoopIndex = InitLoop.Port( 'Index' ) +Switcha = GraphSwitch1.Link( InitLoopIndex , Switch.Port( 'a' ) ) + +InitLoopMin = InitLoop.Port( 'Min' ) +EndOfInitLoopMin = GraphSwitch1.Link( InitLoopMin , EndOfInitLoop.Port( 'Min' ) ) + +InitLoopMax = InitLoop.Port( 'Max' ) +EndOfInitLoopMax = GraphSwitch1.Link( InitLoopMax , EndOfInitLoop.Port( 'Max' ) ) + +SwitchOdd = Switch.Port( 'Odd' ) +IsOddInGate = GraphSwitch1.Link( SwitchOdd , IsOdd.Port( 'InGate' ) ) + +SwitchEven = Switch.Port( 'Even' ) +EndOfSwitchDefault = GraphSwitch1.Link( SwitchEven , EndOfSwitch.Port( 'Default' ) ) + +Switcha = Switch.Port( 'a' ) +IsOdda = GraphSwitch1.Link( Switcha , IsOdd.Port( 'a' ) ) +IsOdda.AddCoord( 1 , 372 , 129 ) +IsOdda.AddCoord( 2 , 371 , 223 ) + +EndOfSwitcha = GraphSwitch1.Link( Switcha , EndOfSwitch.Port( 'a' ) ) +EndOfSwitcha.AddCoord( 1 , 571 , 161 ) +EndOfSwitcha.AddCoord( 2 , 570 , 221 ) + +EndOfSwitcha = EndOfSwitch.Port( 'a' ) +EndOfInitLoopIndex = GraphSwitch1.Link( EndOfSwitcha , EndOfInitLoop.Port( 'Index' ) ) + +# Creation of Input datas +InitLoopIndex = InitLoop.Input( 'Index' , 0) +InitLoopMin = InitLoop.Input( 'Min' , 0) +InitLoopMax = InitLoop.Input( 'Max' , 100) + +# Creation of Output variables +EndOfInitLoopIndex = EndOfInitLoop.Port( 'Index' ) +EndOfInitLoopMin = EndOfInitLoop.Port( 'Min' ) +EndOfInitLoopMax = EndOfInitLoop.Port( 'Max' ) + +GraphSwitch1.Run() +GraphSwitch1.DoneW() +GraphSwitch1.State() +GraphSwitch1.PrintPorts() diff --git a/examples/GraphSwitch1.xml b/examples/GraphSwitch1.xml new file mode 100755 index 0000000..ad2f10e --- /dev/null +++ b/examples/GraphSwitch1.xml @@ -0,0 +1,348 @@ + + + + +? + ? + GraphSwitch1 + 1 + ? + +GraphSwitch1 + + +long + InitLoop\Index + +long + InitLoop\Min + +long + InitLoop\Max + + +long + EndOfInitLoop\Index + +long + EndOfInitLoop\Min + +long + EndOfInitLoop\Max + + + 1/10/2003 - 17:12:48 + 13/10/2003 - 10:54:20 + 1.05 + ? + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 13/10/2003 - 10:54:20 + 13/10/2003 - 10:54:20 + 1.05 + ? + ? + Python function + 388 + 50 + +? + ? + InitLoop + 4 + EndOfInitLoop + +InitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 13/10/2003 - 10:54:20 + 13/10/2003 - 10:54:20 + 1.05 + ? + ? + ? + 10 + 129 + +? + ? + EndOfInitLoop + 5 + InitLoop + +EndOfInitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + + 13/10/2003 - 10:54:20 + 13/10/2003 - 10:54:20 + 1.05 + ? + ? + ? + 766 + 127 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + + + + + 13/10/2003 - 10:54:20 + 13/10/2003 - 10:54:20 + 1.05 + ? + ? + ? + 186 + 130 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + + +long + a + + + + 13/10/2003 - 10:54:20 + 13/10/2003 - 10:54:20 + 1.05 + ? + ? + ? + 587 + 126 + + +IsOdd + a + EndOfSwitch + a + + +571 + 161 + +571 + 131 + +InitLoop + DoLoop + EndOfInitLoop + DoLoop + + +InitLoop + Index + Switch + a + + +InitLoop + Min + EndOfInitLoop + Min + + +InitLoop + Max + EndOfInitLoop + Max + + +EndOfInitLoop + DoLoop + InitLoop + InitLoop + + +Switch + Odd + IsOdd + InGate + + +Switch + Even + EndOfSwitch + Default + + +Switch + a + IsOdd + a + + +372 + 129 + +371 + 223 + +Switch + a + EndOfSwitch + a + + +571 + 161 + +570 + 221 + +EndOfSwitch + a + EndOfInitLoop + Index + + + +GraphSwitch1 + InitLoop\Index + InitLoop + Index + +3 + 0 + + +GraphSwitch1 + InitLoop\Min + InitLoop + Min + +3 + 0 + + +GraphSwitch1 + InitLoop\Max + InitLoop + Max + +3 + 100 + diff --git a/examples/GraphSwitchCrash.py b/examples/GraphSwitchCrash.py new file mode 100755 index 0000000..42fa59c --- /dev/null +++ b/examples/GraphSwitchCrash.py @@ -0,0 +1,237 @@ + +# Generated python file of Graph GraphSwitchCrash + +from SuperV import * +# Graph creation +GraphSwitchCrash = Graph( 'GraphSwitchCrash' ) +GraphSwitchCrash.SetName( 'GraphSwitchCrash' ) +GraphSwitchCrash.SetAuthor( '' ) +GraphSwitchCrash.SetComment( '' ) +GraphSwitchCrash.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyIsOdd = [] +PyIsOdd.append( 'from time import * ' ) +PyIsOdd.append( 'def IsOdd(a) : ' ) +PyIsOdd.append( ' print a,"IsOdd (PyIsOdd)" ' ) +PyIsOdd.append( ' sleep( 1 ) ' ) +PyIsOdd.append( ' return a ' ) +IsOdd = GraphSwitchCrash.INode( 'IsOdd' , PyIsOdd ) +IsOdd.SetName( 'IsOdd' ) +IsOdd.SetAuthor( '' ) +IsOdd.SetComment( 'Python function' ) +IsOdd.Coords( 388 , 50 ) +IsOdd.InPort( 'a' , 'long' ) +IsOdd.OutPort( 'a' , 'long' ) + +PyIsOdd_1 = [] +PyIsOdd_1.append( 'from time import * ' ) +PyIsOdd_1.append( 'def IsOdd(a,Even) : ' ) +PyIsOdd_1.append( ' print a,"IsOdd (PyIsOdd_1)" ' ) +PyIsOdd_1.append( ' sleep( 1 ) ' ) +PyIsOdd_1.append( ' return a ' ) +IsOdd_1 = GraphSwitchCrash.INode( 'IsOdd' , PyIsOdd_1 ) +IsOdd_1.SetName( 'IsOdd_1' ) +IsOdd_1.SetAuthor( '' ) +IsOdd_1.SetComment( 'Python function' ) +IsOdd_1.Coords( 419 , 279 ) +IsOdd_1.InPort( 'a' , 'long' ) +IsOdd_1.InPort( 'Even' , 'boolean' ) +IsOdd_1.OutPort( 'a' , 'long' ) + +# Creation of Loop Nodes +PyInitLoopSwitch = [] +PyInitLoopSwitch.append( 'def InitLoop(Index,Min,Max) : ' ) +PyInitLoopSwitch.append( ' return Index,Min,Max ' ) +PyMoreInitLoopSwitch = [] +PyMoreInitLoopSwitch.append( 'def MoreLoop(Index,Min,Max) : ' ) +PyMoreInitLoopSwitch.append( ' if Index <= Max : ' ) +PyMoreInitLoopSwitch.append( ' DoLoop = 1 ' ) +PyMoreInitLoopSwitch.append( ' else : ' ) +PyMoreInitLoopSwitch.append( ' DoLoop = 0 ' ) +PyMoreInitLoopSwitch.append( ' return DoLoop,Index,Min,Max ' ) +PyNextInitLoopSwitch = [] +PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) : ' ) +PyNextInitLoopSwitch.append( ' Index = Index + 1 ' ) +PyNextInitLoopSwitch.append( ' return Index,Min,Max ' ) +InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitchCrash.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) +EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) +EndOfInitLoopSwitch.SetAuthor( '' ) +EndOfInitLoopSwitch.SetComment( '' ) +EndOfInitLoopSwitch.Coords( 766 , 127 ) +InitLoopSwitch.SetName( 'InitLoopSwitch' ) +InitLoopSwitch.SetAuthor( '' ) +InitLoopSwitch.SetComment( '' ) +InitLoopSwitch.Coords( 10 , 129 ) +InitLoopSwitch.InPort( 'Index' , 'long' ) +InitLoopSwitch.InPort( 'Min' , 'long' ) +InitLoopSwitch.InPort( 'Max' , 'long' ) +InitLoopSwitch.OutPort( 'Index' , 'long' ) +InitLoopSwitch.OutPort( 'Min' , 'long' ) +InitLoopSwitch.OutPort( 'Max' , 'long' ) + +PyInitLoop = [] +PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' ) +PyInitLoop.append( ' return Index,Min,Max ' ) +PyMoreInitLoop = [] +PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' ) +PyMoreInitLoop.append( ' if Index <= Max : ' ) +PyMoreInitLoop.append( ' DoLoop = 1 ' ) +PyMoreInitLoop.append( ' else : ' ) +PyMoreInitLoop.append( ' DoLoop = 0 ' ) +PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' ) +PyNextInitLoop = [] +PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' ) +PyNextInitLoop.append( ' Index = Index + 1 ' ) +PyNextInitLoop.append( ' return Index,Min,Max ' ) +InitLoop,EndOfInitLoop = GraphSwitchCrash.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop ) +EndOfInitLoop.SetName( 'EndOfInitLoop' ) +EndOfInitLoop.SetAuthor( '' ) +EndOfInitLoop.SetComment( '' ) +EndOfInitLoop.Coords( 783 , 381 ) +InitLoop.SetName( 'InitLoop' ) +InitLoop.SetAuthor( '' ) +InitLoop.SetComment( '' ) +InitLoop.Coords( 10 , 388 ) +InitLoop.InPort( 'Index' , 'long' ) +InitLoop.InPort( 'Min' , 'long' ) +InitLoop.InPort( 'Max' , 'long' ) +InitLoop.OutPort( 'Index' , 'long' ) +InitLoop.OutPort( 'Min' , 'long' ) +InitLoop.OutPort( 'Max' , 'long' ) + +# Creation of Switch Nodes +PySwitch = [] +PySwitch.append( 'from time import * ' ) +PySwitch.append( 'def Switch(a) : ' ) +PySwitch.append( ' if ( a & 1 ) == 0 : ' ) +PySwitch.append( ' sleep(1) ' ) +PySwitch.append( ' return a & 1,1-(a&1),a ' ) +Switch,EndOfSwitch = GraphSwitchCrash.SNode( 'Switch' , PySwitch ) +EndOfSwitch.SetName( 'EndOfSwitch' ) +EndOfSwitch.SetAuthor( '' ) +EndOfSwitch.SetComment( '' ) +EndOfSwitch.Coords( 587 , 126 ) +PyEndOfSwitch = [] +EndOfSwitch.SetPyFunction( 'EndSwitch' , PyEndOfSwitch ) +EndOfSwitch.InPort( 'a' , 'long' ) +EndOfSwitch.OutPort( 'a' , 'long' ) +Switch.SetName( 'Switch' ) +Switch.SetAuthor( '' ) +Switch.SetComment( '' ) +Switch.Coords( 186 , 130 ) +Switch.InPort( 'a' , 'long' ) +Switch.OutPort( 'Odd' , 'long' ) +Switch.OutPort( 'Even' , 'int' ) +Switch.OutPort( 'a' , 'int' ) + +PySwitch_1 = [] +PySwitch_1.append( 'from time import * ' ) +PySwitch_1.append( 'def Switch(a) : ' ) +PySwitch_1.append( ' if ( a & 1 ) == 0 : ' ) +PySwitch_1.append( ' sleep(1) ' ) +PySwitch_1.append( ' return a & 1,1-(a&1),a ' ) +Switch_1,EndSwitch = GraphSwitchCrash.SNode( 'Switch' , PySwitch_1 ) +EndSwitch.SetName( 'EndSwitch' ) +EndSwitch.SetAuthor( '' ) +EndSwitch.SetComment( '' ) +EndSwitch.Coords( 605 , 382 ) +PyEndSwitch = [] +EndSwitch.SetPyFunction( 'EndSwitch' , PyEndSwitch ) +EndSwitch.InPort( 'a' , 'long' ) +EndSwitch.OutPort( 'a' , 'long' ) +Switch_1.SetName( 'Switch_1' ) +Switch_1.SetAuthor( '' ) +Switch_1.SetComment( '' ) +Switch_1.Coords( 193 , 388 ) +Switch_1.InPort( 'a' , 'long' ) +Switch_1.OutPort( 'Odd' , 'long' ) +Switch_1.OutPort( 'Even' , 'int' ) +Switch_1.OutPort( 'a' , 'int' ) + +# Creation of Links +IsOdda = IsOdd.Port( 'a' ) +EndOfSwitcha = GraphSwitchCrash.Link( IsOdda , EndOfSwitch.Port( 'a' ) ) +EndOfSwitcha.AddCoord( 1 , 573 , 160 ) +EndOfSwitcha.AddCoord( 2 , 572 , 130 ) + +InitLoopSwitchIndex = InitLoopSwitch.Port( 'Index' ) +Switcha = GraphSwitchCrash.Link( InitLoopSwitchIndex , Switch.Port( 'a' ) ) + +InitLoopSwitchMin = InitLoopSwitch.Port( 'Min' ) +EndOfInitLoopSwitchMin = GraphSwitchCrash.Link( InitLoopSwitchMin , EndOfInitLoopSwitch.Port( 'Min' ) ) + +InitLoopSwitchMax = InitLoopSwitch.Port( 'Max' ) +EndOfInitLoopSwitchMax = GraphSwitchCrash.Link( InitLoopSwitchMax , EndOfInitLoopSwitch.Port( 'Max' ) ) + +SwitchOdd = Switch.Port( 'Odd' ) +IsOddInGate = GraphSwitchCrash.Link( SwitchOdd , IsOdd.Port( 'InGate' ) ) + +Switcha = Switch.Port( 'a' ) +IsOdda = GraphSwitchCrash.Link( Switcha , IsOdd.Port( 'a' ) ) +IsOdda.AddCoord( 1 , 365 , 129 ) +IsOdda.AddCoord( 2 , 365 , 222 ) + +SwitchDefault = Switch.Port( 'Default' ) +EndOfSwitchDefault = GraphSwitchCrash.Link( SwitchDefault , EndOfSwitch.Port( 'Default' ) ) +EndOfSwitchDefault.AddCoord( 1 , 572 , 194 ) +EndOfSwitchDefault.AddCoord( 2 , 571 , 257 ) + +EndOfSwitcha = EndOfSwitch.Port( 'a' ) +EndOfInitLoopSwitchIndex = GraphSwitchCrash.Link( EndOfSwitcha , EndOfInitLoopSwitch.Port( 'Index' ) ) + +IsOdd_1a = IsOdd_1.Port( 'a' ) +EndSwitcha = GraphSwitchCrash.Link( IsOdd_1a , EndSwitch.Port( 'a' ) ) +EndSwitcha.AddCoord( 1 , 599 , 416 ) +EndSwitcha.AddCoord( 2 , 598 , 358 ) + +InitLoopIndex = InitLoop.Port( 'Index' ) +Switch_1a = GraphSwitchCrash.Link( InitLoopIndex , Switch_1.Port( 'a' ) ) + +InitLoopMin = InitLoop.Port( 'Min' ) +EndOfInitLoopMin = GraphSwitchCrash.Link( InitLoopMin , EndOfInitLoop.Port( 'Min' ) ) + +InitLoopMax = InitLoop.Port( 'Max' ) +EndOfInitLoopMax = GraphSwitchCrash.Link( InitLoopMax , EndOfInitLoop.Port( 'Max' ) ) + +Switch_1Odd = Switch_1.Port( 'Odd' ) +IsOdd_1InGate = GraphSwitchCrash.Link( Switch_1Odd , IsOdd_1.Port( 'InGate' ) ) + +Switch_1Even = Switch_1.Port( 'Even' ) +EndSwitchDefault = GraphSwitchCrash.Link( Switch_1Even , EndSwitch.Port( 'Default' ) ) + +IsOdd_1Even = GraphSwitchCrash.Link( Switch_1Even , IsOdd_1.Port( 'Even' ) ) +IsOdd_1Even.AddCoord( 1 , 402 , 388 ) +IsOdd_1Even.AddCoord( 2 , 402 , 450 ) + +Switch_1a = Switch_1.Port( 'a' ) +IsOdd_1a = GraphSwitchCrash.Link( Switch_1a , IsOdd_1.Port( 'a' ) ) +IsOdd_1a.AddCoord( 1 , 377 , 358 ) +IsOdd_1a.AddCoord( 2 , 378 , 481 ) + +EndSwitcha = EndSwitch.Port( 'a' ) +EndOfInitLoopIndex = GraphSwitchCrash.Link( EndSwitcha , EndOfInitLoop.Port( 'Index' ) ) + +# Creation of Input datas +InitLoopSwitchIndex = InitLoopSwitch.Input( 'Index' , 0) +InitLoopSwitchMin = InitLoopSwitch.Input( 'Min' , 0) +InitLoopSwitchMax = InitLoopSwitch.Input( 'Max' , 100) +InitLoopIndex = InitLoop.Input( 'Index' , 0) +InitLoopMin = InitLoop.Input( 'Min' , 0) +InitLoopMax = InitLoop.Input( 'Max' , 100) + +# Creation of Output variables +EndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.Port( 'Index' ) +EndOfInitLoopSwitchMin = EndOfInitLoopSwitch.Port( 'Min' ) +EndOfInitLoopSwitchMax = EndOfInitLoopSwitch.Port( 'Max' ) +SwitchEven = Switch.Port( 'Even' ) +EndOfInitLoopIndex = EndOfInitLoop.Port( 'Index' ) +EndOfInitLoopMin = EndOfInitLoop.Port( 'Min' ) +EndOfInitLoopMax = EndOfInitLoop.Port( 'Max' ) + +GraphSwitchCrash.Run() +GraphSwitchCrash.DoneW() +GraphSwitchCrash.State() +GraphSwitchCrash.PrintPorts() diff --git a/examples/GraphSwitchCrash.xml b/examples/GraphSwitchCrash.xml new file mode 100755 index 0000000..88341e0 --- /dev/null +++ b/examples/GraphSwitchCrash.xml @@ -0,0 +1,670 @@ + + + + +? + ? + GraphSwitchCrash + 1 + ? + +GraphSwitchCrash + + +long + InitLoopSwitch\Index + +long + InitLoopSwitch\Min + +long + InitLoopSwitch\Max + +long + InitLoop\Index + +long + InitLoop\Min + +long + InitLoop\Max + + +long + EndOfInitLoopSwitch\Index + +long + EndOfInitLoopSwitch\Min + +long + EndOfInitLoopSwitch\Max + +int + Switch\Even + +long + EndOfInitLoop\Index + +long + EndOfInitLoop\Min + +long + EndOfInitLoop\Max + + + 14/10/2003 - 10:29:4 + 15/10/2003 - 18:11:6 + 1.05 + ? + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 15/10/2003 - 18:11:6 + 15/10/2003 - 18:11:6 + 1.05 + ? + ? + Python function + 388 + 50 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 15/10/2003 - 18:11:6 + 15/10/2003 - 18:11:6 + 1.05 + ? + ? + ? + 10 + 129 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + + 15/10/2003 - 18:11:6 + 15/10/2003 - 18:11:6 + 1.05 + ? + ? + ? + 766 + 127 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + + + + + 15/10/2003 - 18:11:6 + 15/10/2003 - 18:11:6 + 1.05 + ? + ? + ? + 186 + 130 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + + +long + a + + + + 15/10/2003 - 18:11:6 + 15/10/2003 - 18:11:6 + 1.05 + ? + ? + ? + 587 + 126 + +? + ? + IsOdd_1 + 3 + ? + +IsOdd_1 + + +long + a + +boolean + Even + + +long + a + + + +IsOdd + + + + + + 15/10/2003 - 18:11:6 + 15/10/2003 - 18:11:6 + 1.05 + ? + ? + Python function + 419 + 279 + +? + ? + InitLoop + 4 + EndOfInitLoop + +InitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 15/10/2003 - 18:11:6 + 15/10/2003 - 18:11:6 + 1.05 + ? + ? + ? + 10 + 388 + +? + ? + EndOfInitLoop + 5 + InitLoop + +EndOfInitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + + 15/10/2003 - 18:11:6 + 15/10/2003 - 18:11:6 + 1.05 + ? + ? + ? + 783 + 381 + +? + ? + Switch_1 + 6 + EndSwitch + +Switch_1 + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + + + + + 15/10/2003 - 18:11:6 + 15/10/2003 - 18:11:6 + 1.05 + ? + ? + ? + 193 + 388 + +? + ? + EndSwitch + 7 + Switch_1 + +EndSwitch + + +long + a + + +long + a + + + + 15/10/2003 - 18:11:6 + 15/10/2003 - 18:11:6 + 1.05 + ? + ? + ? + 605 + 382 + + +IsOdd + a + EndOfSwitch + a + + +573 + 160 + +572 + 130 + +InitLoopSwitch + DoLoop + EndOfInitLoopSwitch + DoLoop + + +InitLoopSwitch + Index + Switch + a + + +InitLoopSwitch + Min + EndOfInitLoopSwitch + Min + + +InitLoopSwitch + Max + EndOfInitLoopSwitch + Max + + +EndOfInitLoopSwitch + DoLoop + InitLoopSwitch + InitLoop + + +Switch + Odd + IsOdd + InGate + + +Switch + a + IsOdd + a + + +365 + 129 + +365 + 222 + +Switch + Default + EndOfSwitch + Default + + +572 + 194 + +571 + 257 + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + +IsOdd_1 + a + EndSwitch + a + + +599 + 416 + +598 + 358 + +InitLoop + DoLoop + EndOfInitLoop + DoLoop + + +InitLoop + Index + Switch_1 + a + + +InitLoop + Min + EndOfInitLoop + Min + + +InitLoop + Max + EndOfInitLoop + Max + + +EndOfInitLoop + DoLoop + InitLoop + InitLoop + + +Switch_1 + Odd + IsOdd_1 + InGate + + +Switch_1 + Even + EndSwitch + Default + + +Switch_1 + Even + IsOdd_1 + Even + + +402 + 388 + +402 + 450 + +Switch_1 + a + IsOdd_1 + a + + +377 + 358 + +378 + 481 + +EndSwitch + a + EndOfInitLoop + Index + + + +GraphSwitchCrash + InitLoopSwitch\Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchCrash + InitLoopSwitch\Min + InitLoopSwitch + Min + +3 + 0 + + +GraphSwitchCrash + InitLoopSwitch\Max + InitLoopSwitch + Max + +3 + 100 + + +GraphSwitchCrash + InitLoop\Index + InitLoop + Index + +3 + 0 + + +GraphSwitchCrash + InitLoop\Min + InitLoop + Min + +3 + 0 + + +GraphSwitchCrash + InitLoop\Max + InitLoop + Max + +3 + 100 + diff --git a/examples/GraphSwitchs.py b/examples/GraphSwitchs.py new file mode 100755 index 0000000..45c77ac --- /dev/null +++ b/examples/GraphSwitchs.py @@ -0,0 +1,232 @@ + +# Generated python file of Graph GraphSwitch + +from SuperV import * +# Graph creation +GraphSwitchs = Graph( 'GraphSwitchs' ) +GraphSwitchs.SetName( 'GraphSwitchs' ) +GraphSwitchs.SetAuthor( '' ) +GraphSwitchs.SetComment( '' ) +GraphSwitchs.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyIsOdd = [] +PyIsOdd.append( 'from time import * ' ) +PyIsOdd.append( 'def IsOdd(a) : ' ) +PyIsOdd.append( ' print a,"IsOdd (GraphSwitchs)" ' ) +PyIsOdd.append( ' sleep( 1 ) ' ) +PyIsOdd.append( ' return a ' ) +IsOdd = GraphSwitchs.INode( 'IsOdd' , PyIsOdd ) +IsOdd.SetName( 'IsOdd' ) +IsOdd.SetAuthor( '' ) +IsOdd.SetComment( 'Python function' ) +IsOdd.Coords( 388 , 50 ) +IsOdd.InPort( 'a' , 'long' ) +IsOdd.OutPort( 'a' , 'long' ) + +PyIsOdd_1 = [] +PyIsOdd_1.append( 'from time import * ' ) +PyIsOdd_1.append( 'def IsOdd(a) : ' ) +PyIsOdd_1.append( ' print a,"IsOdd_1 (GraphSwitchs)" ' ) +PyIsOdd_1.append( ' sleep( 1 ) ' ) +PyIsOdd_1.append( ' return a ' ) +IsOdd_1 = GraphSwitchs.INode( 'IsOdd' , PyIsOdd_1 ) +IsOdd_1.SetName( 'IsOdd_1' ) +IsOdd_1.SetAuthor( '' ) +IsOdd_1.SetComment( 'Python function' ) +IsOdd_1.Coords( 419 , 308 ) +IsOdd_1.InPort( 'a' , 'long' ) +IsOdd_1.OutPort( 'a' , 'long' ) + +# Creation of Loop Nodes +PyInitLoopSwitch = [] +PyInitLoopSwitch.append( 'def InitLoop(Index,Min,Max) : ' ) +PyInitLoopSwitch.append( ' return Index,Min,Max ' ) +PyMoreInitLoopSwitch = [] +PyMoreInitLoopSwitch.append( 'def MoreLoop(Index,Min,Max) : ' ) +PyMoreInitLoopSwitch.append( ' if Index <= Max : ' ) +PyMoreInitLoopSwitch.append( ' DoLoop = 1 ' ) +PyMoreInitLoopSwitch.append( ' else : ' ) +PyMoreInitLoopSwitch.append( ' DoLoop = 0 ' ) +PyMoreInitLoopSwitch.append( ' return DoLoop,Index,Min,Max ' ) +PyNextInitLoopSwitch = [] +PyNextInitLoopSwitch.append( 'def NextLoop(Index,Min,Max) : ' ) +PyNextInitLoopSwitch.append( ' Index = Index + 1 ' ) +PyNextInitLoopSwitch.append( ' return Index,Min,Max ' ) +InitLoopSwitch,EndOfInitLoopSwitch = GraphSwitchs.LNode( 'InitLoop' , PyInitLoopSwitch , 'MoreLoop' , PyMoreInitLoopSwitch , 'NextLoop' , PyNextInitLoopSwitch ) +EndOfInitLoopSwitch.SetName( 'EndOfInitLoopSwitch' ) +EndOfInitLoopSwitch.SetAuthor( '' ) +EndOfInitLoopSwitch.SetComment( '' ) +EndOfInitLoopSwitch.Coords( 766 , 127 ) +InitLoopSwitch.SetName( 'InitLoopSwitch' ) +InitLoopSwitch.SetAuthor( '' ) +InitLoopSwitch.SetComment( '' ) +InitLoopSwitch.Coords( 10 , 129 ) +InitLoopSwitch.InPort( 'Index' , 'long' ) +InitLoopSwitch.InPort( 'Min' , 'long' ) +InitLoopSwitch.InPort( 'Max' , 'long' ) +InitLoopSwitch.OutPort( 'Index' , 'long' ) +InitLoopSwitch.OutPort( 'Min' , 'long' ) +InitLoopSwitch.OutPort( 'Max' , 'long' ) + +PyInitLoop = [] +PyInitLoop.append( 'def InitLoop(Index,Min,Max) : ' ) +PyInitLoop.append( ' return Index,Min,Max ' ) +PyMoreInitLoop = [] +PyMoreInitLoop.append( 'def MoreLoop(Index,Min,Max) : ' ) +PyMoreInitLoop.append( ' if Index <= Max : ' ) +PyMoreInitLoop.append( ' DoLoop = 1 ' ) +PyMoreInitLoop.append( ' else : ' ) +PyMoreInitLoop.append( ' DoLoop = 0 ' ) +PyMoreInitLoop.append( ' return DoLoop,Index,Min,Max ' ) +PyNextInitLoop = [] +PyNextInitLoop.append( 'def NextLoop(Index,Min,Max) : ' ) +PyNextInitLoop.append( ' Index = Index + 1 ' ) +PyNextInitLoop.append( ' return Index,Min,Max ' ) +InitLoop,EndOfInitLoop = GraphSwitchs.LNode( 'InitLoop' , PyInitLoop , 'MoreLoop' , PyMoreInitLoop , 'NextLoop' , PyNextInitLoop ) +EndOfInitLoop.SetName( 'EndOfInitLoop' ) +EndOfInitLoop.SetAuthor( '' ) +EndOfInitLoop.SetComment( '' ) +EndOfInitLoop.Coords( 783 , 381 ) +InitLoop.SetName( 'InitLoop' ) +InitLoop.SetAuthor( '' ) +InitLoop.SetComment( '' ) +InitLoop.Coords( 10 , 388 ) +InitLoop.InPort( 'Index' , 'long' ) +InitLoop.InPort( 'Min' , 'long' ) +InitLoop.InPort( 'Max' , 'long' ) +InitLoop.OutPort( 'Index' , 'long' ) +InitLoop.OutPort( 'Min' , 'long' ) +InitLoop.OutPort( 'Max' , 'long' ) + +# Creation of Switch Nodes +PySwitch = [] +PySwitch.append( 'from time import * ' ) +PySwitch.append( 'def Switch(a) : ' ) +PySwitch.append( ' if ( a & 1 ) == 0 : ' ) +PySwitch.append( ' sleep(1) ' ) +PySwitch.append( ' return a & 1,1-(a&1),a ' ) +Switch,EndOfSwitch = GraphSwitchs.SNode( 'Switch' , PySwitch ) +EndOfSwitch.SetName( 'EndOfSwitch' ) +EndOfSwitch.SetAuthor( '' ) +EndOfSwitch.SetComment( '' ) +EndOfSwitch.Coords( 587 , 126 ) +PyEndOfSwitch = [] +EndOfSwitch.SetPyFunction( 'EndSwitch' , PyEndOfSwitch ) +EndOfSwitch.InPort( 'a' , 'long' ) +EndOfSwitch.OutPort( 'a' , 'long' ) +Switch.SetName( 'Switch' ) +Switch.SetAuthor( '' ) +Switch.SetComment( '' ) +Switch.Coords( 186 , 130 ) +Switch.InPort( 'a' , 'long' ) +Switch.OutPort( 'Odd' , 'long' ) +Switch.OutPort( 'Even' , 'int' ) +Switch.OutPort( 'a' , 'int' ) + +PySwitch_1 = [] +PySwitch_1.append( 'from time import * ' ) +PySwitch_1.append( 'def Switch(a) : ' ) +PySwitch_1.append( ' if ( a & 1 ) == 0 : ' ) +PySwitch_1.append( ' sleep(1) ' ) +PySwitch_1.append( ' return a & 1,1-(a&1),a ' ) +Switch_1,EndSwitch = GraphSwitchs.SNode( 'Switch' , PySwitch_1 ) +EndSwitch.SetName( 'EndSwitch' ) +EndSwitch.SetAuthor( '' ) +EndSwitch.SetComment( '' ) +EndSwitch.Coords( 605 , 382 ) +PyEndSwitch = [] +EndSwitch.SetPyFunction( 'EndSwitch' , PyEndSwitch ) +EndSwitch.InPort( 'a' , 'long' ) +EndSwitch.OutPort( 'a' , 'long' ) +Switch_1.SetName( 'Switch_1' ) +Switch_1.SetAuthor( '' ) +Switch_1.SetComment( '' ) +Switch_1.Coords( 193 , 388 ) +Switch_1.InPort( 'a' , 'long' ) +Switch_1.OutPort( 'Odd' , 'long' ) +Switch_1.OutPort( 'Even' , 'int' ) +Switch_1.OutPort( 'a' , 'int' ) + +# Creation of Links +IsOdda = IsOdd.Port( 'a' ) +EndOfSwitcha = GraphSwitchs.Link( IsOdda , EndOfSwitch.Port( 'a' ) ) +EndOfSwitcha.AddCoord( 1 , 573 , 160 ) +EndOfSwitcha.AddCoord( 2 , 572 , 130 ) + +InitLoopSwitchIndex = InitLoopSwitch.Port( 'Index' ) +Switcha = GraphSwitchs.Link( InitLoopSwitchIndex , Switch.Port( 'a' ) ) + +InitLoopSwitchMin = InitLoopSwitch.Port( 'Min' ) +EndOfInitLoopSwitchMin = GraphSwitchs.Link( InitLoopSwitchMin , EndOfInitLoopSwitch.Port( 'Min' ) ) + +InitLoopSwitchMax = InitLoopSwitch.Port( 'Max' ) +EndOfInitLoopSwitchMax = GraphSwitchs.Link( InitLoopSwitchMax , EndOfInitLoopSwitch.Port( 'Max' ) ) + +SwitchOdd = Switch.Port( 'Odd' ) +IsOddInGate = GraphSwitchs.Link( SwitchOdd , IsOdd.Port( 'InGate' ) ) + +Switcha = Switch.Port( 'a' ) +IsOdda = GraphSwitchs.Link( Switcha , IsOdd.Port( 'a' ) ) +IsOdda.AddCoord( 1 , 365 , 129 ) +IsOdda.AddCoord( 2 , 365 , 222 ) + +SwitchDefault = Switch.Port( 'Default' ) +EndOfSwitchDefault = GraphSwitchs.Link( SwitchDefault , EndOfSwitch.Port( 'Default' ) ) +EndOfSwitchDefault.AddCoord( 1 , 572 , 194 ) +EndOfSwitchDefault.AddCoord( 2 , 571 , 257 ) + +EndOfSwitcha = EndOfSwitch.Port( 'a' ) +EndOfInitLoopSwitchIndex = GraphSwitchs.Link( EndOfSwitcha , EndOfInitLoopSwitch.Port( 'Index' ) ) + +IsOdd_1a = IsOdd_1.Port( 'a' ) +EndSwitcha = GraphSwitchs.Link( IsOdd_1a , EndSwitch.Port( 'a' ) ) +EndSwitcha.AddCoord( 1 , 599 , 416 ) +EndSwitcha.AddCoord( 2 , 598 , 389 ) + +InitLoopIndex = InitLoop.Port( 'Index' ) +Switch_1a = GraphSwitchs.Link( InitLoopIndex , Switch_1.Port( 'a' ) ) + +InitLoopMin = InitLoop.Port( 'Min' ) +EndOfInitLoopMin = GraphSwitchs.Link( InitLoopMin , EndOfInitLoop.Port( 'Min' ) ) + +InitLoopMax = InitLoop.Port( 'Max' ) +EndOfInitLoopMax = GraphSwitchs.Link( InitLoopMax , EndOfInitLoop.Port( 'Max' ) ) + +Switch_1Odd = Switch_1.Port( 'Odd' ) +IsOdd_1InGate = GraphSwitchs.Link( Switch_1Odd , IsOdd_1.Port( 'InGate' ) ) + +Switch_1Even = Switch_1.Port( 'Even' ) +EndSwitchDefault = GraphSwitchs.Link( Switch_1Even , EndSwitch.Port( 'Default' ) ) + +Switch_1a = Switch_1.Port( 'a' ) +IsOdd_1a = GraphSwitchs.Link( Switch_1a , IsOdd_1.Port( 'a' ) ) +IsOdd_1a.AddCoord( 1 , 379 , 387 ) +IsOdd_1a.AddCoord( 2 , 378 , 481 ) + +EndSwitcha = EndSwitch.Port( 'a' ) +EndOfInitLoopIndex = GraphSwitchs.Link( EndSwitcha , EndOfInitLoop.Port( 'Index' ) ) + +# Creation of Input datas +InitLoopSwitchIndex = InitLoopSwitch.Input( 'Index' , 0) +InitLoopSwitchMin = InitLoopSwitch.Input( 'Min' , 0) +InitLoopSwitchMax = InitLoopSwitch.Input( 'Max' , 100) +InitLoopIndex = InitLoop.Input( 'Index' , 0) +InitLoopMin = InitLoop.Input( 'Min' , 0) +InitLoopMax = InitLoop.Input( 'Max' , 100) + +# Creation of Output variables +EndOfInitLoopSwitchIndex = EndOfInitLoopSwitch.Port( 'Index' ) +EndOfInitLoopSwitchMin = EndOfInitLoopSwitch.Port( 'Min' ) +EndOfInitLoopSwitchMax = EndOfInitLoopSwitch.Port( 'Max' ) +SwitchEven = Switch.Port( 'Even' ) +EndOfInitLoopIndex = EndOfInitLoop.Port( 'Index' ) +EndOfInitLoopMin = EndOfInitLoop.Port( 'Min' ) +EndOfInitLoopMax = EndOfInitLoop.Port( 'Max' ) + +GraphSwitchs.Run() +GraphSwitchs.DoneW() +GraphSwitchs.State() +GraphSwitchs.PrintPorts() diff --git a/examples/GraphSwitchs.xml b/examples/GraphSwitchs.xml new file mode 100755 index 0000000..cda215c --- /dev/null +++ b/examples/GraphSwitchs.xml @@ -0,0 +1,655 @@ + + + + +? + ? + GraphSwitchs + 1 + ? + +GraphSwitchs + + +long + InitLoopSwitch\Index + +long + InitLoopSwitch\Min + +long + InitLoopSwitch\Max + +long + InitLoop\Index + +long + InitLoop\Min + +long + InitLoop\Max + + +long + EndOfInitLoopSwitch\Index + +long + EndOfInitLoopSwitch\Min + +long + EndOfInitLoopSwitch\Max + +int + Switch\Even + +long + EndOfInitLoop\Index + +long + EndOfInitLoop\Min + +long + EndOfInitLoop\Max + + + 14/10/2003 - 10:29:4 + 16/10/2003 - 10:57:24 + 1.05 + ? + ? + ? + 0 + 0 + + +? + ? + IsOdd + 3 + ? + +IsOdd + + +long + a + + +long + a + + + +IsOdd + + + + + + 16/10/2003 - 10:57:24 + 16/10/2003 - 10:57:24 + 1.05 + ? + ? + Python function + 388 + 50 + +? + ? + InitLoopSwitch + 4 + EndOfInitLoopSwitch + +InitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 16/10/2003 - 10:57:24 + 16/10/2003 - 10:57:24 + 1.05 + ? + ? + ? + 10 + 129 + +? + ? + EndOfInitLoopSwitch + 5 + InitLoopSwitch + +EndOfInitLoopSwitch + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + + 16/10/2003 - 10:57:24 + 16/10/2003 - 10:57:24 + 1.05 + ? + ? + ? + 766 + 127 + +? + ? + Switch + 6 + EndOfSwitch + +Switch + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + + + + + 16/10/2003 - 10:57:24 + 16/10/2003 - 10:57:24 + 1.05 + ? + ? + ? + 186 + 130 + +? + ? + EndOfSwitch + 7 + Switch + +EndOfSwitch + + +long + a + + +long + a + + + + 16/10/2003 - 10:57:24 + 16/10/2003 - 10:57:24 + 1.05 + ? + ? + ? + 587 + 126 + +? + ? + IsOdd_1 + 3 + ? + +IsOdd_1 + + +long + a + + +long + a + + + +IsOdd + + + + + + 16/10/2003 - 10:57:24 + 16/10/2003 - 10:57:24 + 1.05 + ? + ? + Python function + 419 + 308 + +? + ? + InitLoop + 4 + EndOfInitLoop + +InitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + +InitLoop + + + +MoreLoop + + + + + + + +NextLoop + + + + 16/10/2003 - 10:57:24 + 16/10/2003 - 10:57:24 + 1.05 + ? + ? + ? + 10 + 388 + +? + ? + EndOfInitLoop + 5 + InitLoop + +EndOfInitLoop + + +long + Index + +long + Min + +long + Max + + +long + Index + +long + Min + +long + Max + + + + 16/10/2003 - 10:57:24 + 16/10/2003 - 10:57:24 + 1.05 + ? + ? + ? + 783 + 381 + +? + ? + Switch_1 + 6 + EndSwitch + +Switch_1 + + +long + a + + +long + Odd + +int + Even + +int + a + + + +Switch + + + + + + 16/10/2003 - 10:57:24 + 16/10/2003 - 10:57:24 + 1.05 + ? + ? + ? + 193 + 388 + +? + ? + EndSwitch + 7 + Switch_1 + +EndSwitch + + +long + a + + +long + a + + + + 16/10/2003 - 10:57:24 + 16/10/2003 - 10:57:24 + 1.05 + ? + ? + ? + 605 + 382 + + +IsOdd + a + EndOfSwitch + a + + +573 + 160 + +572 + 130 + +InitLoopSwitch + DoLoop + EndOfInitLoopSwitch + DoLoop + + +InitLoopSwitch + Index + Switch + a + + +InitLoopSwitch + Min + EndOfInitLoopSwitch + Min + + +InitLoopSwitch + Max + EndOfInitLoopSwitch + Max + + +EndOfInitLoopSwitch + DoLoop + InitLoopSwitch + InitLoop + + +Switch + Odd + IsOdd + InGate + + +Switch + a + IsOdd + a + + +365 + 129 + +365 + 222 + +Switch + Default + EndOfSwitch + Default + + +572 + 194 + +571 + 257 + +EndOfSwitch + a + EndOfInitLoopSwitch + Index + + +IsOdd_1 + a + EndSwitch + a + + +599 + 416 + +598 + 389 + +InitLoop + DoLoop + EndOfInitLoop + DoLoop + + +InitLoop + Index + Switch_1 + a + + +InitLoop + Min + EndOfInitLoop + Min + + +InitLoop + Max + EndOfInitLoop + Max + + +EndOfInitLoop + DoLoop + InitLoop + InitLoop + + +Switch_1 + Odd + IsOdd_1 + InGate + + +Switch_1 + Even + EndSwitch + Default + + +Switch_1 + a + IsOdd_1 + a + + +379 + 387 + +378 + 481 + +EndSwitch + a + EndOfInitLoop + Index + + + +GraphSwitchs + InitLoopSwitch\Index + InitLoopSwitch + Index + +3 + 0 + + +GraphSwitchs + InitLoopSwitch\Min + InitLoopSwitch + Min + +3 + 0 + + +GraphSwitchs + InitLoopSwitch\Max + InitLoopSwitch + Max + +3 + 100 + + +GraphSwitchs + InitLoop\Index + InitLoop + Index + +3 + 0 + + +GraphSwitchs + InitLoop\Min + InitLoop + Min + +3 + 0 + + +GraphSwitchs + InitLoop\Max + InitLoop + Max + +3 + 100 + diff --git a/examples/GraphSyrControl.py b/examples/GraphSyrControl.py index 0c647d2..5756e84 100644 --- a/examples/GraphSyrControl.py +++ b/examples/GraphSyrControl.py @@ -10,36 +10,41 @@ GraphSyrControl.SetComment( 'Syracuse algorithm' ) GraphSyrControl.Coords( 0 , 0 ) # Creation of Factory Nodes + test_ISEVEN = GraphSyrControl.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) test_ISEVEN.SetName( 'test_ISEVEN' ) test_ISEVEN.SetAuthor( '' ) test_ISEVEN.SetContainer( 'localhost/FactoryServer' ) test_ISEVEN.SetComment( 'C_ISEVEN from SyrComponent' ) test_ISEVEN.Coords( 190 , 338 ) + test_ISONE = GraphSyrControl.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) test_ISONE.SetName( 'test_ISONE' ) test_ISONE.SetAuthor( '' ) test_ISONE.SetContainer( 'localhost/FactoryServer' ) test_ISONE.SetComment( 'C_ISONE from SyrComponent' ) test_ISONE.Coords( 196 , 131 ) + m3p1 = GraphSyrControl.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) m3p1.SetName( 'm3p1' ) m3p1.SetAuthor( '' ) m3p1.SetContainer( 'localhost/FactoryServer' ) m3p1.SetComment( 'C_M3P1 from SyrComponent' ) -m3p1.Coords( 621 , 14 ) +m3p1.Coords( 788 , 22 ) + div2 = GraphSyrControl.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) div2.SetName( 'div2' ) div2.SetAuthor( '' ) div2.SetContainer( 'localhost/FactoryServer' ) div2.SetComment( 'C_DIV2 from SyrComponent' ) -div2.Coords( 624 , 391 ) +div2.Coords( 794 , 427 ) + incr = GraphSyrControl.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) incr.SetName( 'incr' ) incr.SetAuthor( '' ) incr.SetContainer( 'localhost/FactoryServer' ) incr.SetComment( 'C_INCR from SyrComponent' ) -incr.Coords( 622 , 199 ) +incr.Coords( 790 , 158 ) # Creation of InLine Nodes Pylabel_begin = [] @@ -55,6 +60,7 @@ label_begin.SetName( 'label_begin' ) label_begin.SetAuthor( '' ) label_begin.SetComment( 'Python function' ) label_begin.Coords( 7 , 216 ) + Pylabel_test = [] Pylabel_test.append( 'def label_test( ValEven , ValOne , NB , KB ):' ) Pylabel_test.append( ' print "label_begin",ValEven,ValOne,NB,KB' ) @@ -71,7 +77,7 @@ label_test.OutPort( 'KT' , 'long' ) label_test.SetName( 'label_test' ) label_test.SetAuthor( '' ) label_test.SetComment( 'Python function' ) -label_test.Coords( 7 , 216 ) +label_test.Coords( 385 , 159 ) # Creation of Switch Nodes Pytest = [] @@ -94,7 +100,7 @@ test,EndSwitch_OneEven = GraphSyrControl.SNode( 'Switch_OneEven' , Pytest ) EndSwitch_OneEven.SetName( 'EndSwitch_OneEven' ) EndSwitch_OneEven.SetAuthor( '' ) EndSwitch_OneEven.SetComment( '' ) -EndSwitch_OneEven.Coords( 0 , 0 ) +EndSwitch_OneEven.Coords( 1065 , 321 ) PyEndSwitch_OneEven = [] PyEndSwitch_OneEven.append( 'def EndSwitch_OneEven( Finished , K ):' ) PyEndSwitch_OneEven.append( ' print "label_begin",Finished,K' ) @@ -117,7 +123,7 @@ test.OutPort( 'K' , 'long' ) test.SetName( 'test' ) test.SetAuthor( '' ) test.SetComment( '' ) -test.Coords( 399 , 176 ) +test.Coords( 592 , 205 ) # Creation of GOTO Nodes Pycontrol_m3p1 = [] @@ -133,7 +139,8 @@ control_m3p1.OutPort( 'KT' , 'long' ) control_m3p1.SetName( 'control_m3p1' ) control_m3p1.SetAuthor( '' ) control_m3p1.SetComment( '' ) -control_m3p1.Coords( 814 , 13 ) +control_m3p1.Coords( 1012 , 68 ) + Pycontrol_div2 = [] Pycontrol_div2.append( 'def control_div2( N , NB ) :' ) Pycontrol_div2.append( ' return N,NB' ) @@ -145,56 +152,108 @@ control_div2.OutPort( 'KB' , 'long' ) control_div2.SetName( 'control_div2' ) control_div2.SetAuthor( '' ) control_div2.SetComment( '' ) -control_div2.Coords( 812 , 414 ) +control_div2.Coords( 1010 , 473 ) -# Creation of intermediate Output variables and of Control Links +# Creation of Links test_ISEVENBoolEven = test_ISEVEN.Port( 'BoolEven' ) label_testValEven = GraphSyrControl.Link( test_ISEVENBoolEven , label_test.Port( 'ValEven' ) ) +label_testValEven.AddCoord( 1 , 380 , 236 ) +label_testValEven.AddCoord( 2 , 379 , 419 ) + test_ISONEBoolOne = test_ISONE.Port( 'BoolOne' ) label_testValOne = GraphSyrControl.Link( test_ISONEBoolOne , label_test.Port( 'ValOne' ) ) +label_testValOne.AddCoord( 1 , 367 , 269 ) +label_testValOne.AddCoord( 2 , 367 , 213 ) + m3p1anEvenInteger = m3p1.Port( 'anEvenInteger' ) control_m3p1N = GraphSyrControl.Link( m3p1anEvenInteger , control_m3p1.Port( 'N' ) ) + div2anInteger = div2.Port( 'anInteger' ) control_div2N = GraphSyrControl.Link( div2anInteger , control_div2.Port( 'N' ) ) + incraNewCount = incr.Port( 'aNewCount' ) control_m3p1K = GraphSyrControl.Link( incraNewCount , control_m3p1.Port( 'K' ) ) +control_m3p1K.AddCoord( 1 , 978 , 132 ) +control_m3p1K.AddCoord( 2 , 978 , 239 ) + control_div2K = GraphSyrControl.Link( incraNewCount , control_div2.Port( 'K' ) ) +control_div2K.AddCoord( 1 , 979 , 536 ) +control_div2K.AddCoord( 2 , 978 , 240 ) + label_beginNT = label_begin.Port( 'NT' ) label_testNT = GraphSyrControl.Link( label_beginNT , label_test.Port( 'NT' ) ) + test_ISEVENanInteger = GraphSyrControl.Link( label_beginNT , test_ISEVEN.Port( 'anInteger' ) ) +test_ISEVENanInteger.AddCoord( 1 , 184 , 416 ) +test_ISEVENanInteger.AddCoord( 2 , 185 , 298 ) + test_ISONEanInteger = GraphSyrControl.Link( label_beginNT , test_ISONE.Port( 'anInteger' ) ) +test_ISONEanInteger.AddCoord( 1 , 186 , 211 ) +test_ISONEanInteger.AddCoord( 2 , 185 , 297 ) + label_beginKT = label_begin.Port( 'KT' ) label_testKT = GraphSyrControl.Link( label_beginKT , label_test.Port( 'KT' ) ) + label_testValEven = label_test.Port( 'ValEven' ) testValEven = GraphSyrControl.Link( label_testValEven , test.Port( 'ValEven' ) ) + label_testValOne = label_test.Port( 'ValOne' ) testValOne = GraphSyrControl.Link( label_testValOne , test.Port( 'ValOne' ) ) + label_testNT = label_test.Port( 'NT' ) testNT = GraphSyrControl.Link( label_testNT , test.Port( 'NT' ) ) + label_testKT = label_test.Port( 'KT' ) testKT = GraphSyrControl.Link( label_testKT , test.Port( 'KT' ) ) -testDefault = test.Port( 'Default' ) -EndSwitch_OneEvenDefault = GraphSyrControl.Link( testDefault , EndSwitch_OneEven.Port( 'Default' ) ) + testFinished = test.Port( 'Finished' ) EndSwitch_OneEvenFinished = GraphSyrControl.Link( testFinished , EndSwitch_OneEven.Port( 'Finished' ) ) + testIncr = test.Port( 'Incr' ) incrInGate = GraphSyrControl.Link( testIncr , incr.Port( 'InGate' ) ) + testEven = test.Port( 'Even' ) div2InGate = GraphSyrControl.Link( testEven , div2.Port( 'InGate' ) ) +div2InGate.AddCoord( 1 , 764 , 536 ) +div2InGate.AddCoord( 2 , 763 , 297 ) + testOdd = test.Port( 'Odd' ) m3p1InGate = GraphSyrControl.Link( testOdd , m3p1.Port( 'InGate' ) ) +m3p1InGate.AddCoord( 1 , 773 , 133 ) +m3p1InGate.AddCoord( 2 , 773 , 326 ) + testN = test.Port( 'N' ) m3p1anOddInteger = GraphSyrControl.Link( testN , m3p1.Port( 'anOddInteger' ) ) +m3p1anOddInteger.AddCoord( 1 , 753 , 102 ) +m3p1anOddInteger.AddCoord( 2 , 752 , 355 ) + div2anEvenInteger = GraphSyrControl.Link( testN , div2.Port( 'anEvenInteger' ) ) +div2anEvenInteger.AddCoord( 1 , 753 , 508 ) +div2anEvenInteger.AddCoord( 2 , 752 , 356 ) + testK = test.Port( 'K' ) EndSwitch_OneEvenK = GraphSyrControl.Link( testK , EndSwitch_OneEven.Port( 'K' ) ) + incraCount = GraphSyrControl.Link( testK , incr.Port( 'aCount' ) ) +incraCount.AddCoord( 1 , 779 , 239 ) +incraCount.AddCoord( 2 , 780 , 385 ) + +testDefault = test.Port( 'Default' ) +EndSwitch_OneEvenDefault = GraphSyrControl.Link( testDefault , EndSwitch_OneEven.Port( 'Default' ) ) -# Creation of intermediate Output variables and of Loop Links control_m3p1OutGate = control_m3p1.Port( 'OutGate' ) label_testInGate = GraphSyrControl.Link( control_m3p1OutGate , label_test.Port( 'InGate' ) ) +label_testInGate.AddCoord( 1 , 373 , 354 ) +label_testInGate.AddCoord( 2 , 372 , 10 ) +label_testInGate.AddCoord( 3 , 1180 , 9 ) +label_testInGate.AddCoord( 4 , 1181 , 217 ) + control_div2OutGate = control_div2.Port( 'OutGate' ) label_beginInGate = GraphSyrControl.Link( control_div2OutGate , label_begin.Port( 'InGate' ) ) +label_beginInGate.AddCoord( 1 , 5 , 355 ) +label_beginInGate.AddCoord( 2 , 4 , 608 ) +label_beginInGate.AddCoord( 3 , 1177 , 608 ) +label_beginInGate.AddCoord( 4 , 1177 , 563 ) # Creation of Input datas label_beginNB = label_begin.Input( 'NB' , 7) diff --git a/examples/GraphSyrControl.xml b/examples/GraphSyrControl.xml index b8768ca..1d1c489 100644 --- a/examples/GraphSyrControl.xml +++ b/examples/GraphSyrControl.xml @@ -26,7 +26,7 @@ 11/3/2003 - 18:34:21 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 1.04 JR ? @@ -52,8 +52,8 @@ BoolEven - 25/3/2003 - 17:19:38 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 + 19/9/2003 - 15:2:2 1.04 ? localhost/FactoryServer @@ -78,8 +78,8 @@ BoolOne - 25/3/2003 - 17:19:38 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 + 19/9/2003 - 15:2:2 1.04 ? localhost/FactoryServer @@ -104,14 +104,14 @@ anEvenInteger - 25/3/2003 - 17:19:38 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 + 19/9/2003 - 15:2:2 1.04 ? localhost/FactoryServer C_M3P1 from SyrComponent - 621 - 14 + 788 + 22 SyrComponent SyrComponent @@ -130,14 +130,14 @@ anInteger - 25/3/2003 - 17:19:38 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 + 19/9/2003 - 15:2:2 1.04 ? localhost/FactoryServer C_DIV2 from SyrComponent - 624 - 391 + 794 + 427 SyrComponent SyrComponent @@ -156,14 +156,14 @@ aNewCount - 25/3/2003 - 17:19:38 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 + 19/9/2003 - 15:2:2 1.04 ? localhost/FactoryServer C_INCR from SyrComponent - 622 - 199 + 790 + 158 ? ? @@ -193,8 +193,8 @@ - 25/3/2003 - 17:19:38 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 + 19/9/2003 - 15:2:2 1.04 ? ? @@ -242,14 +242,14 @@ - 25/3/2003 - 17:19:38 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 + 19/9/2003 - 15:2:2 1.04 ? ? Python function - 7 - 216 + 385 + 159 ? ? @@ -309,14 +309,14 @@ - 25/3/2003 - 17:19:38 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 + 19/9/2003 - 15:2:2 1.04 ? ? ? - 399 - 176 + 592 + 205 ? ? @@ -346,14 +346,14 @@ - 25/3/2003 - 17:19:38 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 + 19/9/2003 - 15:2:2 1.04 ? ? ? - 0 - 0 + 1065 + 321 ? ? @@ -388,14 +388,14 @@ control_m3p1 - 25/3/2003 - 17:19:38 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 + 19/9/2003 - 15:2:2 1.04 ? ? ? - 814 - 13 + 1012 + 68 ? ? @@ -424,27 +424,39 @@ control_div2 - 25/3/2003 - 17:19:38 - 25/3/2003 - 17:19:38 + 19/9/2003 - 15:2:2 + 19/9/2003 - 15:2:2 1.04 ? ? ? - 812 - 414 + 1010 + 473 test_ISEVEN BoolEven label_test ValEven - + + +380 + 236 + +379 + 419 test_ISONE BoolOne label_test ValOne - + + +367 + 269 + +367 + 213 m3p1 anEvenInteger @@ -462,13 +474,25 @@ aNewCount control_m3p1 K - + + +978 + 132 + +978 + 239 incr aNewCount control_div2 K - + + +979 + 536 + +978 + 240 label_begin NT @@ -480,13 +504,25 @@ NT test_ISEVEN anInteger - + + +184 + 416 + +185 + 298 label_begin NT test_ISONE anInteger - + + +186 + 211 + +185 + 297 label_begin KT @@ -518,12 +554,6 @@ KT -test - Default - EndSwitch_OneEven - Default - - test Finished EndSwitch_OneEven @@ -540,25 +570,49 @@ Even div2 InGate - + + +764 + 536 + +763 + 297 test Odd m3p1 InGate - + + +773 + 133 + +773 + 326 test N m3p1 anOddInteger - + + +753 + 102 + +752 + 355 test N div2 anEvenInteger - + + +753 + 508 + +752 + 356 test K @@ -570,19 +624,55 @@ K incr aCount + + +779 + 239 + +780 + 385 + +test + Default + EndSwitch_OneEven + Default control_m3p1 OutGate label_test InGate - + + +373 + 354 + +372 + 10 + +1180 + 9 + +1181 + 217 control_div2 OutGate label_begin InGate - + + +5 + 355 + +4 + 608 + +1177 + 608 + +1177 + 563 GraphSyrControl diff --git a/examples/GraphSyrControl1.py b/examples/GraphSyrControl1.py new file mode 100755 index 0000000..97b63e5 --- /dev/null +++ b/examples/GraphSyrControl1.py @@ -0,0 +1,237 @@ + +# Generated python file of Graph GraphSyrControlGUI + +from SuperV import * +# Graph creation +GraphSyrControl1 = Graph( 'GraphSyrControl1' ) +GraphSyrControl1.SetName( 'GraphSyrControl1' ) +GraphSyrControl1.SetAuthor( 'JR' ) +GraphSyrControl1.SetComment( 'Syracuse algorithm' ) +GraphSyrControl1.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +test_ISEVEN = GraphSyrControl1.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) +test_ISEVEN.SetName( 'test_ISEVEN' ) +test_ISEVEN.SetAuthor( '' ) +test_ISEVEN.SetContainer( 'localhost/FactoryServer' ) +test_ISEVEN.SetComment( 'C_ISEVEN from SyrComponent' ) +test_ISEVEN.Coords( 190 , 338 ) + +test_ISONE = GraphSyrControl1.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) +test_ISONE.SetName( 'test_ISONE' ) +test_ISONE.SetAuthor( '' ) +test_ISONE.SetContainer( 'localhost/FactoryServer' ) +test_ISONE.SetComment( 'C_ISONE from SyrComponent' ) +test_ISONE.Coords( 196 , 131 ) + +m3p1 = GraphSyrControl1.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) +m3p1.SetName( 'm3p1' ) +m3p1.SetAuthor( '' ) +m3p1.SetContainer( 'localhost/FactoryServer' ) +m3p1.SetComment( 'C_M3P1 from SyrComponent' ) +m3p1.Coords( 615 , 30 ) + +div2 = GraphSyrControl1.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) +div2.SetName( 'div2' ) +div2.SetAuthor( '' ) +div2.SetContainer( 'localhost/FactoryServer' ) +div2.SetComment( 'C_DIV2 from SyrComponent' ) +div2.Coords( 624 , 391 ) + +incr = GraphSyrControl1.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) +incr.SetName( 'incr' ) +incr.SetAuthor( '' ) +incr.SetContainer( 'localhost/FactoryServer' ) +incr.SetComment( 'C_INCR from SyrComponent' ) +incr.Coords( 623 , 206 ) + +# Creation of InLine Nodes +Pylabel_begin = [] +Pylabel_begin.append( 'def label_begin( NB , KB ) :' ) +Pylabel_begin.append( ' return NB,KB' ) +label_begin = GraphSyrControl1.INode( 'label_begin' , Pylabel_begin ) +label_begin.InPort( 'NB' , 'long' ) +label_begin.InPort( 'KB' , 'long' ) +label_begin.OutPort( 'NT' , 'long' ) +label_begin.OutPort( 'KT' , 'long' ) +label_begin.SetName( 'label_begin' ) +label_begin.SetAuthor( '' ) +label_begin.SetComment( 'Python function' ) +label_begin.Coords( 5 , 190 ) + +# Creation of Switch Nodes +Pylabel_test = [] +Pylabel_test.append( 'def L_OneEven( ValOne , ValEven , NT , KT ):' ) +Pylabel_test.append( ' Finished = ValOne' ) +Pylabel_test.append( ' if Finished == 0 :' ) +Pylabel_test.append( ' Incr = 1' ) +Pylabel_test.append( ' Even = ValEven' ) +Pylabel_test.append( ' if Even == 0 :' ) +Pylabel_test.append( ' Odd = 1' ) +Pylabel_test.append( ' else :' ) +Pylabel_test.append( ' Odd = 0' ) +Pylabel_test.append( ' else :' ) +Pylabel_test.append( ' Incr = 0' ) +Pylabel_test.append( ' Even = 0' ) +Pylabel_test.append( ' Odd = 0' ) +Pylabel_test.append( ' Even = ValEven' ) +Pylabel_test.append( ' return Finished,Incr,Even,Odd,NT,KT' ) +label_test,EndL_OneEven = GraphSyrControl1.SNode( 'L_OneEven' , Pylabel_test ) +EndL_OneEven.SetName( 'EndL_OneEven' ) +EndL_OneEven.SetAuthor( '' ) +EndL_OneEven.SetComment( '' ) +EndL_OneEven.Coords( 1017 , 247 ) +PyEndL_OneEven = [] +EndL_OneEven.SetPyFunction( 'EndL_OneEven' , PyEndL_OneEven ) +label_test.InPort( 'ValOne' , 'long' ) +label_test.InPort( 'ValEven' , 'long' ) +label_test.InPort( 'NT' , 'long' ) +label_test.InPort( 'KT' , 'long' ) +label_test.OutPort( 'Finished' , 'long' ) +label_test.OutPort( 'Incr' , 'long' ) +label_test.OutPort( 'Even' , 'long' ) +label_test.OutPort( 'Odd' , 'long' ) +label_test.OutPort( 'N' , 'long' ) +label_test.OutPort( 'K' , 'long' ) +label_test.SetName( 'label_test' ) +label_test.SetAuthor( '' ) +label_test.SetComment( '' ) +label_test.Coords( 399 , 177 ) + +# Creation of GOTO Nodes +Pycontrol_m3p1 = [] +Pycontrol_m3p1.append( 'def C_NotOneIsEven( N , K ):' ) +Pycontrol_m3p1.append( ' return 0,1,N,K' ) +control_m3p1 = GraphSyrControl1.GNode( 'C_NotOneIsEven' , Pycontrol_m3p1 , 'label_test' ) +control_m3p1.InPort( 'N' , 'long' ) +control_m3p1.InPort( 'K' , 'long' ) +control_m3p1.OutPort( 'ValOne' , 'long' ) +control_m3p1.OutPort( 'ValEven' , 'long' ) +control_m3p1.OutPort( 'NT' , 'long' ) +control_m3p1.OutPort( 'KT' , 'long' ) +control_m3p1.SetName( 'control_m3p1' ) +control_m3p1.SetAuthor( '' ) +control_m3p1.SetComment( '' ) +control_m3p1.Coords( 821 , 28 ) + +Pycontrol_div2 = [] +Pycontrol_div2.append( 'def control_div2( N , K ) :' ) +Pycontrol_div2.append( ' return N,K' ) +control_div2 = GraphSyrControl1.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) +control_div2.InPort( 'N' , 'long' ) +control_div2.InPort( 'K' , 'long' ) +control_div2.OutPort( 'NB' , 'long' ) +control_div2.OutPort( 'KB' , 'long' ) +control_div2.SetName( 'control_div2' ) +control_div2.SetAuthor( '' ) +control_div2.SetComment( '' ) +control_div2.Coords( 818 , 358 ) + +# Creation of Links +test_ISEVENBoolEven = test_ISEVEN.Port( 'BoolEven' ) +label_testValEven = GraphSyrControl1.Link( test_ISEVENBoolEven , label_test.Port( 'ValEven' ) ) +label_testValEven.AddCoord( 1 , 383 , 239 ) +label_testValEven.AddCoord( 2 , 382 , 417 ) + +test_ISONEBoolOne = test_ISONE.Port( 'BoolOne' ) +label_testValOne = GraphSyrControl1.Link( test_ISONEBoolOne , label_test.Port( 'ValOne' ) ) + +m3p1anEvenInteger = m3p1.Port( 'anEvenInteger' ) +control_m3p1N = GraphSyrControl1.Link( m3p1anEvenInteger , control_m3p1.Port( 'N' ) ) +control_m3p1N.AddCoord( 1 , 793 , 62 ) +control_m3p1N.AddCoord( 2 , 792 , 111 ) + +div2anInteger = div2.Port( 'anInteger' ) +control_div2N = GraphSyrControl1.Link( div2anInteger , control_div2.Port( 'N' ) ) +control_div2N.AddCoord( 1 , 797 , 392 ) +control_div2N.AddCoord( 2 , 798 , 471 ) + +incraNewCount = incr.Port( 'aNewCount' ) +control_div2K = GraphSyrControl1.Link( incraNewCount , control_div2.Port( 'K' ) ) +control_div2K.AddCoord( 1 , 809 , 420 ) +control_div2K.AddCoord( 2 , 808 , 288 ) + +control_m3p1K = GraphSyrControl1.Link( incraNewCount , control_m3p1.Port( 'K' ) ) +control_m3p1K.AddCoord( 1 , 807 , 91 ) +control_m3p1K.AddCoord( 2 , 808 , 286 ) + +label_beginNT = label_begin.Port( 'NT' ) +test_ISONEanInteger = GraphSyrControl1.Link( label_beginNT , test_ISONE.Port( 'anInteger' ) ) +test_ISONEanInteger.AddCoord( 1 , 180 , 211 ) +test_ISONEanInteger.AddCoord( 2 , 179 , 269 ) + +label_testNT = GraphSyrControl1.Link( label_beginNT , label_test.Port( 'NT' ) ) + +test_ISEVENanInteger = GraphSyrControl1.Link( label_beginNT , test_ISEVEN.Port( 'anInteger' ) ) +test_ISEVENanInteger.AddCoord( 1 , 179 , 417 ) +test_ISEVENanInteger.AddCoord( 2 , 179 , 271 ) + +label_beginKT = label_begin.Port( 'KT' ) +label_testKT = GraphSyrControl1.Link( label_beginKT , label_test.Port( 'KT' ) ) + +label_testIncr = label_test.Port( 'Incr' ) +incrInGate = GraphSyrControl1.Link( label_testIncr , incr.Port( 'InGate' ) ) +incrInGate.AddCoord( 1 , 565 , 315 ) +incrInGate.AddCoord( 2 , 564 , 240 ) + +label_testEven = label_test.Port( 'Even' ) +div2InGate = GraphSyrControl1.Link( label_testEven , div2.Port( 'InGate' ) ) +div2InGate.AddCoord( 1 , 583 , 500 ) +div2InGate.AddCoord( 2 , 582 , 269 ) + +label_testOdd = label_test.Port( 'Odd' ) +m3p1InGate = GraphSyrControl1.Link( label_testOdd , m3p1.Port( 'InGate' ) ) +m3p1InGate.AddCoord( 1 , 571 , 138 ) +m3p1InGate.AddCoord( 2 , 573 , 298 ) + +label_testN = label_test.Port( 'N' ) +m3p1anOddInteger = GraphSyrControl1.Link( label_testN , m3p1.Port( 'anOddInteger' ) ) +m3p1anOddInteger.AddCoord( 1 , 604 , 110 ) +m3p1anOddInteger.AddCoord( 2 , 605 , 328 ) + +div2anEvenInteger = GraphSyrControl1.Link( label_testN , div2.Port( 'anEvenInteger' ) ) +div2anEvenInteger.AddCoord( 1 , 606 , 471 ) +div2anEvenInteger.AddCoord( 2 , 605 , 328 ) + +label_testK = label_test.Port( 'K' ) +incraCount = GraphSyrControl1.Link( label_testK , incr.Port( 'aCount' ) ) +incraCount.AddCoord( 1 , 594 , 287 ) +incraCount.AddCoord( 2 , 595 , 356 ) + +label_testDefault = label_test.Port( 'Default' ) +EndL_OneEvenDefault = GraphSyrControl1.Link( label_testDefault , EndL_OneEven.Port( 'Default' ) ) +EndL_OneEvenDefault.AddCoord( 1 , 1008 , 281 ) +EndL_OneEvenDefault.AddCoord( 2 , 1008 , 560 ) +EndL_OneEvenDefault.AddCoord( 3 , 565 , 559 ) +EndL_OneEvenDefault.AddCoord( 4 , 564 , 385 ) + +control_m3p1OutGate = control_m3p1.Port( 'OutGate' ) +label_testInGate = GraphSyrControl1.Link( control_m3p1OutGate , label_test.Port( 'InGate' ) ) +label_testInGate.AddCoord( 1 , 368 , 327 ) +label_testInGate.AddCoord( 2 , 369 , 7 ) +label_testInGate.AddCoord( 3 , 1009 , 8 ) +label_testInGate.AddCoord( 4 , 1009 , 179 ) + +control_div2OutGate = control_div2.Port( 'OutGate' ) +label_beginInGate = GraphSyrControl1.Link( control_div2OutGate , label_begin.Port( 'InGate' ) ) +label_beginInGate.AddCoord( 1 , 3 , 327 ) +label_beginInGate.AddCoord( 2 , 2 , 582 ) +label_beginInGate.AddCoord( 3 , 991 , 583 ) +label_beginInGate.AddCoord( 4 , 991 , 451 ) + +# Creation of Input datas +label_beginNB = label_begin.Input( 'NB' , 7) +label_beginKB = label_begin.Input( 'KB' , 0) + +# Creation of Output variables +label_testFinished = label_test.Port( 'Finished' ) + +GraphSyrControl1.Run( 7 ) + +GraphSyrControl1.DoneW() + +GraphSyrControl1.State() + +GraphSyrControl1.PrintPorts() + diff --git a/examples/GraphSyrControl1.xml b/examples/GraphSyrControl1.xml new file mode 100755 index 0000000..aa184bf --- /dev/null +++ b/examples/GraphSyrControl1.xml @@ -0,0 +1,613 @@ + + + + +? + ? + GraphSyrControlGUI + 1 + ? + +GraphSyrControlGUI + + +long + label_begin\NB + +long + label_begin\KB + + +long + label_test\Finished + + + 11/3/2003 - 18:28:48 + 19/9/2003 - 15:3:50 + 1.04 + JR + ? + Syracuse algorithm + 0 + 0 + + +SyrComponent + SyrComponent + test_ISEVEN + 0 + ? + +C_ISEVEN + + +long + anInteger + + +long + BoolEven + + + 19/9/2003 - 15:3:49 + 19/9/2003 - 15:3:49 + 1.04 + ? + localhost/FactoryServer + C_ISEVEN from SyrComponent + 190 + 338 + +SyrComponent + SyrComponent + test_ISONE + 0 + ? + +C_ISONE + + +long + anInteger + + +long + BoolOne + + + 19/9/2003 - 15:3:49 + 19/9/2003 - 15:3:49 + 1.04 + ? + localhost/FactoryServer + C_ISONE from SyrComponent + 196 + 131 + +SyrComponent + SyrComponent + m3p1 + 0 + ? + +C_M3P1 + + +long + anOddInteger + + +long + anEvenInteger + + + 19/9/2003 - 15:3:49 + 19/9/2003 - 15:3:49 + 1.04 + ? + localhost/FactoryServer + C_M3P1 from SyrComponent + 615 + 30 + +SyrComponent + SyrComponent + div2 + 0 + ? + +C_DIV2 + + +long + anEvenInteger + + +long + anInteger + + + 19/9/2003 - 15:3:49 + 19/9/2003 - 15:3:49 + 1.04 + ? + localhost/FactoryServer + C_DIV2 from SyrComponent + 624 + 391 + +SyrComponent + SyrComponent + incr + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 19/9/2003 - 15:3:49 + 19/9/2003 - 15:3:49 + 1.04 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 623 + 206 + +? + ? + label_begin + 3 + ? + +label_begin + + +long + NB + +long + KB + + +long + NT + +long + KT + + + +label_begin + + + 19/9/2003 - 15:3:49 + 19/9/2003 - 15:3:49 + 1.04 + ? + ? + Python function + 5 + 190 + +? + ? + label_test + 6 + EndL_OneEven + +label_test + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + + +long + Finished + +long + Incr + +long + Even + +long + Odd + +long + N + +long + K + + + +L_OneEven + + + + + + + + + + + + + + + + 19/9/2003 - 15:3:49 + 19/9/2003 - 15:3:49 + 1.04 + ? + ? + ? + 399 + 177 + +? + ? + EndL_OneEven + 7 + label_test + +EndL_OneEven + + + + + + 19/9/2003 - 15:3:49 + 19/9/2003 - 15:3:49 + 1.04 + ? + ? + ? + 1017 + 247 + +? + ? + control_m3p1 + 8 + label_test + +control_m3p1 + + +long + N + +long + K + + +long + ValOne + +long + ValEven + +long + NT + +long + KT + + + +C_NotOneIsEven + + + 19/9/2003 - 15:3:49 + 19/9/2003 - 15:3:49 + 1.04 + ? + ? + ? + 821 + 28 + +? + ? + control_div2 + 8 + label_begin + +control_div2 + + +long + N + +long + K + + +long + NB + +long + KB + + + +control_div2 + + + 19/9/2003 - 15:3:49 + 19/9/2003 - 15:3:49 + 1.04 + ? + ? + ? + 818 + 358 + + +test_ISEVEN + BoolEven + label_test + ValEven + + +383 + 239 + +382 + 417 + +test_ISONE + BoolOne + label_test + ValOne + + +m3p1 + anEvenInteger + control_m3p1 + N + + +793 + 62 + +792 + 111 + +div2 + anInteger + control_div2 + N + + +797 + 392 + +798 + 471 + +incr + aNewCount + control_div2 + K + + +809 + 420 + +808 + 288 + +incr + aNewCount + control_m3p1 + K + + +807 + 91 + +808 + 286 + +label_begin + NT + test_ISONE + anInteger + + +180 + 211 + +179 + 269 + +label_begin + NT + label_test + NT + + +label_begin + NT + test_ISEVEN + anInteger + + +179 + 417 + +179 + 271 + +label_begin + KT + label_test + KT + + +label_test + Incr + incr + InGate + + +565 + 315 + +564 + 240 + +label_test + Even + div2 + InGate + + +583 + 500 + +582 + 269 + +label_test + Odd + m3p1 + InGate + + +571 + 138 + +573 + 298 + +label_test + N + m3p1 + anOddInteger + + +604 + 110 + +605 + 328 + +label_test + N + div2 + anEvenInteger + + +606 + 471 + +605 + 328 + +label_test + K + incr + aCount + + +594 + 287 + +595 + 356 + +label_test + Default + EndL_OneEven + Default + + +1008 + 281 + +1008 + 560 + +565 + 559 + +564 + 385 + +control_m3p1 + OutGate + label_test + InGate + + +368 + 327 + +369 + 7 + +1009 + 8 + +1009 + 179 + +control_div2 + OutGate + label_begin + InGate + + +3 + 327 + +2 + 582 + +991 + 583 + +991 + 451 + + +GraphSyrControlGUI + label_begin\NB + label_begin + NB + +3 + 7 + + +GraphSyrControlGUI + label_begin\KB + label_begin + KB + +3 + 0 + diff --git a/examples/GraphSyrControlAve.py b/examples/GraphSyrControlAve.py index 995dfda..51bd2d8 100644 --- a/examples/GraphSyrControlAve.py +++ b/examples/GraphSyrControlAve.py @@ -10,66 +10,79 @@ GraphSyrControlAve.SetComment( 'Syracuse algorithm' ) GraphSyrControlAve.Coords( 0 , 0 ) # Creation of Factory Nodes + test_ISEVEN = GraphSyrControlAve.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) test_ISEVEN.SetName( 'test_ISEVEN' ) test_ISEVEN.SetAuthor( '' ) test_ISEVEN.SetContainer( 'localhost/FactoryServer' ) test_ISEVEN.SetComment( 'C_ISEVEN from SyrComponent' ) -test_ISEVEN.Coords( 190 , 338 ) +test_ISEVEN.Coords( 370 , 455 ) + test_ISONE = GraphSyrControlAve.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) test_ISONE.SetName( 'test_ISONE' ) test_ISONE.SetAuthor( '' ) test_ISONE.SetContainer( 'localhost/FactoryServer' ) test_ISONE.SetComment( 'C_ISONE from SyrComponent' ) -test_ISONE.Coords( 196 , 131 ) +test_ISONE.Coords( 370 , 127 ) + m3p1 = GraphSyrControlAve.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) m3p1.SetName( 'm3p1' ) m3p1.SetAuthor( '' ) m3p1.SetContainer( 'localhost/FactoryServer' ) m3p1.SetComment( 'C_M3P1 from SyrComponent' ) -m3p1.Coords( 621 , 29 ) +m3p1.Coords( 789 , 0 ) + div2 = GraphSyrControlAve.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) div2.SetName( 'div2' ) div2.SetAuthor( '' ) div2.SetContainer( 'localhost/FactoryServer' ) div2.SetComment( 'C_DIV2 from SyrComponent' ) -div2.Coords( 624 , 391 ) +div2.Coords( 789 , 276 ) + incr = GraphSyrControlAve.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) incr.SetName( 'incr' ) incr.SetAuthor( '' ) incr.SetContainer( 'localhost/FactoryServer' ) incr.SetComment( 'C_INCR from SyrComponent' ) -incr.Coords( 623 , 206 ) +incr.Coords( 790 , 136 ) + C_MIN = GraphSyrControlAve.FNode( 'SyrComponent' , 'SyrComponent' , 'C_MIN' ) C_MIN.SetName( 'C_MIN' ) C_MIN.SetAuthor( '' ) C_MIN.SetContainer( 'localhost/FactoryServer' ) C_MIN.SetComment( 'C_MIN from SyrComponent' ) -C_MIN.Coords( 0 , 0 ) +C_MIN.Coords( 798 , 833 ) + C_MAX = GraphSyrControlAve.FNode( 'SyrComponent' , 'SyrComponent' , 'C_MAX' ) C_MAX.SetName( 'C_MAX' ) C_MAX.SetAuthor( '' ) C_MAX.SetContainer( 'localhost/FactoryServer' ) C_MAX.SetComment( 'C_MAX from SyrComponent' ) -C_MAX.Coords( 0 , 0 ) +C_MAX.Coords( 798 , 668 ) + C_AVERAGE = GraphSyrControlAve.FNode( 'SyrComponent' , 'SyrComponent' , 'C_AVERAGE' ) C_AVERAGE.SetName( 'C_AVERAGE' ) C_AVERAGE.SetAuthor( '' ) C_AVERAGE.SetContainer( 'localhost/FactoryServer' ) C_AVERAGE.SetComment( 'C_AVERAGE from SyrComponent' ) -C_AVERAGE.Coords( 0 , 0 ) +C_AVERAGE.Coords( 784 , 476 ) + C_LISTOFSYR = GraphSyrControlAve.FNode( 'SyrComponent' , 'SyrComponent' , 'C_LISTOFSYR' ) C_LISTOFSYR.SetName( 'C_LISTOFSYR' ) C_LISTOFSYR.SetAuthor( '' ) C_LISTOFSYR.SetContainer( 'localhost/FactoryServer' ) C_LISTOFSYR.SetComment( 'C_LISTOFSYR from SyrComponent' ) -C_LISTOFSYR.Coords( 0 , 0 ) +C_LISTOFSYR.Coords( 4 , 363 ) # Creation of InLine Nodes Pylabel_begin = [] Pylabel_begin.append( 'def label_begin( NB , KB , MINB , MAXB , AVERAGEB , SYRLISTB ) :' ) Pylabel_begin.append( ' return NB,KB,MINB,MAXB,AVERAGEB,SYRLISTB' ) label_begin = GraphSyrControlAve.INode( 'label_begin' , Pylabel_begin ) +label_begin.SetName( 'label_begin' ) +label_begin.SetAuthor( '' ) +label_begin.SetComment( 'Python function' ) +label_begin.Coords( 183 , 219 ) label_begin.InPort( 'NB' , 'long' ) label_begin.InPort( 'KB' , 'long' ) label_begin.InPort( 'MINB' , 'long' ) @@ -82,10 +95,6 @@ label_begin.OutPort( 'MIN' , 'long' ) label_begin.OutPort( 'MAX' , 'long' ) label_begin.OutPort( 'AVERAGE' , 'double' ) label_begin.OutPort( 'SYRLIST' , 'ListOfSyr' ) -label_begin.SetName( 'label_begin' ) -label_begin.SetAuthor( '' ) -label_begin.SetComment( 'Python function' ) -label_begin.Coords( 7 , 216 ) # Creation of Switch Nodes Pylabel_test = [] @@ -108,9 +117,19 @@ label_test,EndL_OneEven = GraphSyrControlAve.SNode( 'L_OneEven' , Pylabel_test ) EndL_OneEven.SetName( 'EndL_OneEven' ) EndL_OneEven.SetAuthor( '' ) EndL_OneEven.SetComment( '' ) -EndL_OneEven.Coords( 1045 , 278 ) +EndL_OneEven.Coords( 1064 , 379 ) PyEndL_OneEven = [] EndL_OneEven.SetPyFunction( 'EndL_OneEven' , PyEndL_OneEven ) +EndL_OneEven.InPort( 'MIN' , 'long' ) +EndL_OneEven.InPort( 'MAX' , 'long' ) +EndL_OneEven.InPort( 'AVERAGE' , 'double' ) +EndL_OneEven.OutPort( 'MIN' , 'long' ) +EndL_OneEven.OutPort( 'MAX' , 'long' ) +EndL_OneEven.OutPort( 'AVERAGE' , 'double' ) +label_test.SetName( 'label_test' ) +label_test.SetAuthor( '' ) +label_test.SetComment( '' ) +label_test.Coords( 563 , 206 ) label_test.InPort( 'ValOne' , 'long' ) label_test.InPort( 'ValEven' , 'long' ) label_test.InPort( 'NT' , 'long' ) @@ -129,16 +148,16 @@ label_test.OutPort( 'MINT' , 'long' ) label_test.OutPort( 'MAXT' , 'long' ) label_test.OutPort( 'AVERAGET' , 'double' ) label_test.OutPort( 'SYRLISTT' , 'ListOfSyr' ) -label_test.SetName( 'label_test' ) -label_test.SetAuthor( '' ) -label_test.SetComment( '' ) -label_test.Coords( 399 , 176 ) # Creation of GOTO Nodes Pycontrol_m3p1 = [] Pycontrol_m3p1.append( 'def C_NotOneIsEven( N , K , MINT , MAXT , AVERAGET , SYRLISTT ):' ) Pycontrol_m3p1.append( ' return 0,1,N,K,MINT,MAXT,AVERAGET,SYRLISTT' ) control_m3p1 = GraphSyrControlAve.GNode( 'C_NotOneIsEven' , Pycontrol_m3p1 , 'label_test' ) +control_m3p1.SetName( 'control_m3p1' ) +control_m3p1.SetAuthor( '' ) +control_m3p1.SetComment( '' ) +control_m3p1.Coords( 1058 , 8 ) control_m3p1.InPort( 'N' , 'long' ) control_m3p1.InPort( 'K' , 'long' ) control_m3p1.InPort( 'MINT' , 'long' ) @@ -153,14 +172,15 @@ control_m3p1.OutPort( 'MIN' , 'long' ) control_m3p1.OutPort( 'MAX' , 'long' ) control_m3p1.OutPort( 'AVERAGE' , 'double' ) control_m3p1.OutPort( 'SYRLIST' , 'ListOfSyr' ) -control_m3p1.SetName( 'control_m3p1' ) -control_m3p1.SetAuthor( '' ) -control_m3p1.SetComment( '' ) -control_m3p1.Coords( 808 , 29 ) + Pycontrol_div2 = [] Pycontrol_div2.append( 'def control_div2( N , K , MINT , MAXT , AVERAGET , SYRLISTT ) :' ) Pycontrol_div2.append( ' return N,K,MINT,MAXT,AVERAGET,SYRLISTT' ) control_div2 = GraphSyrControlAve.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) +control_div2.SetName( 'control_div2' ) +control_div2.SetAuthor( '' ) +control_div2.SetComment( '' ) +control_div2.Coords( 1048 , 555 ) control_div2.InPort( 'N' , 'long' ) control_div2.InPort( 'K' , 'long' ) control_div2.InPort( 'MINT' , 'long' ) @@ -173,137 +193,199 @@ control_div2.OutPort( 'MINB' , 'long' ) control_div2.OutPort( 'MAXB' , 'long' ) control_div2.OutPort( 'AVERAGEB' , 'double' ) control_div2.OutPort( 'SYRLISTB' , 'ListOfSyr' ) -control_div2.SetName( 'control_div2' ) -control_div2.SetAuthor( '' ) -control_div2.SetComment( '' ) -control_div2.Coords( 812 , 357 ) -# Creation of intermediate Output variables and of Control Links +# Creation of Links test_ISEVENBoolEven = test_ISEVEN.Port( 'BoolEven' ) label_testValEven = GraphSyrControlAve.Link( test_ISEVENBoolEven , label_test.Port( 'ValEven' ) ) -label_testValEven.AddCoord( 1 , 385 , 358 ) -label_testValEven.AddCoord( 2 , 385 , 490 ) +label_testValEven.AddCoord( 1 , 545 , 269 ) +label_testValEven.AddCoord( 2 , 545 , 535 ) + test_ISONEBoolOne = test_ISONE.Port( 'BoolOne' ) label_testValOne = GraphSyrControlAve.Link( test_ISONEBoolOne , label_test.Port( 'ValOne' ) ) -label_testValOne.AddCoord( 1 , 385 , 328 ) -label_testValOne.AddCoord( 2 , 385 , 283 ) +label_testValOne.AddCoord( 1 , 546 , 241 ) +label_testValOne.AddCoord( 2 , 545 , 208 ) + m3p1anEvenInteger = m3p1.Port( 'anEvenInteger' ) control_m3p1N = GraphSyrControlAve.Link( m3p1anEvenInteger , control_m3p1.Port( 'N' ) ) -control_m3p1N.AddCoord( 1 , 786 , 181 ) -control_m3p1N.AddCoord( 2 , 786 , 182 ) +control_m3p1N.AddCoord( 1 , 977 , 43 ) +control_m3p1N.AddCoord( 2 , 976 , 81 ) + div2anInteger = div2.Port( 'anInteger' ) control_div2N = GraphSyrControlAve.Link( div2anInteger , control_div2.Port( 'N' ) ) -control_div2N.AddCoord( 1 , 799 , 509 ) -control_div2N.AddCoord( 2 , 799 , 543 ) +control_div2N.AddCoord( 1 , 1011 , 590 ) +control_div2N.AddCoord( 2 , 1010 , 357 ) + incraNewCount = incr.Port( 'aNewCount' ) control_div2K = GraphSyrControlAve.Link( incraNewCount , control_div2.Port( 'K' ) ) -control_div2K.AddCoord( 1 , 787 , 539 ) -control_div2K.AddCoord( 2 , 787 , 359 ) +control_div2K.AddCoord( 1 , 964 , 618 ) +control_div2K.AddCoord( 2 , 966 , 217 ) + control_m3p1K = GraphSyrControlAve.Link( incraNewCount , control_m3p1.Port( 'K' ) ) -control_m3p1K.AddCoord( 1 , 790 , 211 ) -control_m3p1K.AddCoord( 2 , 790 , 358 ) +control_m3p1K.AddCoord( 1 , 966 , 70 ) +control_m3p1K.AddCoord( 2 , 966 , 216 ) + C_AVERAGEaCount = GraphSyrControlAve.Link( incraNewCount , C_AVERAGE.Port( 'aCount' ) ) +C_AVERAGEaCount.AddCoord( 1 , 778 , 615 ) +C_AVERAGEaCount.AddCoord( 2 , 779 , 462 ) +C_AVERAGEaCount.AddCoord( 3 , 965 , 462 ) +C_AVERAGEaCount.AddCoord( 4 , 966 , 216 ) + +C_MINaNewMinVal = C_MIN.Port( 'aNewMinVal' ) +control_m3p1MINT = GraphSyrControlAve.Link( C_MINaNewMinVal , control_m3p1.Port( 'MINT' ) ) +control_m3p1MINT.AddCoord( 1 , 991 , 100 ) +control_m3p1MINT.AddCoord( 2 , 991 , 913 ) + +control_div2MINT = GraphSyrControlAve.Link( C_MINaNewMinVal , control_div2.Port( 'MINT' ) ) +control_div2MINT.AddCoord( 1 , 990 , 646 ) +control_div2MINT.AddCoord( 2 , 991 , 912 ) + +C_MAXaNewMaxVal = C_MAX.Port( 'aNewMaxVal' ) +control_m3p1MAXT = GraphSyrControlAve.Link( C_MAXaNewMaxVal , control_m3p1.Port( 'MAXT' ) ) +control_m3p1MAXT.AddCoord( 1 , 974 , 130 ) +control_m3p1MAXT.AddCoord( 2 , 974 , 747 ) + +control_div2MAXT = GraphSyrControlAve.Link( C_MAXaNewMaxVal , control_div2.Port( 'MAXT' ) ) +control_div2MAXT.AddCoord( 1 , 973 , 676 ) +control_div2MAXT.AddCoord( 2 , 974 , 747 ) + +C_AVERAGEaNewListOfSyr = C_AVERAGE.Port( 'aNewListOfSyr' ) +control_m3p1SYRLISTT = GraphSyrControlAve.Link( C_AVERAGEaNewListOfSyr , control_m3p1.Port( 'SYRLISTT' ) ) +control_m3p1SYRLISTT.AddCoord( 1 , 1037 , 188 ) +control_m3p1SYRLISTT.AddCoord( 2 , 1038 , 556 ) + +control_div2SYRLISTT = GraphSyrControlAve.Link( C_AVERAGEaNewListOfSyr , control_div2.Port( 'SYRLISTT' ) ) +control_div2SYRLISTT.AddCoord( 1 , 1038 , 735 ) +control_div2SYRLISTT.AddCoord( 2 , 1038 , 555 ) + +C_AVERAGEanAverage = C_AVERAGE.Port( 'anAverage' ) +control_m3p1AVERAGET = GraphSyrControlAve.Link( C_AVERAGEanAverage , control_m3p1.Port( 'AVERAGET' ) ) +control_m3p1AVERAGET.AddCoord( 1 , 1027 , 158 ) +control_m3p1AVERAGET.AddCoord( 2 , 1026 , 584 ) + +control_div2AVERAGET = GraphSyrControlAve.Link( C_AVERAGEanAverage , control_div2.Port( 'AVERAGET' ) ) +control_div2AVERAGET.AddCoord( 1 , 1027 , 706 ) +control_div2AVERAGET.AddCoord( 2 , 1027 , 584 ) + +C_LISTOFSYRaListOfSyr = C_LISTOFSYR.Port( 'aListOfSyr' ) +label_beginSYRLISTB = GraphSyrControlAve.Link( C_LISTOFSYRaListOfSyr , label_begin.Port( 'SYRLISTB' ) ) + label_beginNT = label_begin.Port( 'NT' ) test_ISONEanInteger = GraphSyrControlAve.Link( label_beginNT , test_ISONE.Port( 'anInteger' ) ) -test_ISONEanInteger.AddCoord( 1 , 175 , 283 ) -test_ISONEanInteger.AddCoord( 2 , 175 , 368 ) +test_ISONEanInteger.AddCoord( 1 , 362 , 207 ) +test_ISONEanInteger.AddCoord( 2 , 362 , 299 ) + label_testNT = GraphSyrControlAve.Link( label_beginNT , label_test.Port( 'NT' ) ) -label_testNT.AddCoord( 1 , 367 , 388 ) -label_testNT.AddCoord( 2 , 367 , 319 ) -label_testNT.AddCoord( 3 , 175 , 321 ) -label_testNT.AddCoord( 4 , 175 , 368 ) + test_ISEVENanInteger = GraphSyrControlAve.Link( label_beginNT , test_ISEVEN.Port( 'anInteger' ) ) -test_ISEVENanInteger.AddCoord( 1 , 183 , 486 ) -test_ISEVENanInteger.AddCoord( 2 , 183 , 368 ) +test_ISEVENanInteger.AddCoord( 1 , 361 , 534 ) +test_ISEVENanInteger.AddCoord( 2 , 362 , 299 ) + label_beginKT = label_begin.Port( 'KT' ) label_testKT = GraphSyrControlAve.Link( label_beginKT , label_test.Port( 'KT' ) ) -label_testKT.AddCoord( 1 , 373 , 418 ) -label_testKT.AddCoord( 2 , 373 , 518 ) -label_testKT.AddCoord( 3 , 176 , 519 ) -label_testKT.AddCoord( 4 , 176 , 398 ) + label_beginMIN = label_begin.Port( 'MIN' ) label_testMIN = GraphSyrControlAve.Link( label_beginMIN , label_test.Port( 'MIN' ) ) + label_beginMAX = label_begin.Port( 'MAX' ) label_testMAX = GraphSyrControlAve.Link( label_beginMAX , label_test.Port( 'MAX' ) ) + label_beginAVERAGE = label_begin.Port( 'AVERAGE' ) label_testAVERAGE = GraphSyrControlAve.Link( label_beginAVERAGE , label_test.Port( 'AVERAGE' ) ) + label_beginSYRLIST = label_begin.Port( 'SYRLIST' ) label_testSYRLIST = GraphSyrControlAve.Link( label_beginSYRLIST , label_test.Port( 'SYRLIST' ) ) -label_testDefault = label_test.Port( 'Default' ) -EndL_OneEvenDefault = GraphSyrControlAve.Link( label_testDefault , EndL_OneEven.Port( 'Default' ) ) + +label_testFinished = label_test.Port( 'Finished' ) +EndL_OneEvenDefault = GraphSyrControlAve.Link( label_testFinished , EndL_OneEven.Port( 'Default' ) ) + label_testIncr = label_test.Port( 'Incr' ) incrInGate = GraphSyrControlAve.Link( label_testIncr , incr.Port( 'InGate' ) ) -incrInGate.AddCoord( 1 , 578 , 328 ) -incrInGate.AddCoord( 2 , 578 , 358 ) +incrInGate.AddCoord( 1 , 779 , 250 ) +incrInGate.AddCoord( 2 , 780 , 269 ) + label_testEven = label_test.Port( 'Even' ) div2InGate = GraphSyrControlAve.Link( label_testEven , div2.Port( 'InGate' ) ) -div2InGate.AddCoord( 1 , 578 , 513 ) -div2InGate.AddCoord( 2 , 578 , 388 ) +div2InGate.AddCoord( 1 , 780 , 387 ) +div2InGate.AddCoord( 2 , 779 , 299 ) + label_testOdd = label_test.Port( 'Odd' ) m3p1InGate = GraphSyrControlAve.Link( label_testOdd , m3p1.Port( 'InGate' ) ) -m3p1InGate.AddCoord( 1 , 565 , 151 ) -m3p1InGate.AddCoord( 2 , 565 , 418 ) +m3p1InGate.AddCoord( 1 , 756 , 115 ) +m3p1InGate.AddCoord( 2 , 756 , 328 ) + label_testN = label_test.Port( 'N' ) m3p1anOddInteger = GraphSyrControlAve.Link( label_testN , m3p1.Port( 'anOddInteger' ) ) -m3p1anOddInteger.AddCoord( 1 , 609 , 181 ) -m3p1anOddInteger.AddCoord( 2 , 609 , 448 ) +m3p1anOddInteger.AddCoord( 1 , 740 , 80 ) +m3p1anOddInteger.AddCoord( 2 , 741 , 356 ) + div2anEvenInteger = GraphSyrControlAve.Link( label_testN , div2.Port( 'anEvenInteger' ) ) -div2anEvenInteger.AddCoord( 1 , 612 , 543 ) -div2anEvenInteger.AddCoord( 2 , 612 , 448 ) + C_MINanInteger = GraphSyrControlAve.Link( label_testN , C_MIN.Port( 'anInteger' ) ) +C_MINanInteger.AddCoord( 1 , 741 , 943 ) +C_MINanInteger.AddCoord( 2 , 740 , 357 ) + C_MAXanInteger = GraphSyrControlAve.Link( label_testN , C_MAX.Port( 'anInteger' ) ) +C_MAXanInteger.AddCoord( 1 , 742 , 778 ) +C_MAXanInteger.AddCoord( 2 , 741 , 359 ) + C_AVERAGEanInteger = GraphSyrControlAve.Link( label_testN , C_AVERAGE.Port( 'anInteger' ) ) +C_AVERAGEanInteger.AddCoord( 1 , 742 , 584 ) +C_AVERAGEanInteger.AddCoord( 2 , 741 , 357 ) + label_testK = label_test.Port( 'K' ) incraCount = GraphSyrControlAve.Link( label_testK , incr.Port( 'aCount' ) ) -incraCount.AddCoord( 1 , 594 , 358 ) -incraCount.AddCoord( 2 , 594 , 478 ) +incraCount.AddCoord( 1 , 765 , 217 ) +incraCount.AddCoord( 2 , 764 , 385 ) + label_testMINT = label_test.Port( 'MINT' ) C_MINaMinVal = GraphSyrControlAve.Link( label_testMINT , C_MIN.Port( 'aMinVal' ) ) +C_MINaMinVal.AddCoord( 1 , 759 , 914 ) +C_MINaMinVal.AddCoord( 2 , 758 , 414 ) + +EndL_OneEvenMIN = GraphSyrControlAve.Link( label_testMINT , EndL_OneEven.Port( 'MIN' ) ) + label_testMAXT = label_test.Port( 'MAXT' ) C_MAXaMaxVal = GraphSyrControlAve.Link( label_testMAXT , C_MAX.Port( 'aMaxVal' ) ) +C_MAXaMaxVal.AddCoord( 1 , 729 , 749 ) +C_MAXaMaxVal.AddCoord( 2 , 728 , 444 ) + +EndL_OneEvenMAX = GraphSyrControlAve.Link( label_testMAXT , EndL_OneEven.Port( 'MAX' ) ) + +label_testAVERAGET = label_test.Port( 'AVERAGET' ) +EndL_OneEvenAVERAGE = GraphSyrControlAve.Link( label_testAVERAGET , EndL_OneEven.Port( 'AVERAGE' ) ) + label_testSYRLISTT = label_test.Port( 'SYRLISTT' ) C_AVERAGEaListOfSyr = GraphSyrControlAve.Link( label_testSYRLISTT , C_AVERAGE.Port( 'aListOfSyr' ) ) +C_AVERAGEaListOfSyr.AddCoord( 1 , 771 , 557 ) +C_AVERAGEaListOfSyr.AddCoord( 2 , 770 , 502 ) + control_m3p1OutGate = control_m3p1.Port( 'OutGate' ) label_testInGate = GraphSyrControlAve.Link( control_m3p1OutGate , label_test.Port( 'InGate' ) ) -C_MINaNewMinVal = C_MIN.Port( 'aNewMinVal' ) -control_m3p1MINT = GraphSyrControlAve.Link( C_MINaNewMinVal , control_m3p1.Port( 'MINT' ) ) -control_div2MINT = GraphSyrControlAve.Link( C_MINaNewMinVal , control_div2.Port( 'MINT' ) ) -C_MAXaNewMaxVal = C_MAX.Port( 'aNewMaxVal' ) -control_m3p1MAXT = GraphSyrControlAve.Link( C_MAXaNewMaxVal , control_m3p1.Port( 'MAXT' ) ) -control_div2MAXT = GraphSyrControlAve.Link( C_MAXaNewMaxVal , control_div2.Port( 'MAXT' ) ) -C_AVERAGEaNewListOfSyr = C_AVERAGE.Port( 'aNewListOfSyr' ) -control_m3p1SYRLISTT = GraphSyrControlAve.Link( C_AVERAGEaNewListOfSyr , control_m3p1.Port( 'SYRLISTT' ) ) -control_div2SYRLISTT = GraphSyrControlAve.Link( C_AVERAGEaNewListOfSyr , control_div2.Port( 'SYRLISTT' ) ) -C_AVERAGEanAverage = C_AVERAGE.Port( 'anAverage' ) -control_m3p1AVERAGET = GraphSyrControlAve.Link( C_AVERAGEanAverage , control_m3p1.Port( 'AVERAGET' ) ) -control_div2AVERAGET = GraphSyrControlAve.Link( C_AVERAGEanAverage , control_div2.Port( 'AVERAGET' ) ) -C_LISTOFSYRaListOfSyr = C_LISTOFSYR.Port( 'aListOfSyr' ) -label_beginSYRLISTB = GraphSyrControlAve.Link( C_LISTOFSYRaListOfSyr , label_begin.Port( 'SYRLISTB' ) ) +label_testInGate.AddCoord( 1 , 553 , 536 ) +label_testInGate.AddCoord( 2 , 554 , 1025 ) +label_testInGate.AddCoord( 3 , 1242 , 1026 ) +label_testInGate.AddCoord( 4 , 1243 , 279 ) -# Creation of intermediate Output variables and of Loop Links control_div2OutGate = control_div2.Port( 'OutGate' ) label_beginInGate = GraphSyrControlAve.Link( control_div2OutGate , label_begin.Port( 'InGate' ) ) +label_beginInGate.AddCoord( 1 , 176 , 476 ) +label_beginInGate.AddCoord( 2 , 176 , 997 ) +label_beginInGate.AddCoord( 3 , 1217 , 996 ) +label_beginInGate.AddCoord( 4 , 1218 , 768 ) # Creation of Input datas -label_beginNB = label_begin.Input( 'NB' , 7) +label_beginNB = label_begin.Input( 'NB' , 31) label_beginKB = label_begin.Input( 'KB' , 0) label_beginMINB = label_begin.Input( 'MINB' , 0) label_beginMAXB = label_begin.Input( 'MAXB' , 0) label_beginAVERAGEB = label_begin.Input( 'AVERAGEB' , 0) # Creation of Output variables -label_testFinished = label_test.Port( 'Finished' ) -label_testAVERAGET = label_test.Port( 'AVERAGET' ) - -GraphSyrControlAve.PrintPorts() - -GraphSyrControlAve.Export('../GraphSyrControlAve') - -GraphSyrControlAve.Run( 7 ) +EndL_OneEvenMIN = EndL_OneEven.Port( 'MIN' ) +EndL_OneEvenMAX = EndL_OneEven.Port( 'MAX' ) +EndL_OneEvenAVERAGE = EndL_OneEven.Port( 'AVERAGE' ) +GraphSyrControlAve.Run() GraphSyrControlAve.DoneW() - GraphSyrControlAve.State() - GraphSyrControlAve.PrintPorts() - diff --git a/examples/GraphSyrControlAve.xml b/examples/GraphSyrControlAve.xml index 1d8b6d6..e94ce93 100644 --- a/examples/GraphSyrControlAve.xml +++ b/examples/GraphSyrControlAve.xml @@ -28,15 +28,18 @@ long - label_test\Finished + EndL_OneEven\MIN + +long + EndL_OneEven\MAX double - label_test\AVERAGET + EndL_OneEven\AVERAGE - 11/3/2003 - 17:46:14 - 25/3/2003 - 17:27:49 - 1.04 + 2/10/2003 - 11:17:14 + 2/10/2003 - 11:36:18 + 1.05 JR ? Syracuse algorithm @@ -61,14 +64,14 @@ BoolEven - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 ? localhost/FactoryServer C_ISEVEN from SyrComponent - 190 - 338 + 370 + 455 SyrComponent SyrComponent @@ -87,14 +90,14 @@ BoolOne - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 ? localhost/FactoryServer C_ISONE from SyrComponent - 196 - 131 + 370 + 127 SyrComponent SyrComponent @@ -113,14 +116,14 @@ anEvenInteger - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 ? localhost/FactoryServer C_M3P1 from SyrComponent - 621 - 29 + 789 + 0 SyrComponent SyrComponent @@ -139,14 +142,14 @@ anInteger - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 ? localhost/FactoryServer C_DIV2 from SyrComponent - 624 - 391 + 789 + 276 SyrComponent SyrComponent @@ -165,14 +168,130 @@ aNewCount - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 ? localhost/FactoryServer C_INCR from SyrComponent - 623 - 206 + 790 + 136 + +SyrComponent + SyrComponent + C_MIN + 0 + ? + +C_MIN + + +long + aMinVal + +long + anInteger + + +long + aNewMinVal + + + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 + ? + localhost/FactoryServer + C_MIN from SyrComponent + 798 + 833 + +SyrComponent + SyrComponent + C_MAX + 0 + ? + +C_MAX + + +long + aMaxVal + +long + anInteger + + +long + aNewMaxVal + + + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 + ? + localhost/FactoryServer + C_MAX from SyrComponent + 798 + 668 + +SyrComponent + SyrComponent + C_AVERAGE + 0 + ? + +C_AVERAGE + + +ListOfSyr + aListOfSyr + +long + anInteger + +long + aCount + + +ListOfSyr + aNewListOfSyr + +double + anAverage + + + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 + ? + localhost/FactoryServer + C_AVERAGE from SyrComponent + 784 + 476 + +SyrComponent + SyrComponent + C_LISTOFSYR + 0 + ? + +C_LISTOFSYR + + + +ListOfSyr + aListOfSyr + + + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 + ? + localhost/FactoryServer + C_LISTOFSYR from SyrComponent + 4 + 363 ? ? @@ -225,14 +344,14 @@ label_begin - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 ? ? Python function - 7 - 216 + 183 + 219 ? ? @@ -316,14 +435,14 @@ - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 ? ? ? - 399 - 176 + 563 + 206 ? ? @@ -332,19 +451,37 @@ label_test EndL_OneEven - - + + +long + MIN + +long + MAX + +double + AVERAGE + + +long + MIN + +long + MAX + +double + AVERAGE - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 ? ? ? - 1045 - 278 + 1064 + 379 ? ? @@ -403,14 +540,14 @@ C_NotOneIsEven - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 ? ? ? - 808 - 29 + 1058 + 8 ? ? @@ -463,130 +600,14 @@ control_div2 - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 + 2/10/2003 - 11:36:18 + 2/10/2003 - 11:36:18 + 1.05 ? ? ? - 812 - 357 - -SyrComponent - SyrComponent - C_MIN - 0 - ? - -C_MIN - - -long - aMinVal - -long - anInteger - - -long - aNewMinVal - - - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 - ? - localhost/FactoryServer - C_MIN from SyrComponent - 0 - 0 - -SyrComponent - SyrComponent - C_MAX - 0 - ? - -C_MAX - - -long - aMaxVal - -long - anInteger - - -long - aNewMaxVal - - - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 - ? - localhost/FactoryServer - C_MAX from SyrComponent - 0 - 0 - -SyrComponent - SyrComponent - C_AVERAGE - 0 - ? - -C_AVERAGE - - -ListOfSyr - aListOfSyr - -long - anInteger - -long - aCount - - -ListOfSyr - aNewListOfSyr - -double - anAverage - - - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 - ? - localhost/FactoryServer - C_AVERAGE from SyrComponent - 0 - 0 - -SyrComponent - SyrComponent - C_LISTOFSYR - 0 - ? - -C_LISTOFSYR - - - -ListOfSyr - aListOfSyr - - - 25/3/2003 - 17:27:49 - 25/3/2003 - 17:27:49 - 1.04 - ? - localhost/FactoryServer - C_LISTOFSYR from SyrComponent - 0 - 0 + 1048 + 555 test_ISEVEN @@ -595,11 +616,11 @@ ValEven -385 - 358 +545 + 269 -385 - 490 +545 + 535 test_ISONE BoolOne @@ -607,11 +628,11 @@ ValOne -385 - 328 +546 + 241 -385 - 283 +545 + 208 m3p1 anEvenInteger @@ -619,11 +640,11 @@ N -786 - 181 +977 + 43 -786 - 182 +976 + 81 div2 anInteger @@ -631,11 +652,11 @@ N -799 - 509 +1011 + 590 -799 - 543 +1010 + 357 incr aNewCount @@ -643,11 +664,11 @@ K -787 - 539 +964 + 618 -787 - 359 +966 + 217 incr aNewCount @@ -655,16 +676,130 @@ K -790 - 211 +966 + 70 -790 - 358 +966 + 216 incr aNewCount C_AVERAGE aCount + + +778 + 615 + +779 + 462 + +965 + 462 + +966 + 216 + +C_MIN + aNewMinVal + control_m3p1 + MINT + + +991 + 100 + +991 + 913 + +C_MIN + aNewMinVal + control_div2 + MINT + + +990 + 646 + +991 + 912 + +C_MAX + aNewMaxVal + control_m3p1 + MAXT + + +974 + 130 + +974 + 747 + +C_MAX + aNewMaxVal + control_div2 + MAXT + + +973 + 676 + +974 + 747 + +C_AVERAGE + aNewListOfSyr + control_m3p1 + SYRLISTT + + +1037 + 188 + +1038 + 556 + +C_AVERAGE + aNewListOfSyr + control_div2 + SYRLISTT + + +1038 + 735 + +1038 + 555 + +C_AVERAGE + anAverage + control_m3p1 + AVERAGET + + +1027 + 158 + +1026 + 584 + +C_AVERAGE + anAverage + control_div2 + AVERAGET + + +1027 + 706 + +1027 + 584 + +C_LISTOFSYR + aListOfSyr + label_begin + SYRLISTB label_begin @@ -673,29 +808,17 @@ anInteger -175 - 283 +362 + 207 -175 - 368 +362 + 299 label_begin NT label_test NT - - -367 - 388 - -367 - 319 - -175 - 321 - -175 - 368 + label_begin NT @@ -703,29 +826,17 @@ anInteger -183 - 486 +361 + 534 -183 - 368 +362 + 299 label_begin KT label_test KT - - -373 - 418 - -373 - 518 - -176 - 519 - -176 - 398 + label_begin MIN @@ -752,7 +863,7 @@ label_test - Default + Finished EndL_OneEven Default @@ -763,11 +874,11 @@ InGate -578 - 328 +779 + 250 -578 - 358 +780 + 269 label_test Even @@ -775,11 +886,11 @@ InGate -578 - 513 +780 + 387 -578 - 388 +779 + 299 label_test Odd @@ -787,11 +898,11 @@ InGate -565 - 151 +756 + 115 -565 - 418 +756 + 328 label_test N @@ -799,41 +910,53 @@ anOddInteger -609 - 181 +740 + 80 -609 - 448 +741 + 356 label_test N div2 anEvenInteger - - -612 - 543 - -612 - 448 + label_test N C_MIN anInteger - + + +741 + 943 + +740 + 357 label_test N C_MAX anInteger - + + +742 + 778 + +741 + 359 label_test N C_AVERAGE anInteger - + + +742 + 584 + +741 + 357 label_test K @@ -841,95 +964,101 @@ aCount -594 - 358 +765 + 217 -594 - 478 +764 + 385 label_test MINT C_MIN aMinVal + + +759 + 914 + +758 + 414 + +label_test + MINT + EndL_OneEven + MIN label_test MAXT C_MAX aMaxVal + + +729 + 749 + +728 + 444 + +label_test + MAXT + EndL_OneEven + MAX + + +label_test + AVERAGET + EndL_OneEven + AVERAGE label_test SYRLISTT C_AVERAGE aListOfSyr - + + +771 + 557 + +770 + 502 control_m3p1 OutGate label_test InGate - + + +553 + 536 + +554 + 1025 + +1242 + 1026 + +1243 + 279 control_div2 OutGate label_begin InGate - - -C_MIN - aNewMinVal - control_m3p1 - MINT - - -C_MIN - aNewMinVal - control_div2 - MINT - - -C_MAX - aNewMaxVal - control_m3p1 - MAXT - - -C_MAX - aNewMaxVal - control_div2 - MAXT - - -C_AVERAGE - aNewListOfSyr - control_m3p1 - SYRLISTT - - -C_AVERAGE - aNewListOfSyr - control_div2 - SYRLISTT - - -C_AVERAGE - anAverage - control_m3p1 - AVERAGET - - -C_AVERAGE - anAverage - control_div2 - AVERAGET - - -C_LISTOFSYR - aListOfSyr - label_begin - SYRLISTB - + + +176 + 476 + +176 + 997 + +1217 + 996 + +1218 + 768 GraphSyrControlAve @@ -938,7 +1067,7 @@ NB 3 - 7 + 31 GraphSyrControlAve @@ -973,6 +1102,6 @@ label_begin AVERAGEB -3 +7 0 diff --git a/examples/GraphSyrControlDefault.py b/examples/GraphSyrControlDefault.py index 489d53e..16c7465 100644 --- a/examples/GraphSyrControlDefault.py +++ b/examples/GraphSyrControlDefault.py @@ -10,36 +10,41 @@ GraphSyrControlDefault.SetComment( 'Syracuse algorithm' ) GraphSyrControlDefault.Coords( 0 , 0 ) # Creation of Factory Nodes + test_ISEVEN = GraphSyrControlDefault.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) test_ISEVEN.SetName( 'test_ISEVEN' ) test_ISEVEN.SetAuthor( '' ) test_ISEVEN.SetContainer( 'localhost/FactoryServer' ) test_ISEVEN.SetComment( 'C_ISEVEN from SyrComponent' ) -test_ISEVEN.Coords( 190 , 338 ) +test_ISEVEN.Coords( 204 , 444 ) + test_ISONE = GraphSyrControlDefault.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) test_ISONE.SetName( 'test_ISONE' ) test_ISONE.SetAuthor( '' ) test_ISONE.SetContainer( 'localhost/FactoryServer' ) test_ISONE.SetComment( 'C_ISONE from SyrComponent' ) -test_ISONE.Coords( 196 , 131 ) +test_ISONE.Coords( 201 , 52 ) + m3p1 = GraphSyrControlDefault.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) m3p1.SetName( 'm3p1' ) m3p1.SetAuthor( '' ) m3p1.SetContainer( 'localhost/FactoryServer' ) m3p1.SetComment( 'C_M3P1 from SyrComponent' ) -m3p1.Coords( 621 , 14 ) +m3p1.Coords( 806 , 19 ) + div2 = GraphSyrControlDefault.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) div2.SetName( 'div2' ) div2.SetAuthor( '' ) div2.SetContainer( 'localhost/FactoryServer' ) div2.SetComment( 'C_DIV2 from SyrComponent' ) -div2.Coords( 624 , 391 ) +div2.Coords( 803 , 451 ) + incr = GraphSyrControlDefault.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) incr.SetName( 'incr' ) incr.SetAuthor( '' ) incr.SetContainer( 'localhost/FactoryServer' ) incr.SetComment( 'C_INCR from SyrComponent' ) -incr.Coords( 622 , 199 ) +incr.Coords( 802 , 170 ) # Creation of InLine Nodes Pylabel_begin = [] @@ -47,31 +52,26 @@ Pylabel_begin.append( 'def label_begin( NB , KB ):' ) Pylabel_begin.append( ' print "label_begin",NB,KB' ) Pylabel_begin.append( ' return NB,KB' ) label_begin = GraphSyrControlDefault.INode( 'label_begin' , Pylabel_begin ) -label_begin.InPort( 'NB' , 'long' ) -label_begin.InPort( 'KB' , 'long' ) -label_begin.OutPort( 'NT' , 'long' ) -label_begin.OutPort( 'KT' , 'long' ) label_begin.SetName( 'label_begin' ) label_begin.SetAuthor( '' ) label_begin.SetComment( 'Python function' ) -label_begin.Coords( 7 , 216 ) +label_begin.Coords( 12 , 264 ) +label_begin.InPort( 'NB' , 'long' ) +label_begin.InPort( 'KB' , 'long' ) + Pylabel_test = [] Pylabel_test.append( 'def label_test( ValEven , ValOne , NB , KB ):' ) Pylabel_test.append( ' print "label_begin",ValEven,ValOne,NB,KB' ) Pylabel_test.append( ' return ValEven,ValOne,NB,KB' ) label_test = GraphSyrControlDefault.INode( 'label_test' , Pylabel_test ) +label_test.SetName( 'label_test' ) +label_test.SetAuthor( '' ) +label_test.SetComment( 'Python function' ) +label_test.Coords( 415 , 206 ) label_test.InPort( 'ValEven' , 'long' ) label_test.InPort( 'ValOne' , 'long' ) label_test.InPort( 'NT' , 'long' ) label_test.InPort( 'KT' , 'long' ) -label_test.OutPort( 'ValEven' , 'long' ) -label_test.OutPort( 'ValOne' , 'long' ) -label_test.OutPort( 'NT' , 'long' ) -label_test.OutPort( 'KT' , 'long' ) -label_test.SetName( 'label_test' ) -label_test.SetAuthor( '' ) -label_test.SetComment( 'Python function' ) -label_test.Coords( 7 , 216 ) # Creation of Switch Nodes Pytest = [] @@ -94,99 +94,140 @@ test,EndSwitch_OneEven = GraphSyrControlDefault.SNode( 'Switch_OneEven' , Pytest EndSwitch_OneEven.SetName( 'EndSwitch_OneEven' ) EndSwitch_OneEven.SetAuthor( '' ) EndSwitch_OneEven.SetComment( '' ) -EndSwitch_OneEven.Coords( 1004 , 256 ) +EndSwitch_OneEven.Coords( 1074 , 367 ) PyEndSwitch_OneEven = [] EndSwitch_OneEven.SetPyFunction( 'EndSwitch_OneEven' , PyEndSwitch_OneEven ) EndSwitch_OneEven.InPort( 'K' , 'long' ) EndSwitch_OneEven.OutPort( 'K' , 'long' ) +test.SetName( 'test' ) +test.SetAuthor( '' ) +test.SetComment( '' ) +test.Coords( 597 , 251 ) test.InPort( 'ValOne' , 'long' ) test.InPort( 'ValEven' , 'long' ) test.InPort( 'NT' , 'long' ) test.InPort( 'KT' , 'long' ) -test.OutPort( 'Incr' , 'long' ) -test.OutPort( 'Even' , 'long' ) -test.OutPort( 'Odd' , 'long' ) -test.OutPort( 'N' , 'long' ) -test.OutPort( 'K' , 'long' ) -test.SetName( 'test' ) -test.SetAuthor( '' ) -test.SetComment( '' ) -test.Coords( 399 , 176 ) # Creation of GOTO Nodes Pycontrol_m3p1 = [] Pycontrol_m3p1.append( 'def control_m3p1( N , K ):' ) Pycontrol_m3p1.append( ' return 0,1,N,K' ) control_m3p1 = GraphSyrControlDefault.GNode( 'control_m3p1' , Pycontrol_m3p1 , 'label_test' ) -control_m3p1.InPort( 'N' , 'long' ) -control_m3p1.InPort( 'K' , 'long' ) -control_m3p1.OutPort( 'ValOne' , 'long' ) -control_m3p1.OutPort( 'ValEven' , 'long' ) -control_m3p1.OutPort( 'NT' , 'long' ) -control_m3p1.OutPort( 'KT' , 'long' ) control_m3p1.SetName( 'control_m3p1' ) control_m3p1.SetAuthor( '' ) control_m3p1.SetComment( '' ) -control_m3p1.Coords( 814 , 13 ) +control_m3p1.Coords( 1002 , 64 ) +control_m3p1.InPort( 'N' , 'long' ) +control_m3p1.InPort( 'K' , 'long' ) + Pycontrol_div2 = [] Pycontrol_div2.append( 'def control_div2( N , NB ) :' ) Pycontrol_div2.append( ' return N,NB' ) control_div2 = GraphSyrControlDefault.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) -control_div2.InPort( 'N' , 'long' ) -control_div2.InPort( 'K' , 'long' ) -control_div2.OutPort( 'NB' , 'long' ) -control_div2.OutPort( 'KB' , 'long' ) control_div2.SetName( 'control_div2' ) control_div2.SetAuthor( '' ) control_div2.SetComment( '' ) -control_div2.Coords( 812 , 414 ) +control_div2.Coords( 1013 , 496 ) +control_div2.InPort( 'N' , 'long' ) +control_div2.InPort( 'K' , 'long' ) -# Creation of intermediate Output variables and of Control Links +# Creation of Links test_ISEVENBoolEven = test_ISEVEN.Port( 'BoolEven' ) label_testValEven = GraphSyrControlDefault.Link( test_ISEVENBoolEven , label_test.Port( 'ValEven' ) ) +label_testValEven.AddCoord( 1 , 381 , 286 ) +label_testValEven.AddCoord( 2 , 382 , 524 ) + test_ISONEBoolOne = test_ISONE.Port( 'BoolOne' ) label_testValOne = GraphSyrControlDefault.Link( test_ISONEBoolOne , label_test.Port( 'ValOne' ) ) +label_testValOne.AddCoord( 1 , 393 , 314 ) +label_testValOne.AddCoord( 2 , 393 , 133 ) + m3p1anEvenInteger = m3p1.Port( 'anEvenInteger' ) control_m3p1N = GraphSyrControlDefault.Link( m3p1anEvenInteger , control_m3p1.Port( 'N' ) ) + div2anInteger = div2.Port( 'anInteger' ) control_div2N = GraphSyrControlDefault.Link( div2anInteger , control_div2.Port( 'N' ) ) + incraNewCount = incr.Port( 'aNewCount' ) control_m3p1K = GraphSyrControlDefault.Link( incraNewCount , control_m3p1.Port( 'K' ) ) +control_m3p1K.AddCoord( 1 , 985 , 128 ) +control_m3p1K.AddCoord( 2 , 985 , 250 ) + control_div2K = GraphSyrControlDefault.Link( incraNewCount , control_div2.Port( 'K' ) ) +control_div2K.AddCoord( 1 , 987 , 559 ) +control_div2K.AddCoord( 2 , 985 , 250 ) + label_beginNT = label_begin.Port( 'NT' ) label_testNT = GraphSyrControlDefault.Link( label_beginNT , label_test.Port( 'NT' ) ) + test_ISEVENanInteger = GraphSyrControlDefault.Link( label_beginNT , test_ISEVEN.Port( 'anInteger' ) ) +test_ISEVENanInteger.AddCoord( 1 , 191 , 524 ) +test_ISEVENanInteger.AddCoord( 2 , 192 , 345 ) + test_ISONEanInteger = GraphSyrControlDefault.Link( label_beginNT , test_ISONE.Port( 'anInteger' ) ) +test_ISONEanInteger.AddCoord( 1 , 192 , 131 ) +test_ISONEanInteger.AddCoord( 2 , 193 , 345 ) + label_beginKT = label_begin.Port( 'KT' ) label_testKT = GraphSyrControlDefault.Link( label_beginKT , label_test.Port( 'KT' ) ) + label_testValEven = label_test.Port( 'ValEven' ) testValEven = GraphSyrControlDefault.Link( label_testValEven , test.Port( 'ValEven' ) ) + label_testValOne = label_test.Port( 'ValOne' ) testValOne = GraphSyrControlDefault.Link( label_testValOne , test.Port( 'ValOne' ) ) + label_testNT = label_test.Port( 'NT' ) testNT = GraphSyrControlDefault.Link( label_testNT , test.Port( 'NT' ) ) + label_testKT = label_test.Port( 'KT' ) testKT = GraphSyrControlDefault.Link( label_testKT , test.Port( 'KT' ) ) -testDefault = test.Port( 'Default' ) -EndSwitch_OneEvenDefault = GraphSyrControlDefault.Link( testDefault , EndSwitch_OneEven.Port( 'Default' ) ) + testIncr = test.Port( 'Incr' ) incrInGate = GraphSyrControlDefault.Link( testIncr , incr.Port( 'InGate' ) ) + testEven = test.Port( 'Even' ) div2InGate = GraphSyrControlDefault.Link( testEven , div2.Port( 'InGate' ) ) +div2InGate.AddCoord( 1 , 793 , 567 ) +div2InGate.AddCoord( 2 , 792 , 314 ) + testOdd = test.Port( 'Odd' ) m3p1InGate = GraphSyrControlDefault.Link( testOdd , m3p1.Port( 'InGate' ) ) +m3p1InGate.AddCoord( 1 , 786 , 132 ) +m3p1InGate.AddCoord( 2 , 785 , 343 ) + testN = test.Port( 'N' ) m3p1anOddInteger = GraphSyrControlDefault.Link( testN , m3p1.Port( 'anOddInteger' ) ) +m3p1anOddInteger.AddCoord( 1 , 767 , 100 ) +m3p1anOddInteger.AddCoord( 2 , 767 , 371 ) + div2anEvenInteger = GraphSyrControlDefault.Link( testN , div2.Port( 'anEvenInteger' ) ) +div2anEvenInteger.AddCoord( 1 , 768 , 531 ) +div2anEvenInteger.AddCoord( 2 , 767 , 371 ) + testK = test.Port( 'K' ) EndSwitch_OneEvenK = GraphSyrControlDefault.Link( testK , EndSwitch_OneEven.Port( 'K' ) ) + incraCount = GraphSyrControlDefault.Link( testK , incr.Port( 'aCount' ) ) +incraCount.AddCoord( 1 , 773 , 251 ) +incraCount.AddCoord( 2 , 774 , 400 ) + +testDefault = test.Port( 'Default' ) +EndSwitch_OneEvenDefault = GraphSyrControlDefault.Link( testDefault , EndSwitch_OneEven.Port( 'Default' ) ) -# Creation of intermediate Output variables and of Loop Links control_m3p1OutGate = control_m3p1.Port( 'OutGate' ) label_testInGate = GraphSyrControlDefault.Link( control_m3p1OutGate , label_test.Port( 'InGate' ) ) +label_testInGate.AddCoord( 1 , 402 , 406 ) +label_testInGate.AddCoord( 2 , 403 , 4 ) +label_testInGate.AddCoord( 3 , 1174 , 5 ) +label_testInGate.AddCoord( 4 , 1175 , 219 ) + control_div2OutGate = control_div2.Port( 'OutGate' ) label_beginInGate = GraphSyrControlDefault.Link( control_div2OutGate , label_begin.Port( 'InGate' ) ) +label_beginInGate.AddCoord( 1 , 3 , 409 ) +label_beginInGate.AddCoord( 2 , 2 , 671 ) +label_beginInGate.AddCoord( 3 , 1199 , 670 ) +label_beginInGate.AddCoord( 4 , 1198 , 592 ) # Creation of Input datas label_beginNB = label_begin.Input( 'NB' , 7) @@ -194,13 +235,3 @@ label_beginKB = label_begin.Input( 'KB' , 0) # Creation of Output variables EndSwitch_OneEvenK = EndSwitch_OneEven.Port( 'K' ) - -GraphSyrControlDefault.Run() - -GraphSyrControlDefault.DoneW() - -GraphSyrControlDefault.State() - -GraphSyrControlDefault.PrintPorts() - -EndSwitch_OneEven.PrintPorts() diff --git a/examples/GraphSyrControlDefault.xml b/examples/GraphSyrControlDefault.xml index 259aa4b..8cf9d4d 100644 --- a/examples/GraphSyrControlDefault.xml +++ b/examples/GraphSyrControlDefault.xml @@ -20,10 +20,10 @@ long EndSwitch_OneEven\K - + 19/3/2003 - 16:49:51 - 25/3/2003 - 17:36:32 + 18/3/2004 - 13:59:54 1.04 JR ? @@ -47,16 +47,16 @@ long BoolEven - + - 25/3/2003 - 17:36:32 - 25/3/2003 - 17:36:32 + 18/3/2004 - 13:59:54 + 18/3/2004 - 13:59:54 1.04 ? localhost/FactoryServer C_ISEVEN from SyrComponent - 190 - 338 + 204 + 444 SyrComponent SyrComponent @@ -73,16 +73,16 @@ long BoolOne - + - 25/3/2003 - 17:36:32 - 25/3/2003 - 17:36:32 + 18/3/2004 - 13:59:54 + 18/3/2004 - 13:59:54 1.04 ? localhost/FactoryServer C_ISONE from SyrComponent - 196 - 131 + 201 + 52 SyrComponent SyrComponent @@ -99,16 +99,16 @@ long anEvenInteger - + - 25/3/2003 - 17:36:32 - 25/3/2003 - 17:36:32 + 18/3/2004 - 13:59:54 + 18/3/2004 - 13:59:54 1.04 ? localhost/FactoryServer C_M3P1 from SyrComponent - 621 - 14 + 806 + 19 SyrComponent SyrComponent @@ -125,16 +125,16 @@ long anInteger - + - 25/3/2003 - 17:36:32 - 25/3/2003 - 17:36:32 + 18/3/2004 - 13:59:54 + 18/3/2004 - 13:59:54 1.04 ? localhost/FactoryServer C_DIV2 from SyrComponent - 624 - 391 + 803 + 451 SyrComponent SyrComponent @@ -151,16 +151,16 @@ long aNewCount - + - 25/3/2003 - 17:36:32 - 25/3/2003 - 17:36:32 + 18/3/2004 - 13:59:54 + 18/3/2004 - 13:59:54 1.04 ? localhost/FactoryServer C_INCR from SyrComponent - 622 - 199 + 802 + 170 ? ? @@ -183,21 +183,21 @@ long KT - + label_begin - 25/3/2003 - 17:36:32 - 25/3/2003 - 17:36:32 + 18/3/2004 - 13:59:54 + 18/3/2004 - 13:59:54 1.04 ? ? Python function - 7 - 216 + 12 + 264 ? ? @@ -232,21 +232,21 @@ long KT - + label_test - 25/3/2003 - 17:36:32 - 25/3/2003 - 17:36:32 + 18/3/2004 - 13:59:54 + 18/3/2004 - 13:59:54 1.04 ? ? Python function - 7 - 216 + 415 + 206 ? ? @@ -284,7 +284,7 @@ long K - + Switch_OneEven @@ -303,14 +303,14 @@ - 25/3/2003 - 17:36:32 - 25/3/2003 - 17:36:32 + 18/3/2004 - 13:59:54 + 18/3/2004 - 13:59:54 1.04 ? ? ? - 399 - 176 + 597 + 251 ? ? @@ -327,17 +327,19 @@ long K - + - - 25/3/2003 - 17:36:32 - 25/3/2003 - 17:36:32 + +? + + 18/3/2004 - 13:59:54 + 18/3/2004 - 13:59:54 1.04 ? ? ? - 1004 - 256 + 1074 + 367 ? ? @@ -366,20 +368,20 @@ long KT - + control_m3p1 - 25/3/2003 - 17:36:32 - 25/3/2003 - 17:36:32 + 18/3/2004 - 13:59:54 + 18/3/2004 - 13:59:54 1.04 ? ? ? - 814 - 13 + 1002 + 64 ? ? @@ -402,33 +404,45 @@ long KB - + control_div2 - 25/3/2003 - 17:36:32 - 25/3/2003 - 17:36:32 + 18/3/2004 - 13:59:54 + 18/3/2004 - 13:59:54 1.04 ? ? ? - 812 - 414 + 1013 + 496 test_ISEVEN BoolEven label_test ValEven - + + +381 + 286 + +382 + 524 test_ISONE BoolOne label_test ValOne - + + +393 + 314 + +393 + 133 m3p1 anEvenInteger @@ -446,13 +460,25 @@ aNewCount control_m3p1 K - + + +985 + 128 + +985 + 250 incr aNewCount control_div2 K - + + +987 + 559 + +985 + 250 label_begin NT @@ -464,13 +490,25 @@ NT test_ISEVEN anInteger - + + +191 + 524 + +192 + 345 label_begin NT test_ISONE anInteger - + + +192 + 131 + +193 + 345 label_begin KT @@ -502,12 +540,6 @@ KT -test - Default - EndSwitch_OneEven - Default - - test Incr incr @@ -518,25 +550,49 @@ Even div2 InGate - + + +793 + 567 + +792 + 314 test Odd m3p1 InGate - + + +786 + 132 + +785 + 343 test N m3p1 anOddInteger - + + +767 + 100 + +767 + 371 test N div2 anEvenInteger - + + +768 + 531 + +767 + 371 test K @@ -548,19 +604,55 @@ K incr aCount + + +773 + 251 + +774 + 400 + +test + Default + EndSwitch_OneEven + Default control_m3p1 OutGate label_test InGate - + + +402 + 406 + +403 + 4 + +1174 + 5 + +1175 + 219 control_div2 OutGate label_begin InGate - + + +3 + 409 + +2 + 671 + +1199 + 670 + +1198 + 592 GraphSyrControlDefault diff --git a/examples/GraphSyrControlGUI.py b/examples/GraphSyrControlGUI.py index d2b53c5..cf7becd 100644 --- a/examples/GraphSyrControlGUI.py +++ b/examples/GraphSyrControlGUI.py @@ -10,50 +10,53 @@ GraphSyrControlGUI.SetComment( 'Syracuse algorithm' ) GraphSyrControlGUI.Coords( 0 , 0 ) # Creation of Factory Nodes + test_ISEVEN = GraphSyrControlGUI.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) test_ISEVEN.SetName( 'test_ISEVEN' ) test_ISEVEN.SetAuthor( '' ) test_ISEVEN.SetContainer( 'localhost/FactoryServer' ) test_ISEVEN.SetComment( 'C_ISEVEN from SyrComponent' ) -test_ISEVEN.Coords( 190 , 338 ) +test_ISEVEN.Coords( 288 , 337 ) + test_ISONE = GraphSyrControlGUI.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) test_ISONE.SetName( 'test_ISONE' ) test_ISONE.SetAuthor( '' ) test_ISONE.SetContainer( 'localhost/FactoryServer' ) test_ISONE.SetComment( 'C_ISONE from SyrComponent' ) -test_ISONE.Coords( 196 , 131 ) +test_ISONE.Coords( 293 , 130 ) + m3p1 = GraphSyrControlGUI.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) m3p1.SetName( 'm3p1' ) m3p1.SetAuthor( '' ) m3p1.SetContainer( 'localhost/FactoryServer' ) m3p1.SetComment( 'C_M3P1 from SyrComponent' ) -m3p1.Coords( 621 , 29 ) +m3p1.Coords( 761 , 19 ) + div2 = GraphSyrControlGUI.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) div2.SetName( 'div2' ) div2.SetAuthor( '' ) div2.SetContainer( 'localhost/FactoryServer' ) div2.SetComment( 'C_DIV2 from SyrComponent' ) -div2.Coords( 624 , 391 ) +div2.Coords( 770 , 384 ) + incr = GraphSyrControlGUI.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) incr.SetName( 'incr' ) incr.SetAuthor( '' ) incr.SetContainer( 'localhost/FactoryServer' ) incr.SetComment( 'C_INCR from SyrComponent' ) -incr.Coords( 623 , 206 ) +incr.Coords( 764 , 179 ) # Creation of InLine Nodes Pylabel_begin = [] Pylabel_begin.append( 'def label_begin( NB , KB ) :' ) Pylabel_begin.append( ' return NB,KB' ) label_begin = GraphSyrControlGUI.INode( 'label_begin' , Pylabel_begin ) -label_begin.InPort( 'NB' , 'long' ) -label_begin.InPort( 'KB' , 'long' ) -label_begin.OutPort( 'NT' , 'long' ) -label_begin.OutPort( 'KT' , 'long' ) label_begin.SetName( 'label_begin' ) label_begin.SetAuthor( '' ) label_begin.SetComment( 'Python function' ) -label_begin.Coords( 7 , 216 ) +label_begin.Coords( 58 , 189 ) +label_begin.InPort( 'NB' , 'long' ) +label_begin.InPort( 'KB' , 'long' ) # Creation of Switch Nodes Pylabel_test = [] @@ -76,125 +79,128 @@ label_test,EndL_OneEven = GraphSyrControlGUI.SNode( 'L_OneEven' , Pylabel_test ) EndL_OneEven.SetName( 'EndL_OneEven' ) EndL_OneEven.SetAuthor( '' ) EndL_OneEven.SetComment( '' ) -EndL_OneEven.Coords( 1034 , 252 ) +EndL_OneEven.Coords( 1068 , 258 ) PyEndL_OneEven = [] EndL_OneEven.SetPyFunction( 'EndL_OneEven' , PyEndL_OneEven ) +label_test.SetName( 'label_test' ) +label_test.SetAuthor( '' ) +label_test.SetComment( '' ) +label_test.Coords( 516 , 175 ) label_test.InPort( 'ValOne' , 'long' ) label_test.InPort( 'ValEven' , 'long' ) label_test.InPort( 'NT' , 'long' ) label_test.InPort( 'KT' , 'long' ) -label_test.OutPort( 'Finished' , 'long' ) -label_test.OutPort( 'Incr' , 'long' ) -label_test.OutPort( 'Even' , 'long' ) -label_test.OutPort( 'Odd' , 'long' ) -label_test.OutPort( 'N' , 'long' ) -label_test.OutPort( 'K' , 'long' ) -label_test.SetName( 'label_test' ) -label_test.SetAuthor( '' ) -label_test.SetComment( '' ) -label_test.Coords( 399 , 176 ) # Creation of GOTO Nodes Pycontrol_m3p1 = [] Pycontrol_m3p1.append( 'def C_NotOneIsEven( N , K ):' ) Pycontrol_m3p1.append( ' return 0,1,N,K' ) control_m3p1 = GraphSyrControlGUI.GNode( 'C_NotOneIsEven' , Pycontrol_m3p1 , 'label_test' ) -control_m3p1.InPort( 'N' , 'long' ) -control_m3p1.InPort( 'K' , 'long' ) -control_m3p1.OutPort( 'ValOne' , 'long' ) -control_m3p1.OutPort( 'ValEven' , 'long' ) -control_m3p1.OutPort( 'NT' , 'long' ) -control_m3p1.OutPort( 'KT' , 'long' ) control_m3p1.SetName( 'control_m3p1' ) control_m3p1.SetAuthor( '' ) control_m3p1.SetComment( '' ) -control_m3p1.Coords( 808 , 29 ) +control_m3p1.Coords( 972 , 64 ) +control_m3p1.InPort( 'N' , 'long' ) +control_m3p1.InPort( 'K' , 'long' ) + Pycontrol_div2 = [] Pycontrol_div2.append( 'def control_div2( N , K ) :' ) Pycontrol_div2.append( ' return N,K' ) control_div2 = GraphSyrControlGUI.GNode( 'control_div2' , Pycontrol_div2 , 'label_begin' ) -control_div2.InPort( 'N' , 'long' ) -control_div2.InPort( 'K' , 'long' ) -control_div2.OutPort( 'NB' , 'long' ) -control_div2.OutPort( 'KB' , 'long' ) control_div2.SetName( 'control_div2' ) control_div2.SetAuthor( '' ) control_div2.SetComment( '' ) -control_div2.Coords( 812 , 357 ) +control_div2.Coords( 972 , 430 ) +control_div2.InPort( 'N' , 'long' ) +control_div2.InPort( 'K' , 'long' ) -# Creation of intermediate Output variables and of Control Links +# Creation of Links test_ISEVENBoolEven = test_ISEVEN.Port( 'BoolEven' ) label_testValEven = GraphSyrControlGUI.Link( test_ISEVENBoolEven , label_test.Port( 'ValEven' ) ) -label_testValEven.AddCoord( 1 , 385 , 358 ) -label_testValEven.AddCoord( 2 , 385 , 490 ) +label_testValEven.AddCoord( 1 , 493 , 238 ) +label_testValEven.AddCoord( 2 , 493 , 418 ) + test_ISONEBoolOne = test_ISONE.Port( 'BoolOne' ) label_testValOne = GraphSyrControlGUI.Link( test_ISONEBoolOne , label_test.Port( 'ValOne' ) ) -label_testValOne.AddCoord( 1 , 385 , 328 ) -label_testValOne.AddCoord( 2 , 385 , 283 ) + m3p1anEvenInteger = m3p1.Port( 'anEvenInteger' ) control_m3p1N = GraphSyrControlGUI.Link( m3p1anEvenInteger , control_m3p1.Port( 'N' ) ) -control_m3p1N.AddCoord( 1 , 786 , 181 ) -control_m3p1N.AddCoord( 2 , 786 , 182 ) + div2anInteger = div2.Port( 'anInteger' ) control_div2N = GraphSyrControlGUI.Link( div2anInteger , control_div2.Port( 'N' ) ) -control_div2N.AddCoord( 1 , 799 , 509 ) -control_div2N.AddCoord( 2 , 799 , 543 ) + incraNewCount = incr.Port( 'aNewCount' ) control_div2K = GraphSyrControlGUI.Link( incraNewCount , control_div2.Port( 'K' ) ) -control_div2K.AddCoord( 1 , 787 , 539 ) -control_div2K.AddCoord( 2 , 787 , 359 ) +control_div2K.AddCoord( 1 , 954 , 494 ) +control_div2K.AddCoord( 2 , 954 , 259 ) + control_m3p1K = GraphSyrControlGUI.Link( incraNewCount , control_m3p1.Port( 'K' ) ) -control_m3p1K.AddCoord( 1 , 790 , 211 ) -control_m3p1K.AddCoord( 2 , 790 , 358 ) +control_m3p1K.AddCoord( 1 , 955 , 128 ) +control_m3p1K.AddCoord( 2 , 954 , 258 ) + label_beginNT = label_begin.Port( 'NT' ) test_ISONEanInteger = GraphSyrControlGUI.Link( label_beginNT , test_ISONE.Port( 'anInteger' ) ) -test_ISONEanInteger.AddCoord( 1 , 175 , 283 ) -test_ISONEanInteger.AddCoord( 2 , 175 , 368 ) +test_ISONEanInteger.AddCoord( 1 , 275 , 211 ) +test_ISONEanInteger.AddCoord( 2 , 275 , 270 ) + label_testNT = GraphSyrControlGUI.Link( label_beginNT , label_test.Port( 'NT' ) ) -label_testNT.AddCoord( 1 , 367 , 388 ) -label_testNT.AddCoord( 2 , 367 , 319 ) -label_testNT.AddCoord( 3 , 175 , 321 ) -label_testNT.AddCoord( 4 , 175 , 368 ) + test_ISEVENanInteger = GraphSyrControlGUI.Link( label_beginNT , test_ISEVEN.Port( 'anInteger' ) ) -test_ISEVENanInteger.AddCoord( 1 , 183 , 486 ) -test_ISEVENanInteger.AddCoord( 2 , 183 , 368 ) +test_ISEVENanInteger.AddCoord( 1 , 274 , 417 ) +test_ISEVENanInteger.AddCoord( 2 , 275 , 270 ) + label_beginKT = label_begin.Port( 'KT' ) label_testKT = GraphSyrControlGUI.Link( label_beginKT , label_test.Port( 'KT' ) ) -label_testKT.AddCoord( 1 , 373 , 418 ) -label_testKT.AddCoord( 2 , 373 , 518 ) -label_testKT.AddCoord( 3 , 176 , 519 ) -label_testKT.AddCoord( 4 , 176 , 398 ) -label_testDefault = label_test.Port( 'Default' ) -EndL_OneEvenDefault = GraphSyrControlGUI.Link( label_testDefault , EndL_OneEven.Port( 'Default' ) ) +label_testKT.AddCoord( 1 , 476 , 294 ) +label_testKT.AddCoord( 2 , 475 , 515 ) +label_testKT.AddCoord( 3 , 260 , 515 ) +label_testKT.AddCoord( 4 , 260 , 298 ) + label_testIncr = label_test.Port( 'Incr' ) incrInGate = GraphSyrControlGUI.Link( label_testIncr , incr.Port( 'InGate' ) ) -incrInGate.AddCoord( 1 , 578 , 328 ) -incrInGate.AddCoord( 2 , 578 , 358 ) +incrInGate.AddCoord( 1 , 712 , 292 ) +incrInGate.AddCoord( 2 , 711 , 238 ) + label_testEven = label_test.Port( 'Even' ) div2InGate = GraphSyrControlGUI.Link( label_testEven , div2.Port( 'InGate' ) ) -div2InGate.AddCoord( 1 , 578 , 513 ) -div2InGate.AddCoord( 2 , 578 , 388 ) +div2InGate.AddCoord( 1 , 724 , 498 ) +div2InGate.AddCoord( 2 , 723 , 268 ) + label_testOdd = label_test.Port( 'Odd' ) m3p1InGate = GraphSyrControlGUI.Link( label_testOdd , m3p1.Port( 'InGate' ) ) -m3p1InGate.AddCoord( 1 , 565 , 151 ) -m3p1InGate.AddCoord( 2 , 565 , 418 ) +m3p1InGate.AddCoord( 1 , 698 , 132 ) +m3p1InGate.AddCoord( 2 , 697 , 297 ) + label_testN = label_test.Port( 'N' ) m3p1anOddInteger = GraphSyrControlGUI.Link( label_testN , m3p1.Port( 'anOddInteger' ) ) -m3p1anOddInteger.AddCoord( 1 , 609 , 181 ) -m3p1anOddInteger.AddCoord( 2 , 609 , 448 ) +m3p1anOddInteger.AddCoord( 1 , 748 , 100 ) +m3p1anOddInteger.AddCoord( 2 , 747 , 325 ) + div2anEvenInteger = GraphSyrControlGUI.Link( label_testN , div2.Port( 'anEvenInteger' ) ) -div2anEvenInteger.AddCoord( 1 , 612 , 543 ) -div2anEvenInteger.AddCoord( 2 , 612 , 448 ) +div2anEvenInteger.AddCoord( 1 , 746 , 463 ) +div2anEvenInteger.AddCoord( 2 , 747 , 327 ) + label_testK = label_test.Port( 'K' ) incraCount = GraphSyrControlGUI.Link( label_testK , incr.Port( 'aCount' ) ) -incraCount.AddCoord( 1 , 594 , 358 ) -incraCount.AddCoord( 2 , 594 , 478 ) +incraCount.AddCoord( 1 , 732 , 260 ) +incraCount.AddCoord( 2 , 732 , 354 ) + +label_testDefault = label_test.Port( 'Default' ) +EndL_OneEvenDefault = GraphSyrControlGUI.Link( label_testDefault , EndL_OneEven.Port( 'Default' ) ) + control_m3p1OutGate = control_m3p1.Port( 'OutGate' ) label_testInGate = GraphSyrControlGUI.Link( control_m3p1OutGate , label_test.Port( 'InGate' ) ) +label_testInGate.AddCoord( 1 , 503 , 388 ) +label_testInGate.AddCoord( 2 , 505 , 5 ) +label_testInGate.AddCoord( 3 , 1149 , 5 ) +label_testInGate.AddCoord( 4 , 1150 , 219 ) -# Creation of intermediate Output variables and of Loop Links control_div2OutGate = control_div2.Port( 'OutGate' ) label_beginInGate = GraphSyrControlGUI.Link( control_div2OutGate , label_begin.Port( 'InGate' ) ) +label_beginInGate.AddCoord( 1 , 34 , 332 ) +label_beginInGate.AddCoord( 2 , 34 , 592 ) +label_beginInGate.AddCoord( 3 , 1145 , 586 ) +label_beginInGate.AddCoord( 4 , 1144 , 527 ) # Creation of Input datas label_beginNB = label_begin.Input( 'NB' , 7) @@ -202,12 +208,3 @@ label_beginKB = label_begin.Input( 'KB' , 0) # Creation of Output variables label_testFinished = label_test.Port( 'Finished' ) - -GraphSyrControlGUI.Run( 7 ) - -GraphSyrControlGUI.DoneW() - -GraphSyrControlGUI.State() - -GraphSyrControlGUI.PrintPorts() - diff --git a/examples/GraphSyrControlGUI.xml b/examples/GraphSyrControlGUI.xml index 3acb92f..14986c9 100644 --- a/examples/GraphSyrControlGUI.xml +++ b/examples/GraphSyrControlGUI.xml @@ -20,10 +20,10 @@ long label_test\Finished - + 11/3/2003 - 18:28:48 - 25/3/2003 - 17:42:48 + 18/3/2004 - 14:22:38 1.04 JR ? @@ -47,16 +47,16 @@ long BoolEven - + - 25/3/2003 - 17:42:48 - 25/3/2003 - 17:42:48 + 18/3/2004 - 14:22:38 + 18/3/2004 - 14:22:38 1.04 ? localhost/FactoryServer C_ISEVEN from SyrComponent - 190 - 338 + 288 + 337 SyrComponent SyrComponent @@ -73,16 +73,16 @@ long BoolOne - + - 25/3/2003 - 17:42:48 - 25/3/2003 - 17:42:48 + 18/3/2004 - 14:22:38 + 18/3/2004 - 14:22:38 1.04 ? localhost/FactoryServer C_ISONE from SyrComponent - 196 - 131 + 293 + 130 SyrComponent SyrComponent @@ -99,16 +99,16 @@ long anEvenInteger - + - 25/3/2003 - 17:42:48 - 25/3/2003 - 17:42:48 + 18/3/2004 - 14:22:38 + 18/3/2004 - 14:22:38 1.04 ? localhost/FactoryServer C_M3P1 from SyrComponent - 621 - 29 + 761 + 19 SyrComponent SyrComponent @@ -125,16 +125,16 @@ long anInteger - + - 25/3/2003 - 17:42:48 - 25/3/2003 - 17:42:48 + 18/3/2004 - 14:22:38 + 18/3/2004 - 14:22:38 1.04 ? localhost/FactoryServer C_DIV2 from SyrComponent - 624 - 391 + 770 + 384 SyrComponent SyrComponent @@ -151,16 +151,16 @@ long aNewCount - + - 25/3/2003 - 17:42:48 - 25/3/2003 - 17:42:48 + 18/3/2004 - 14:22:38 + 18/3/2004 - 14:22:38 1.04 ? localhost/FactoryServer C_INCR from SyrComponent - 623 - 206 + 764 + 179 ? ? @@ -183,20 +183,20 @@ long KT - + label_begin - 25/3/2003 - 17:42:48 - 25/3/2003 - 17:42:48 + 18/3/2004 - 14:22:38 + 18/3/2004 - 14:22:38 1.04 ? ? Python function - 7 - 216 + 58 + 189 ? ? @@ -237,7 +237,7 @@ long K - + L_OneEven @@ -256,14 +256,14 @@ - 25/3/2003 - 17:42:48 - 25/3/2003 - 17:42:48 + 18/3/2004 - 14:22:38 + 18/3/2004 - 14:22:38 1.04 ? ? ? - 399 - 176 + 516 + 175 ? ? @@ -274,17 +274,19 @@ EndL_OneEven - + - - 25/3/2003 - 17:42:48 - 25/3/2003 - 17:42:48 + +? + + 18/3/2004 - 14:22:38 + 18/3/2004 - 14:22:38 1.04 ? ? ? - 1034 - 252 + 1068 + 258 ? ? @@ -313,20 +315,20 @@ long KT - + C_NotOneIsEven - 25/3/2003 - 17:42:48 - 25/3/2003 - 17:42:48 + 18/3/2004 - 14:22:38 + 18/3/2004 - 14:22:38 1.04 ? ? ? - 808 - 29 + 972 + 64 ? ? @@ -349,20 +351,20 @@ long KB - + control_div2 - 25/3/2003 - 17:42:48 - 25/3/2003 - 17:42:48 + 18/3/2004 - 14:22:38 + 18/3/2004 - 14:22:38 1.04 ? ? ? - 812 - 357 + 972 + 430 test_ISEVEN @@ -371,47 +373,29 @@ ValEven -385 - 358 +493 + 238 -385 - 490 +493 + 418 test_ISONE BoolOne label_test ValOne - - -385 - 328 - -385 - 283 + m3p1 anEvenInteger control_m3p1 N - - -786 - 181 - -786 - 182 + div2 anInteger control_div2 N - - -799 - 509 - -799 - 543 + incr aNewCount @@ -419,11 +403,11 @@ K -787 - 539 +954 + 494 -787 - 359 +954 + 259 incr aNewCount @@ -431,11 +415,11 @@ K -790 - 211 +955 + 128 -790 - 358 +954 + 258 label_begin NT @@ -443,29 +427,17 @@ anInteger -175 - 283 +275 + 211 -175 - 368 +275 + 270 label_begin NT label_test NT - - -367 - 388 - -367 - 319 - -175 - 321 - -175 - 368 + label_begin NT @@ -473,11 +445,11 @@ anInteger -183 - 486 +274 + 417 -183 - 368 +275 + 270 label_begin KT @@ -485,23 +457,17 @@ KT -373 - 418 +476 + 294 -373 - 518 +475 + 515 -176 - 519 +260 + 515 -176 - 398 - -label_test - Default - EndL_OneEven - Default - +260 + 298 label_test Incr @@ -509,11 +475,11 @@ InGate -578 - 328 +712 + 292 -578 - 358 +711 + 238 label_test Even @@ -521,11 +487,11 @@ InGate -578 - 513 +724 + 498 -578 - 388 +723 + 268 label_test Odd @@ -533,11 +499,11 @@ InGate -565 - 151 +698 + 132 -565 - 418 +697 + 297 label_test N @@ -545,11 +511,11 @@ anOddInteger -609 - 181 +748 + 100 -609 - 448 +747 + 325 label_test N @@ -557,11 +523,11 @@ anEvenInteger -612 - 543 +746 + 463 -612 - 448 +747 + 327 label_test K @@ -569,23 +535,53 @@ aCount -594 - 358 +732 + 260 -594 - 478 +732 + 354 + +label_test + Default + EndL_OneEven + Default + control_m3p1 OutGate label_test InGate - + + +503 + 388 + +505 + 5 + +1149 + 5 + +1150 + 219 control_div2 OutGate label_begin InGate - + + +34 + 332 + +34 + 592 + +1145 + 586 + +1144 + 527 GraphSyrControlGUI diff --git a/examples/GraphSyracuseC.py b/examples/GraphSyracuseC.py index efe30b4..296d36a 100644 --- a/examples/GraphSyracuseC.py +++ b/examples/GraphSyracuseC.py @@ -1,5 +1,26 @@ - -# Generated python file of Graph GraphSyracuseC +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : GraphSyracuseC.py +# Module : SuperVisionTest from SuperV import * # Graph creation diff --git a/examples/GraphSyracuseCEv.py b/examples/GraphSyracuseCEv.py index 7706242..2ee258e 100644 --- a/examples/GraphSyracuseCEv.py +++ b/examples/GraphSyracuseCEv.py @@ -1,5 +1,26 @@ - -# Generated python file of Graph GraphSyracuseCEv +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : GraphSyracuseCEv.py +# Module : SuperVisionTest from SuperV import * import SUPERV diff --git a/examples/GraphSyracuseC_Gate.py b/examples/GraphSyracuseC_Gate.py index 4034379..2493180 100644 --- a/examples/GraphSyracuseC_Gate.py +++ b/examples/GraphSyracuseC_Gate.py @@ -1,5 +1,9 @@ - -# Generated python file of Graph GraphSyracuseC_Gate +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# +# +# File : GraphSyracuseC_Gate.py +# Module : SuperVisionTest from SuperV import * # Graph creation @@ -9,68 +13,67 @@ GraphSyracuseC_Gate.SetAuthor( 'JR' ) GraphSyracuseC_Gate.SetComment( 'Syracuse algorithm' ) GraphSyracuseC_Gate.Coords( 0 , 0 ) -# Creation of Computing Nodes -test_ISEVEN = GraphSyracuseC_Gate.Node( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) +# Creation of Factory Nodes +test_ISEVEN = GraphSyracuseC_Gate.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) test_ISEVEN.SetName( 'test_ISEVEN' ) test_ISEVEN.SetAuthor( '' ) test_ISEVEN.SetContainer( 'localhost/FactoryServer' ) -test_ISEVEN.SetComment( '' ) +test_ISEVEN.SetComment( 'C_ISEVEN from SyrComponent' ) test_ISEVEN.Coords( 5 , 416 ) -test_ISONE = GraphSyracuseC_Gate.Node( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) +test_ISONE = GraphSyracuseC_Gate.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) test_ISONE.SetName( 'test_ISONE' ) test_ISONE.SetAuthor( '' ) test_ISONE.SetContainer( 'localhost/FactoryServer' ) -test_ISONE.SetComment( '' ) +test_ISONE.SetComment( 'C_ISONE from SyrComponent' ) test_ISONE.Coords( 7 , 232 ) -m3p1 = GraphSyracuseC_Gate.Node( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) +m3p1 = GraphSyracuseC_Gate.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3P1' ) m3p1.SetName( 'm3p1' ) m3p1.SetAuthor( '' ) m3p1.SetContainer( 'localhost/FactoryServer' ) -m3p1.SetComment( '' ) +m3p1.SetComment( 'C_M3P1 from SyrComponent' ) m3p1.Coords( 180 , 417 ) -div2 = GraphSyracuseC_Gate.Node( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) +div2 = GraphSyracuseC_Gate.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) div2.SetName( 'div2' ) div2.SetAuthor( '' ) div2.SetContainer( 'localhost/FactoryServer' ) -div2.SetComment( '' ) +div2.SetComment( 'C_DIV2 from SyrComponent' ) div2.Coords( 435 , 7 ) -div2_ISEVEN = GraphSyracuseC_Gate.Node( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) +div2_ISEVEN = GraphSyracuseC_Gate.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISEVEN' ) div2_ISEVEN.SetName( 'div2_ISEVEN' ) div2_ISEVEN.SetAuthor( '' ) div2_ISEVEN.SetContainer( 'localhost/FactoryServer' ) -div2_ISEVEN.SetComment( '' ) -div2_ISEVEN.Coords( 619 , 191 ) -div2_ISONE = GraphSyracuseC_Gate.Node( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) +div2_ISEVEN.SetComment( 'C_ISEVEN from SyrComponent' ) +div2_ISEVEN.Coords( 663 , 193 ) +div2_ISONE = GraphSyracuseC_Gate.FNode( 'SyrComponent' , 'SyrComponent' , 'C_ISONE' ) div2_ISONE.SetName( 'div2_ISONE' ) div2_ISONE.SetAuthor( '' ) div2_ISONE.SetContainer( 'localhost/FactoryServer' ) -div2_ISONE.SetComment( '' ) -div2_ISONE.Coords( 616 , 6 ) -incr = GraphSyracuseC_Gate.Node( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) +div2_ISONE.SetComment( 'C_ISONE from SyrComponent' ) +div2_ISONE.Coords( 651 , 6 ) +incr = GraphSyracuseC_Gate.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) incr.SetName( 'incr' ) incr.SetAuthor( '' ) incr.SetContainer( 'localhost/FactoryServer' ) -incr.SetComment( '' ) +incr.SetComment( 'C_INCR from SyrComponent' ) incr.Coords( 434 , 193 ) -# Creation of intermediate Output variables and of Computing Links +# Creation of intermediate Output variables and of Control Links test_ISEVENOutGate = test_ISEVEN.Port( 'OutGate' ) m3p1InGate = GraphSyracuseC_Gate.Link( test_ISEVENOutGate , m3p1.Port( 'InGate' ) ) m3p1anEvenInteger = m3p1.Port( 'anEvenInteger' ) div2anEvenInteger = GraphSyracuseC_Gate.Link( m3p1anEvenInteger , div2.Port( 'anEvenInteger' ) ) -div2anEvenInteger.AddCoord( 1 , 368 , 158 ) -div2anEvenInteger.AddCoord( 2 , 369 , 568 ) +div2anEvenInteger.AddCoord( 1 , 373 , 117 ) +div2anEvenInteger.AddCoord( 2 , 373 , 528 ) div2anInteger = div2.Port( 'anInteger' ) div2_ISONEanInteger = GraphSyracuseC_Gate.Link( div2anInteger , div2_ISONE.Port( 'anInteger' ) ) div2_ISEVENanInteger = GraphSyracuseC_Gate.Link( div2anInteger , div2_ISEVEN.Port( 'anInteger' ) ) -div2_ISEVENanInteger.AddCoord( 1 , 603 , 342 ) -div2_ISEVENanInteger.AddCoord( 2 , 603 , 158 ) +div2_ISEVENanInteger.AddCoord( 1 , 626 , 302 ) +div2_ISEVENanInteger.AddCoord( 2 , 626 , 116 ) # Creation of Input datas -curM3P1 = m3p1.Input( 'anOddInteger' , 31) -curtestISEVEN = test_ISEVEN.Input( 'anInteger' , curM3P1.ToAny() ) -curtestISONE = test_ISONE.Input( 'anInteger' , curM3P1.ToAny() ) -div2InanEvenInteger = div2.Port( 'anEvenInteger' ) +test_ISEVENanInteger = test_ISEVEN.Input( 'anInteger' , 31) +test_ISONEanInteger = test_ISONE.Input( 'anInteger' , 31) +m3p1anOddInteger = m3p1.Input( 'anOddInteger' , 31) incraCount = incr.Input( 'aCount' , 0) # Creation of Output variables @@ -80,35 +83,11 @@ div2_ISEVENBoolEven = div2_ISEVEN.Port( 'BoolEven' ) div2_ISONEBoolOne = div2_ISONE.Port( 'BoolOne' ) incraNewCount = incr.Port( 'aNewCount' ) -GraphSyracuseC_Gate.IsValid() - -GraphSyracuseC_Gate.ThreadsMax() - -GraphSyracuseC_Gate.LevelMax() - -GraphSyracuseC_Gate.GraphsNumber() - -GraphSyracuseC_Gate.IsExecutable() - -exec GraphSyracuseC_Gate.ListNodes() - -curM3P1 = m3p1.Port( 'anOddInteger' ) -m3p1anEvenInteger = m3p1.Port( 'anEvenInteger' ) -curtestISEVEN = test_ISEVEN.Port( 'anInteger' ) -curtestISONE = test_ISONE.Port( 'anInteger' ) -div2anEvenInteger = div2.Port( 'anEvenInteger' ) -div2anInteger = div2.Port( 'anInteger' ) -incraCount = incr.Port( 'aCount' ) - -# Creation of Output variables -test_ISEVENBoolEven = test_ISEVEN.Port( 'BoolEven' ) -test_ISONEBoolOne = test_ISONE.Port( 'BoolOne' ) -div2_ISEVENBoolEven = div2_ISEVEN.Port( 'BoolEven' ) -div2_ISONEBoolOne = div2_ISONE.Port( 'BoolOne' ) -incraNewCount = incr.Port( 'aNewCount' ) GraphSyracuseC_Gate.Start() +div2InanInteger = div2.Port( 'anEvenInteger' ) + m3p1.Suspend() div2_ISEVEN.SuspendDone() @@ -133,30 +112,83 @@ BoolEven = int( test_ISEVENBoolEven.ToString() ) while BoolOne == 0 : if BoolEven == 0 : sts = div2_ISONE.ReRunAt('m3p1') + if sts == 0 : + print 'div2_ISONE.ReRunAt error' + break sts = incr.ReRun() + if sts == 0 : + print 'incr.ReRun error' + break sts = m3p1.DoneW() + if sts == 0 : + print 'm3p1.DoneW error' + break sts = incr.DoneW() + if sts == 0 : + print 'incr.DoneW error' + break sts = incraCount.Input( int( incraNewCount.ToString() ) + 1 ) + if sts == 0 : + print 'incraCount.Input error' + break BoolEven = 1 BoolOne = 0 Current = int( m3p1anEvenInteger.ToString() ) print incraNewCount.ToString(),"m3p1",Current,BoolEven + if Current <= 0 : + break + if Current <= 0 : + break while BoolEven == 1 : sts = incr.ReRun() + if sts == 0 : + print 'incr.ReRun error' + break sts = div2.DoneW() + if sts == 0 : + print 'div2.DoneW error' + break sts = div2_ISEVEN.DoneW() + if sts == 0 : + print 'div2_ISEVEN.DoneW error' + break sts = div2_ISONE.DoneW() + if sts == 0 : + print 'div2_ISONE.DoneW error' + break sts = incr.DoneW() + if sts == 0 : + print 'incr.DoneW error' + break sts = incraCount.Input( incraNewCount.ToString() ) + if sts == 0 : + print 'incraCount.Input error' + break BoolOne = int( div2_ISONEBoolOne.ToString() ) BoolEven = int( div2_ISEVENBoolEven.ToString() ) Current = int( div2anInteger.ToString() ) print incraNewCount.ToString(),"div2",Current,BoolEven,BoolOne + if Current <= 0 : + break if BoolEven == 1 : - sts = div2InanEvenInteger.Input( Current ) + sts = div2InanInteger.Input( Current ) + if sts == 0 : + print 'div2InanInteger.Input error' + break sts = div2_ISONE.ReRunAt('div2') - sts = curM3P1.Input( Current ) + if sts == 0 : + print 'div2_ISONE.ReRunAt error' + break + if Current <= 0 : + break + sts = m3p1anOddInteger.Input( Current ) + if sts == 0 : + print 'm3p1anOddInteger.Input error' + break sts = m3p1InGate.InPort().Input( 1 ) + if sts == 0 : + print 'm3p1InGate.InPort error' + break GraphSyracuseC_Gate.PrintThreads() diff --git a/examples/GraphSyracuseC_Gate.xml b/examples/GraphSyracuseC_Gate.xml index 17f32df..8b87cf7 100644 --- a/examples/GraphSyracuseC_Gate.xml +++ b/examples/GraphSyracuseC_Gate.xml @@ -1,415 +1,307 @@ - - - - - + - - - ? - ? - GraphSyracuseC_Gate - 1 - ? - - GraphSyracuseC_Gate - - - long - test_ISEVEN\anInteger - - - long - test_ISONE\anInteger - - - long - m3p1\anOddInteger - - - long - incr\aCount - - - - - long - test_ISEVEN\BoolEven - - - long - test_ISONE\BoolOne - - - long - div2_ISEVEN\BoolEven - - - long - div2_ISONE\BoolOne - - - long - incr\aNewCount - - - - - - - - 11/3/2003 - 16:25:34 - 11/3/2003 - 16:25:38 - 1.04 - JR - ? - Syracuse algorithm - 0 - 0 - - - - - - SyrComponent - SyrComponent - test_ISEVEN - 0 - ? - - C_ISEVEN - - - long - anInteger - - - - - long - BoolEven - - - - - - - - 11/3/2003 - 16:25:34 - 11/3/2003 - 16:25:34 - 1.04 - ? - localhost/FactoryServer - ? - 5 - 416 - - - SyrComponent - SyrComponent - test_ISONE - 0 - ? - - C_ISONE - - - long - anInteger - - - - - long - BoolOne - - - - - - - - 11/3/2003 - 16:25:34 - 11/3/2003 - 16:25:34 - 1.04 - ? - localhost/FactoryServer - ? - 7 - 232 - - - SyrComponent - SyrComponent - m3p1 - 0 - ? - - C_M3P1 - - - long - anOddInteger - - - - - long - anEvenInteger - - - - - - - - 11/3/2003 - 16:25:34 - 11/3/2003 - 16:25:34 - 1.04 - ? - localhost/FactoryServer - ? - 180 - 417 - - - SyrComponent - SyrComponent - div2 - 0 - ? - - C_DIV2 - - - long - anEvenInteger - - - - - long - anInteger - - - - - - - - 11/3/2003 - 16:25:34 - 11/3/2003 - 16:25:34 - 1.04 - ? - localhost/FactoryServer - ? - 435 - 7 - - - SyrComponent - SyrComponent - div2_ISEVEN - 0 - ? - - C_ISEVEN - - - long - anInteger - - - - - long - BoolEven - - - - - - - - 11/3/2003 - 16:25:34 - 11/3/2003 - 16:25:34 - 1.04 - ? - localhost/FactoryServer - ? - 619 - 191 - - - SyrComponent - SyrComponent - div2_ISONE - 0 - ? - - C_ISONE - - - long - anInteger - - - - - long - BoolOne - - - - - - - - 11/3/2003 - 16:25:34 - 11/3/2003 - 16:25:34 - 1.04 - ? - localhost/FactoryServer - ? - 616 - 6 - - - SyrComponent - SyrComponent - incr - 0 - ? - - C_INCR - - - long - aCount - - - - - long - aNewCount - - - - - - - - 11/3/2003 - 16:25:35 - 11/3/2003 - 16:25:35 - 1.04 - ? - localhost/FactoryServer - ? - 434 - 193 - - - - - - test_ISEVEN - OutGate - m3p1 - InGate - - - - - m3p1 - anEvenInteger - div2 - anEvenInteger - - - 368 - 158 - - - 369 - 568 - - - - - div2 - anInteger - div2_ISONE - anInteger - - - - - div2 - anInteger - div2_ISEVEN - anInteger - - - 603 - 342 - - - 603 - 158 - - - - - - - - GraphSyracuseC_Gate - test_ISEVEN\anInteger - test_ISEVEN - anInteger - - 3 - 31 - - - - - - GraphSyracuseC_Gate - test_ISONE\anInteger - test_ISONE - anInteger - - 3 - 31 - - - - - - GraphSyracuseC_Gate - m3p1\anOddInteger - m3p1 - anOddInteger - - 3 - 31 - - - - - - GraphSyracuseC_Gate - incr\aCount - incr - aCount - - 3 - 0 - - - - - - - + + +? + ? + GraphSyracuseC_Gate + 1 + ? + +GraphSyracuseC_Gate + + +long + test_ISEVEN\anInteger + +long + test_ISONE\anInteger + +long + m3p1\anOddInteger + +long + incr\aCount + + +long + test_ISEVEN\BoolEven + +long + test_ISONE\BoolOne + +long + div2_ISEVEN\BoolEven + +long + div2_ISONE\BoolOne + +long + incr\aNewCount + + + 11/3/2003 - 16:25:34 + 11/6/2003 - 16:1:11 + 1.04 + JR + ? + Syracuse algorithm + 0 + 0 + + +SyrComponent + SyrComponent + test_ISEVEN + 0 + ? + +C_ISEVEN + + +long + anInteger + + +long + BoolEven + + + 11/6/2003 - 16:1:10 + 11/6/2003 - 16:1:10 + 1.04 + ? + localhost/FactoryServer + C_ISEVEN from SyrComponent + 5 + 416 + +SyrComponent + SyrComponent + test_ISONE + 0 + ? + +C_ISONE + + +long + anInteger + + +long + BoolOne + + + 11/6/2003 - 16:1:10 + 11/6/2003 - 16:1:10 + 1.04 + ? + localhost/FactoryServer + C_ISONE from SyrComponent + 7 + 232 + +SyrComponent + SyrComponent + m3p1 + 0 + ? + +C_M3P1 + + +long + anOddInteger + + +long + anEvenInteger + + + 11/6/2003 - 16:1:10 + 11/6/2003 - 16:1:10 + 1.04 + ? + localhost/FactoryServer + C_M3P1 from SyrComponent + 180 + 417 + +SyrComponent + SyrComponent + div2 + 0 + ? + +C_DIV2 + + +long + anEvenInteger + + +long + anInteger + + + 11/6/2003 - 16:1:10 + 11/6/2003 - 16:1:10 + 1.04 + ? + localhost/FactoryServer + C_DIV2 from SyrComponent + 435 + 7 + +SyrComponent + SyrComponent + div2_ISEVEN + 0 + ? + +C_ISEVEN + + +long + anInteger + + +long + BoolEven + + + 11/6/2003 - 16:1:11 + 11/6/2003 - 16:1:11 + 1.04 + ? + localhost/FactoryServer + C_ISEVEN from SyrComponent + 663 + 193 + +SyrComponent + SyrComponent + div2_ISONE + 0 + ? + +C_ISONE + + +long + anInteger + + +long + BoolOne + + + 11/6/2003 - 16:1:11 + 11/6/2003 - 16:1:11 + 1.04 + ? + localhost/FactoryServer + C_ISONE from SyrComponent + 651 + 6 + +SyrComponent + SyrComponent + incr + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 11/6/2003 - 16:1:11 + 11/6/2003 - 16:1:11 + 1.04 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 434 + 193 + + +test_ISEVEN + OutGate + m3p1 + InGate + + +m3p1 + anEvenInteger + div2 + anEvenInteger + + +373 + 117 + +373 + 528 + +div2 + anInteger + div2_ISONE + anInteger + + +div2 + anInteger + div2_ISEVEN + anInteger + + +626 + 302 + +626 + 116 + + +GraphSyracuseC_Gate + test_ISEVEN\anInteger + test_ISEVEN + anInteger + +3 + 31 + + +GraphSyracuseC_Gate + test_ISONE\anInteger + test_ISONE + anInteger + +3 + 31 + + +GraphSyracuseC_Gate + m3p1\anOddInteger + m3p1 + anOddInteger + +3 + 31 + + +GraphSyracuseC_Gate + incr\aCount + incr + aCount + +3 + 0 + diff --git a/examples/GraphSyracuseCpp.py b/examples/GraphSyracuseCpp.py index 8bac3a2..fba4f92 100644 --- a/examples/GraphSyracuseCpp.py +++ b/examples/GraphSyracuseCpp.py @@ -1,5 +1,26 @@ - -# Generated python file of Graph GraphSyracuseCpp +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : GraphSyracuseCpp.py +# Module : SuperVisionTest from SuperV import * # Graph creation diff --git a/examples/GraphTypesCheck.py b/examples/GraphTypesCheck.py new file mode 100755 index 0000000..034e86a --- /dev/null +++ b/examples/GraphTypesCheck.py @@ -0,0 +1,125 @@ + +# Generated python file of Graph GraphTypesCheck + +from SuperV import * +# Graph creation +GraphTypesCheck = Graph( 'GraphTypesCheck' ) +GraphTypesCheck.SetName( 'GraphTypesCheck' ) +GraphTypesCheck.SetAuthor( 'JR' ) +GraphTypesCheck.SetComment( '' ) +GraphTypesCheck.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +BoolCheck = GraphTypesCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'BoolCheck' ) +BoolCheck.SetName( 'BoolCheck' ) +BoolCheck.SetAuthor( '' ) +BoolCheck.SetContainer( 'localhost/FactoryServer' ) +BoolCheck.SetComment( 'BoolCheck from TypesCheck' ) +BoolCheck.Coords( 202 , 108 ) + +CharCheck = GraphTypesCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'CharCheck' ) +CharCheck.SetName( 'CharCheck' ) +CharCheck.SetAuthor( '' ) +CharCheck.SetContainer( 'localhost/FactoryServer' ) +CharCheck.SetComment( 'CharCheck from TypesCheck' ) +CharCheck.Coords( 13 , 166 ) + +ShortCheck = GraphTypesCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'ShortCheck' ) +ShortCheck.SetName( 'ShortCheck' ) +ShortCheck.SetAuthor( '' ) +ShortCheck.SetContainer( 'localhost/FactoryServer' ) +ShortCheck.SetComment( 'ShortCheck from TypesCheck' ) +ShortCheck.Coords( 205 , 258 ) + +FloatCheck = GraphTypesCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'FloatCheck' ) +FloatCheck.SetName( 'FloatCheck' ) +FloatCheck.SetAuthor( '' ) +FloatCheck.SetContainer( 'localhost/FactoryServer' ) +FloatCheck.SetComment( 'FloatCheck from TypesCheck' ) +FloatCheck.Coords( 204 , 409 ) + +Addition = GraphTypesCheck.FNode( 'AddComponent' , 'AddComponent' , 'Addition' ) +Addition.SetName( 'Addition' ) +Addition.SetAuthor( '' ) +Addition.SetContainer( 'localhost/FactoryServer' ) +Addition.SetComment( 'Addition from AddComponent' ) +Addition.Coords( 16 , 459 ) + +LongCheck = GraphTypesCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'LongCheck' ) +LongCheck.SetName( 'LongCheck' ) +LongCheck.SetAuthor( '' ) +LongCheck.SetContainer( 'localhost/FactoryServer' ) +LongCheck.SetComment( 'LongCheck from TypesCheck' ) +LongCheck.Coords( 17 , 318 ) + +MiscTypes = GraphTypesCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'MiscTypes' ) +MiscTypes.SetName( 'MiscTypes' ) +MiscTypes.SetAuthor( '' ) +MiscTypes.SetContainer( 'localhost/FactoryServer' ) +MiscTypes.SetComment( 'MiscTypes from TypesCheck' ) +MiscTypes.Coords( 431 , 170 ) + +StringCheck = GraphTypesCheck.FNode( 'TypesCheck' , 'TypesCheck' , 'StringCheck' ) +StringCheck.SetName( 'StringCheck' ) +StringCheck.SetAuthor( '' ) +StringCheck.SetContainer( 'localhost/FactoryServer' ) +StringCheck.SetComment( 'StringCheck from TypesCheck' ) +StringCheck.Coords( 13 , 10 ) + +# Creation of Links +BoolCheckOutBool = BoolCheck.Port( 'OutBool' ) +MiscTypesInBool = GraphTypesCheck.Link( BoolCheckOutBool , MiscTypes.Port( 'InBool' ) ) +MiscTypesInBool.AddCoord( 1 , 402 , 280 ) +MiscTypesInBool.AddCoord( 2 , 401 , 188 ) + +CharCheckOutChar = CharCheck.Port( 'OutChar' ) +MiscTypesInChar = GraphTypesCheck.Link( CharCheckOutChar , MiscTypes.Port( 'InChar' ) ) +MiscTypesInChar.AddCoord( 1 , 382 , 307 ) +MiscTypesInChar.AddCoord( 2 , 382 , 247 ) + +ShortCheckOutShort = ShortCheck.Port( 'OutShort' ) +MiscTypesInShort = GraphTypesCheck.Link( ShortCheckOutShort , MiscTypes.Port( 'InShort' ) ) + +FloatCheckOutFloat = FloatCheck.Port( 'OutFloat' ) +MiscTypesInFloat = GraphTypesCheck.Link( FloatCheckOutFloat , MiscTypes.Port( 'InFloat' ) ) +MiscTypesInFloat.AddCoord( 1 , 400 , 395 ) +MiscTypesInFloat.AddCoord( 2 , 399 , 490 ) + +AdditionAdder = Addition.Port( 'Adder' ) +MiscTypesInObjRef = GraphTypesCheck.Link( AdditionAdder , MiscTypes.Port( 'InObjRef' ) ) +MiscTypesInObjRef.AddCoord( 1 , 415 , 453 ) +MiscTypesInObjRef.AddCoord( 2 , 415 , 540 ) + +LongCheckOutLong = LongCheck.Port( 'OutLong' ) +MiscTypesInLong = GraphTypesCheck.Link( LongCheckOutLong , MiscTypes.Port( 'InLong' ) ) +MiscTypesInLong.AddCoord( 1 , 383 , 367 ) +MiscTypesInLong.AddCoord( 2 , 383 , 399 ) + +StringCheckOutString = StringCheck.Port( 'OutString' ) +MiscTypesInString = GraphTypesCheck.Link( StringCheckOutString , MiscTypes.Port( 'InString' ) ) +MiscTypesInString.AddCoord( 1 , 412 , 251 ) +MiscTypesInString.AddCoord( 2 , 411 , 91 ) + +# Creation of Input datas +BoolCheckInBool = BoolCheck.Input( 'InBool' , 1) +CharCheckInChar = CharCheck.Input( 'InChar' , 255) +ShortCheckInShort = ShortCheck.Input( 'InShort' , 16383) +FloatCheckInFloat = FloatCheck.Input( 'InFloat' , 3.14159) +LongCheckInLong = LongCheck.Input( 'InLong' , 2147483647) +MiscTypesInDouble = MiscTypes.Input( 'InDouble' , 3.14159) +StringCheckInString = StringCheck.Input( 'InString' , 'aString') + +# Creation of Output variables +MiscTypesOutString = MiscTypes.Port( 'OutString' ) +MiscTypesOutBool = MiscTypes.Port( 'OutBool' ) +MiscTypesOutChar = MiscTypes.Port( 'OutChar' ) +MiscTypesOutShort = MiscTypes.Port( 'OutShort' ) +MiscTypesOutLong = MiscTypes.Port( 'OutLong' ) +MiscTypesOutFloat = MiscTypes.Port( 'OutFloat' ) +MiscTypesOutDouble = MiscTypes.Port( 'OutDouble' ) +MiscTypesOutObjRef = MiscTypes.Port( 'OutObjRef' ) + +GraphTypesCheck.Run() +GraphTypesCheck.DoneW() +GraphTypesCheck.PrintPorts() diff --git a/examples/GraphTypesCheck.xml b/examples/GraphTypesCheck.xml new file mode 100755 index 0000000..bcb67c9 --- /dev/null +++ b/examples/GraphTypesCheck.xml @@ -0,0 +1,459 @@ + + + + +? + ? + GraphTypesCheck + 1 + ? + +GraphTypesCheck + + +boolean + BoolCheck\InBool + +char + CharCheck\InChar + +short + ShortCheck\InShort + +float + FloatCheck\InFloat + +long + LongCheck\InLong + +double + MiscTypes\InDouble + +string + StringCheck\InString + + +string + MiscTypes\OutString + +boolean + MiscTypes\OutBool + +char + MiscTypes\OutChar + +short + MiscTypes\OutShort + +long + MiscTypes\OutLong + +float + MiscTypes\OutFloat + +double + MiscTypes\OutDouble + +SuperVisionTest::Adder + MiscTypes\OutObjRef + + + 11/9/2003 - 10:53:21 + 11/9/2003 - 14:45:54 + 1.05 + JR + ? + ? + 0 + 0 + + +TypesCheck + TypesCheck + BoolCheck + 0 + ? + +BoolCheck + + +boolean + InBool + + +boolean + OutBool + + + 11/9/2003 - 14:45:53 + 11/9/2003 - 14:45:53 + 1.05 + ? + localhost/FactoryServer + BoolCheck from TypesCheck + 202 + 108 + +TypesCheck + TypesCheck + CharCheck + 0 + ? + +CharCheck + + +char + InChar + + +char + OutChar + + + 11/9/2003 - 14:45:53 + 11/9/2003 - 14:45:53 + 1.05 + ? + localhost/FactoryServer + CharCheck from TypesCheck + 13 + 166 + +TypesCheck + TypesCheck + ShortCheck + 0 + ? + +ShortCheck + + +short + InShort + + +short + OutShort + + + 11/9/2003 - 14:45:53 + 11/9/2003 - 14:45:53 + 1.05 + ? + localhost/FactoryServer + ShortCheck from TypesCheck + 205 + 258 + +TypesCheck + TypesCheck + FloatCheck + 0 + ? + +FloatCheck + + +float + InFloat + + +float + OutFloat + + + 11/9/2003 - 14:45:53 + 11/9/2003 - 14:45:53 + 1.05 + ? + localhost/FactoryServer + FloatCheck from TypesCheck + 204 + 409 + +AddComponent + AddComponent + Addition + 0 + ? + +Addition + + + +objref + Adder + + + 11/9/2003 - 14:45:53 + 11/9/2003 - 14:45:53 + 1.05 + ? + localhost/FactoryServer + Addition from AddComponent + 16 + 459 + +TypesCheck + TypesCheck + LongCheck + 0 + ? + +LongCheck + + +long + InLong + + +long + OutLong + + + 11/9/2003 - 14:45:53 + 11/9/2003 - 14:45:53 + 1.05 + ? + localhost/FactoryServer + LongCheck from TypesCheck + 17 + 318 + +TypesCheck + TypesCheck + MiscTypes + 0 + ? + +MiscTypes + + +string + InString + +boolean + InBool + +char + InChar + +short + InShort + +long + InLong + +float + InFloat + +double + InDouble + +SuperVisionTest::Adder + InObjRef + + +string + OutString + +boolean + OutBool + +char + OutChar + +short + OutShort + +long + OutLong + +float + OutFloat + +double + OutDouble + +SuperVisionTest::Adder + OutObjRef + + + 11/9/2003 - 14:45:53 + 11/9/2003 - 14:45:53 + 1.05 + ? + localhost/FactoryServer + MiscTypes from TypesCheck + 431 + 170 + +TypesCheck + TypesCheck + StringCheck + 0 + ? + +StringCheck + + +string + InString + + +string + OutString + + + 11/9/2003 - 14:45:53 + 11/9/2003 - 14:45:53 + 1.05 + ? + localhost/FactoryServer + StringCheck from TypesCheck + 13 + 10 + + +BoolCheck + OutBool + MiscTypes + InBool + + +402 + 280 + +401 + 188 + +CharCheck + OutChar + MiscTypes + InChar + + +382 + 307 + +382 + 247 + +ShortCheck + OutShort + MiscTypes + InShort + + +FloatCheck + OutFloat + MiscTypes + InFloat + + +400 + 395 + +399 + 490 + +Addition + Adder + MiscTypes + InObjRef + + +415 + 453 + +415 + 540 + +LongCheck + OutLong + MiscTypes + InLong + + +383 + 367 + +383 + 399 + +StringCheck + OutString + MiscTypes + InString + + +412 + 251 + +411 + 91 + + +GraphTypesCheck + BoolCheck\InBool + BoolCheck + InBool + +3 + 1 + + +GraphTypesCheck + CharCheck\InChar + CharCheck + InChar + +3 + 255 + + +GraphTypesCheck + ShortCheck\InShort + ShortCheck + InShort + +3 + 16383 + + +GraphTypesCheck + FloatCheck\InFloat + FloatCheck + InFloat + +7 + 3.14159 + + +GraphTypesCheck + LongCheck\InLong + LongCheck + InLong + +3 + 2147483647 + + +GraphTypesCheck + MiscTypes\InDouble + MiscTypes + InDouble + +7 + 3.14159 + + +GraphTypesCheck + StringCheck\InString + StringCheck + InString + +18 + aString + diff --git a/examples/GraphUnValid.py b/examples/GraphUnValid.py new file mode 100755 index 0000000..0c113e9 --- /dev/null +++ b/examples/GraphUnValid.py @@ -0,0 +1,86 @@ + +# Generated python file of Graph GraphEssai + +from SuperV import * +# Graph creation +GraphUnValid = Graph( 'GraphUnValid' ) +GraphUnValid.SetName( 'GraphUnValid' ) +GraphUnValid.SetAuthor( '' ) +GraphUnValid.SetComment( '' ) +GraphUnValid.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +Add = GraphUnValid.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) +Add.SetName( 'Add' ) +Add.SetAuthor( '' ) +Add.SetContainer( 'FactoryServer' ) +Add.SetComment( 'Add from AddComponent' ) +Add.Coords( 8 , 62 ) + +Sub = GraphUnValid.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) +Sub.SetName( 'Sub' ) +Sub.SetAuthor( '' ) +Sub.SetContainer( 'FactoryServer' ) +Sub.SetComment( 'Sub from SubComponent' ) +Sub.Coords( 203 , 4 ) + +Mul = GraphUnValid.FNode( 'MulComponent' , 'MulComponent' , 'Mul' ) +Mul.SetName( 'Mul' ) +Mul.SetAuthor( '' ) +Mul.SetContainer( 'FactoryServer' ) +Mul.SetComment( 'Mul from MulComponent' ) +Mul.Coords( 390 , 62 ) + +Div = GraphUnValid.FNode( 'DivComponent' , 'DivComponent' , 'Div' ) +Div.SetName( 'Div' ) +Div.SetAuthor( '' ) +Div.SetContainer( 'FactoryServer' ) +Div.SetComment( 'Div from DivComponent' ) +Div.Coords( 575 , 11 ) + +# Creation of Links +Addz = Add.Port( 'z' ) +Muly = GraphUnValid.Link( Addz , Mul.Port( 'y' ) ) + +Suby = GraphUnValid.Link( Addz , Sub.Port( 'y' ) ) +Suby.AddCoord( 1 , 182 , 113 ) +Suby.AddCoord( 2 , 183 , 170 ) + +Subz = Sub.Port( 'z' ) +Divx = GraphUnValid.Link( Subz , Div.Port( 'x' ) ) +Divx.AddCoord( 1 , 566 , 91 ) +Divx.AddCoord( 2 , 566 , 49 ) +Divx.AddCoord( 3 , 380 , 49 ) +Divx.AddCoord( 4 , 379 , 84 ) + +Mulx = GraphUnValid.Link( Subz , Mul.Port( 'x' ) ) +Mulx.AddCoord( 1 , 379 , 141 ) +Mulx.AddCoord( 2 , 378 , 85 ) + +Mulz = Mul.Port( 'z' ) +Divy = GraphUnValid.Link( Mulz , Div.Port( 'y' ) ) +Divy.AddCoord( 1 , 565 , 120 ) +Divy.AddCoord( 2 , 565 , 141 ) + +Subx = GraphUnValid.Link( Mulz , Sub.Port( 'x' ) ) +Subx.AddCoord( 1 , 194 , 84 ) +Subx.AddCoord( 2 , 195 , 252 ) +Subx.AddCoord( 3 , 566 , 252 ) +Subx.AddCoord( 4 , 565 , 141 ) + +# Creation of Output variables +AddFuncValue = Add.Port( 'FuncValue' ) +Divz = Div.Port( 'z' ) + +GraphInLinesUnValid.IsValid() + +# Creation of Output variables +GraphUnValid.Run() + +GraphUnValid.IsDone() + +GraphUnValid.State() + +GraphUnValid.PrintPorts() + diff --git a/examples/GraphUnValid.xml b/examples/GraphUnValid.xml new file mode 100755 index 0000000..243fc6f --- /dev/null +++ b/examples/GraphUnValid.xml @@ -0,0 +1,253 @@ + + + + +? + ? + GraphEssai + 1 + ? + +GraphEssai + + +double + Add\x + +double + Add\y + + +double + Add\FuncValue + +double + Div\z + + + 11/3/2003 - 9:58:58 + 8/8/2003 - 15:33:21 + 1.04 + ? + ? + ? + 0 + 0 + + +AddComponent + AddComponent + Add + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 8/8/2003 - 15:32:31 + 8/8/2003 - 15:32:31 + 1.04 + ? + FactoryServer + Add from AddComponent + 8 + 62 + +SubComponent + SubComponent + Sub + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 8/8/2003 - 15:32:31 + 8/8/2003 - 15:32:31 + 1.04 + ? + FactoryServer + Sub from SubComponent + 203 + 4 + +MulComponent + MulComponent + Mul + 0 + ? + +Mul + + +double + x + +double + y + + +double + z + + + 8/8/2003 - 15:32:31 + 8/8/2003 - 15:32:31 + 1.04 + ? + FactoryServer + Mul from MulComponent + 390 + 62 + +DivComponent + DivComponent + Div + 0 + ? + +Div + + +double + x + +double + y + + +double + z + + + 8/8/2003 - 15:32:31 + 8/8/2003 - 15:32:31 + 1.04 + ? + FactoryServer + Div from DivComponent + 575 + 11 + + +Add + z + Mul + y + + +Add + z + Sub + y + + +182 + 113 + +183 + 170 + +Sub + z + Div + x + + +566 + 91 + +566 + 49 + +380 + 49 + +379 + 84 + +Sub + z + Mul + x + + +379 + 141 + +378 + 85 + +Mul + z + Div + y + + +565 + 120 + +565 + 141 + +Mul + z + Sub + x + + +194 + 84 + +195 + 252 + +566 + 252 + +565 + 141 + + +GraphEssai + Add\x + Add + x + +3 + 3 + + +GraphEssai + Add\y + Add + y + +7 + 4.5 + diff --git a/examples/Graphs.py b/examples/Graphs.py index 0791216..a961ca5 100644 --- a/examples/Graphs.py +++ b/examples/Graphs.py @@ -4,68 +4,108 @@ from SuperV import * # Graph creation Graphs = Graph( 'Graphs' ) +Graphs.SetName( 'Graphs' ) Graphs.SetAuthor( '' ) Graphs.SetComment( '' ) Graphs.Coords( 0 , 0 ) -# Creation of Nodes -Add = Graphs.Node( 'AddComponent' , 'AddComponent' , 'Add' ) +# Creation of Factory Nodes + +Add = Graphs.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) +Add.SetName( 'Add' ) Add.SetAuthor( '' ) Add.SetContainer( 'localhost/FactoryServer' ) -Add.SetComment( '' ) -Add.Coords( 32 , 26 ) -Sub = Graphs.Node( 'SubComponent' , 'SubComponent' , 'Sub' ) +Add.SetComment( 'Add from AddComponent' ) +Add.Coords( 30 , 8 ) + +Sub = Graphs.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) +Sub.SetName( 'Sub' ) Sub.SetAuthor( '' ) Sub.SetContainer( 'localhost/FactoryServer' ) -Sub.SetComment( '' ) +Sub.SetComment( 'Sub from SubComponent' ) Sub.Coords( 241 , 38 ) -Mul = Graphs.Node( 'MulComponent' , 'MulComponent' , 'Mul' ) + +Mul = Graphs.FNode( 'MulComponent' , 'MulComponent' , 'Mul' ) +Mul.SetName( 'Mul' ) Mul.SetAuthor( '' ) Mul.SetContainer( 'localhost/FactoryServer' ) -Mul.SetComment( '' ) -Mul.Coords( 445 , 0 ) -Div = Graphs.Node( 'DivComponent' , 'DivComponent' , 'Div' ) +Mul.SetComment( 'Mul from MulComponent' ) +Mul.Coords( 439 , 39 ) + +Div = Graphs.FNode( 'DivComponent' , 'DivComponent' , 'Div' ) +Div.SetName( 'Div' ) Div.SetAuthor( '' ) Div.SetContainer( 'localhost/FactoryServer' ) -Div.SetComment( '' ) -Div.Coords( 624 , 0 ) -Add_1 = Graphs.Node( 'AddComponent' , 'AddComponent' , 'Add' ) +Div.SetComment( 'Div from DivComponent' ) +Div.Coords( 633 , 120 ) + +Add_1 = Graphs.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) +Add_1.SetName( 'Add_1' ) Add_1.SetAuthor( '' ) Add_1.SetContainer( 'localhost/FactoryServer' ) -Add_1.SetComment( '' ) +Add_1.SetComment( 'Add from AddComponent' ) Add_1.Coords( 13 , 297 ) -Sub_1 = Graphs.Node( 'SubComponent' , 'SubComponent' , 'Sub' ) + +Sub_1 = Graphs.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) +Sub_1.SetName( 'Sub_1' ) Sub_1.SetAuthor( '' ) Sub_1.SetContainer( 'localhost/FactoryServer' ) -Sub_1.SetComment( '' ) +Sub_1.SetComment( 'Sub from SubComponent' ) Sub_1.Coords( 235 , 217 ) -Mul_1 = Graphs.Node( 'MulComponent' , 'MulComponent' , 'Mul' ) + +Mul_1 = Graphs.FNode( 'MulComponent' , 'MulComponent' , 'Mul' ) +Mul_1.SetName( 'Mul_1' ) Mul_1.SetAuthor( '' ) Mul_1.SetContainer( 'localhost/FactoryServer' ) -Mul_1.SetComment( '' ) -Mul_1.Coords( 423 , 303 ) -Div_1 = Graphs.Node( 'DivComponent' , 'DivComponent' , 'Div' ) +Mul_1.SetComment( 'Mul from MulComponent' ) +Mul_1.Coords( 423 , 375 ) + +Div_1 = Graphs.FNode( 'DivComponent' , 'DivComponent' , 'Div' ) +Div_1.SetName( 'Div_1' ) Div_1.SetAuthor( '' ) Div_1.SetContainer( 'localhost/FactoryServer' ) -Div_1.SetComment( '' ) -Div_1.Coords( 618 , 297 ) +Div_1.SetComment( 'Div from DivComponent' ) +Div_1.Coords( 630 , 284 ) -# Creation of intermediate Output variables and of links +# Creation of Links Addz = Add.Port( 'z' ) Subx = Graphs.Link( Addz , Sub.Port( 'x' ) ) + Subz = Sub.Port( 'z' ) -Mulx = Graphs.Link( Subz , Mul.Port( 'x' ) ) Divx = Graphs.Link( Subz , Div.Port( 'x' ) ) +Divx.AddCoord( 1 , 426 , 201 ) +Divx.AddCoord( 2 , 425 , 119 ) + +Mulx = Graphs.Link( Subz , Mul.Port( 'x' ) ) + Mulz = Mul.Port( 'z' ) Divy = Graphs.Link( Mulz , Div.Port( 'y' ) ) +Divy.AddCoord( 1 , 619 , 230 ) +Divy.AddCoord( 2 , 620 , 120 ) + Add_1FuncValue = Add_1.Port( 'FuncValue' ) Mul_1x = Graphs.Link( Add_1FuncValue , Mul_1.Port( 'x' ) ) +Mul_1x.AddCoord( 1 , 396 , 455 ) +Mul_1x.AddCoord( 2 , 395 , 378 ) + +Sub_1x = Graphs.Link( Add_1FuncValue , Sub_1.Port( 'x' ) ) +Sub_1x.AddCoord( 1 , 215 , 297 ) +Sub_1x.AddCoord( 2 , 215 , 378 ) + Add_1z = Add_1.Port( 'z' ) -Sub_1x = Graphs.Link( Add_1z , Sub_1.Port( 'x' ) ) +Sub_1y = Graphs.Link( Add_1z , Sub_1.Port( 'y' ) ) +Sub_1y.AddCoord( 1 , 197 , 327 ) +Sub_1y.AddCoord( 2 , 196 , 406 ) + Sub_1z = Sub_1.Port( 'z' ) Div_1x = Graphs.Link( Sub_1z , Div_1.Port( 'x' ) ) +Div_1x.AddCoord( 1 , 604 , 364 ) +Div_1x.AddCoord( 2 , 603 , 297 ) + Mul_1z = Mul_1.Port( 'z' ) Div_1y = Graphs.Link( Mul_1z , Div_1.Port( 'y' ) ) +Div_1y.AddCoord( 1 , 610 , 394 ) +Div_1y.AddCoord( 2 , 610 , 455 ) # Creation of Input datas Addx = Add.Input( 'x' , 3) @@ -74,11 +114,8 @@ Suby = Sub.Input( 'y' , 7) Muly = Mul.Input( 'y' , 11) Add_1x = Add_1.Input( 'x' , 1) Add_1y = Add_1.Input( 'y' , 2) -Sub_1y = Sub_1.Input( 'y' , 3) Mul_1y = Mul_1.Input( 'y' , 4) -# Missing Input datas - # Creation of Output variables AddFuncValue = Add.Port( 'FuncValue' ) Divz = Div.Port( 'z' ) diff --git a/examples/Graphs.xml b/examples/Graphs.xml index 33bed41..7c24b20 100644 --- a/examples/Graphs.xml +++ b/examples/Graphs.xml @@ -1,561 +1,453 @@ - - - - - + - - - ? - ? - Graphs - 1 - ? - - Graphs - - - double - Add\x - - - double - Add\y - - - double - Sub\y - - - double - Mul\y - - - double - Add_1\x - - - double - Add_1\y - - - double - Sub_1\y - - - double - Mul_1\y - - - - - double - Add\FuncValue - - - double - Div\z - - - double - Div_1\z - - - - - - - - 11/3/2003 - 15:3:57 - 11/3/2003 - 15:3:57 - 1.04 - ? - ? - ? - 0 - 0 - - - - - - AddComponent - AddComponent - Add - 0 - ? - - Add - - - double - x - - - double - y - - - - - double - FuncValue - - - double - z - - - - - - - - 11/3/2003 - 15:3:57 - 11/3/2003 - 15:3:57 - 1.04 - ? - localhost/FactoryServer - ? - 32 - 26 - - - SubComponent - SubComponent - Sub - 0 - ? - - Sub - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 15:3:57 - 11/3/2003 - 15:3:57 - 1.04 - ? - localhost/FactoryServer - ? - 241 - 38 - - - MulComponent - MulComponent - Mul - 0 - ? - - Mul - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 15:3:57 - 11/3/2003 - 15:3:57 - 1.04 - ? - localhost/FactoryServer - ? - 445 - 0 - - - DivComponent - DivComponent - Div - 0 - ? - - Div - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 15:3:57 - 11/3/2003 - 15:3:57 - 1.04 - ? - localhost/FactoryServer - ? - 624 - 0 - - - AddComponent - AddComponent - Add_1 - 0 - ? - - Add - - - double - x - - - double - y - - - - - double - FuncValue - - - double - z - - - - - - - - 11/3/2003 - 15:3:57 - 11/3/2003 - 15:3:57 - 1.04 - ? - localhost/FactoryServer - ? - 13 - 297 - - - SubComponent - SubComponent - Sub_1 - 0 - ? - - Sub - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 15:3:57 - 11/3/2003 - 15:3:57 - 1.04 - ? - localhost/FactoryServer - ? - 235 - 217 - - - MulComponent - MulComponent - Mul_1 - 0 - ? - - Mul - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 15:3:57 - 11/3/2003 - 15:3:57 - 1.04 - ? - localhost/FactoryServer - ? - 423 - 303 - - - DivComponent - DivComponent - Div_1 - 0 - ? - - Div - - - double - x - - - double - y - - - - - double - z - - - - - - - - 11/3/2003 - 15:3:57 - 11/3/2003 - 15:3:57 - 1.04 - ? - localhost/FactoryServer - ? - 618 - 297 - - - - - - Add - z - Sub - x - - - - - Sub - z - Mul - x - - - - - Sub - z - Div - x - - - - - Mul - z - Div - y - - - - - Add_1 - FuncValue - Mul_1 - x - - - - - Add_1 - z - Sub_1 - x - - - - - Sub_1 - z - Div_1 - x - - - - - Mul_1 - z - Div_1 - y - - - - - - - - Graphs - Add\x - Add - x - - 3 - 3 - - - - - - Graphs - Add\y - Add - y - - 3 - 5 - - - - - - Graphs - Sub\y - Sub - y - - 3 - 7 - - - - - - Graphs - Mul\y - Mul - y - - 3 - 11 - - - - - - Graphs - Add_1\x - Add_1 - x - - 3 - 1 - - - - - - Graphs - Add_1\y - Add_1 - y - - 3 - 2 - - - - - - Graphs - Sub_1\y - Sub_1 - y - - 3 - 3 - - - - - - Graphs - Mul_1\y - Mul_1 - y - - 3 - 4 - - - - - - - + + +? + ? + Graphs + 1 + ? + +Graphs + + +double + Add\x + +double + Add\y + +double + Sub\y + +double + Mul\y + +double + Add_1\x + +double + Add_1\y + +double + Mul_1\y + + +double + Add\FuncValue + +double + Div\z + +double + Div_1\z + + + 11/3/2003 - 15:3:57 + 19/9/2003 - 15:18:32 + 1.04 + ? + ? + ? + 0 + 0 + + +AddComponent + AddComponent + Add + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 19/9/2003 - 15:18:1 + 19/9/2003 - 15:18:1 + 1.04 + ? + localhost/FactoryServer + Add from AddComponent + 30 + 8 + +SubComponent + SubComponent + Sub + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 19/9/2003 - 15:18:1 + 19/9/2003 - 15:18:1 + 1.04 + ? + localhost/FactoryServer + Sub from SubComponent + 241 + 38 + +MulComponent + MulComponent + Mul + 0 + ? + +Mul + + +double + x + +double + y + + +double + z + + + 19/9/2003 - 15:18:1 + 19/9/2003 - 15:18:1 + 1.04 + ? + localhost/FactoryServer + Mul from MulComponent + 439 + 39 + +DivComponent + DivComponent + Div + 0 + ? + +Div + + +double + x + +double + y + + +double + z + + + 19/9/2003 - 15:18:1 + 19/9/2003 - 15:18:1 + 1.04 + ? + localhost/FactoryServer + Div from DivComponent + 633 + 120 + +AddComponent + AddComponent + Add_1 + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 19/9/2003 - 15:18:1 + 19/9/2003 - 15:18:1 + 1.04 + ? + localhost/FactoryServer + Add from AddComponent + 13 + 297 + +SubComponent + SubComponent + Sub_1 + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 19/9/2003 - 15:18:1 + 19/9/2003 - 15:18:1 + 1.04 + ? + localhost/FactoryServer + Sub from SubComponent + 235 + 217 + +MulComponent + MulComponent + Mul_1 + 0 + ? + +Mul + + +double + x + +double + y + + +double + z + + + 19/9/2003 - 15:18:1 + 19/9/2003 - 15:18:1 + 1.04 + ? + localhost/FactoryServer + Mul from MulComponent + 423 + 375 + +DivComponent + DivComponent + Div_1 + 0 + ? + +Div + + +double + x + +double + y + + +double + z + + + 19/9/2003 - 15:18:1 + 19/9/2003 - 15:18:1 + 1.04 + ? + localhost/FactoryServer + Div from DivComponent + 630 + 284 + + +Add + z + Sub + x + + +Sub + z + Div + x + + +426 + 201 + +425 + 119 + +Sub + z + Mul + x + + +Mul + z + Div + y + + +619 + 230 + +620 + 120 + +Add_1 + FuncValue + Mul_1 + x + + +396 + 455 + +395 + 378 + +Add_1 + FuncValue + Sub_1 + x + + +215 + 297 + +215 + 378 + +Add_1 + z + Sub_1 + y + + +197 + 327 + +196 + 406 + +Sub_1 + z + Div_1 + x + + +604 + 364 + +603 + 297 + +Mul_1 + z + Div_1 + y + + +610 + 394 + +610 + 455 + + +Graphs + Add\x + Add + x + +7 + 3 + + +Graphs + Add\y + Add + y + +7 + 5 + + +Graphs + Sub\y + Sub + y + +7 + 7 + + +Graphs + Mul\y + Mul + y + +7 + 11 + + +Graphs + Add_1\x + Add_1 + x + +7 + 1 + + +Graphs + Add_1\y + Add_1 + y + +7 + 2 + + +Graphs + Mul_1\y + Mul_1 + y + +7 + 4 + diff --git a/examples/Loop.xml b/examples/Loop.xml new file mode 100755 index 0000000..10776dd --- /dev/null +++ b/examples/Loop.xml @@ -0,0 +1,306 @@ + + + + +? + ? + test_superv_basic_loop + 1 + ? + +test_superv_basic_loop + + +long + fori\index + +long + fori\min + +long + fori\max + +long + fori\sum + + +long + Add\incr + +long + Endfori\index + +long + Endfori\min + +long + Endfori\max + +long + Endfori\sum + + + 2/5/2003 - 13:43:38 + 2/12/2003 - 9:26:10 + 1.04 + ? + ? + ? + 0 + 0 + + +? + ? + Add + 3 + ? + +Add + + +long + sum + +long + incr + + +long + Sum + +long + incr + + + +Sum + + + + 2/12/2003 - 9:26:10 + 2/12/2003 - 9:26:10 + 1.04 + ? + ? + Python function + 220 + 40 + +? + ? + fori + 4 + Endfori + +fori + + +long + index + +long + min + +long + max + +long + sum + + +long + index + +long + min + +long + max + +long + sum + + + +Init + + min : ]]> + + + + + + +More + + + index : ]]> + + + + +Next + + + + + 2/12/2003 - 9:26:10 + 2/12/2003 - 9:26:10 + 1.04 + ? + ? + ? + 12 + 0 + +? + ? + Endfori + 5 + fori + +Endfori + + +long + index + +long + min + +long + max + +long + sum + + +long + index + +long + min + +long + max + +long + sum + + + +? + + 2/12/2003 - 9:26:10 + 2/12/2003 - 9:26:10 + 1.04 + ? + ? + ? + 432 + 0 + + +Add + Sum + Endfori + sum + + +fori + DoLoop + Endfori + DoLoop + + +fori + index + Endfori + index + + +fori + index + Add + incr + + +186 + 150 + +187 + 34 + +fori + min + Endfori + min + + +fori + max + Endfori + max + + +fori + sum + Add + sum + + +Endfori + DoLoop + fori + InitLoop + + +8 + 215 + +7 + 5 + +747 + 5 + +748 + 214 + + +test_superv_basic_loop + fori\index + fori + index + +3 + 0 + + +test_superv_basic_loop + fori\min + fori + min + +3 + 0 + + +test_superv_basic_loop + fori\max + fori + max + +3 + 1001 + + +test_superv_basic_loop + fori\sum + fori + sum + +3 + 0 + diff --git a/examples/NewGraphEssai.py b/examples/NewGraphEssai.py index fdb68f6..4a10f26 100644 --- a/examples/NewGraphEssai.py +++ b/examples/NewGraphEssai.py @@ -3,65 +3,94 @@ from SuperV import * # Graph creation -GraphEssai = Graph( 'GraphEssai' ) -print GraphEssai.SetAuthor( '' ) -print GraphEssai.SetComment( '' ) -GraphEssai.Coords( 0 , 0 ) - -# Creation of Nodes -Sub = GraphEssai.Node( 'SubComponent' , 'SubComponent' , 'Sub' ) -print Sub.SetAuthor( '' ) -print Sub.SetContainer( 'SubDivServer' ) -print Sub.SetComment( '' ) -Sub.Coords( 379 , 41 ) -Mul = GraphEssai.Node( 'MulComponent' , 'MulComponent' , 'Mul' ) -print Mul.SetAuthor( '' ) -print Mul.SetContainer( 'MulServer' ) -print Mul.SetComment( '' ) -Mul.Coords( 553 , 275 ) -Div = GraphEssai.Node( 'DivComponent' , 'DivComponent' , 'Div' ) -print Div.SetAuthor( '' ) -print Div.SetContainer( 'SubDivServer' ) -print Div.SetComment( '' ) -Div.Coords( 608 , 42 ) -Addition = GraphEssai.Node( 'AddComponent' , 'AddComponent' , 'Addition' ) -print Addition.SetAuthor( '' ) -print Addition.SetContainer( 'localhost/AddServer' ) -print Addition.SetComment( '' ) -Addition.Coords( 14 , 270 ) -Add = GraphEssai.Node( 'AddComponent' , 'Adder' , 'Add' ) -print Add.SetAuthor( '' ) -print Add.SetContainer( 'localhost/AddServer' ) -print Add.SetComment( '' ) -Add.Coords( 204 , 237 ) - -# Creation of intermediate Output variables and of links +NewGraphEssai = Graph( 'NewGraphEssai' ) +NewGraphEssai.SetName( 'NewGraphEssai' ) +NewGraphEssai.SetAuthor( '' ) +NewGraphEssai.SetComment( '' ) +NewGraphEssai.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +Sub = NewGraphEssai.FNode( 'SubComponent' , 'SubComponent' , 'Sub' ) +Sub.SetName( 'Sub' ) +Sub.SetAuthor( '' ) +Sub.SetContainer( 'SubDivServer' ) +Sub.SetComment( 'Sub from SubComponent' ) +Sub.Coords( 413 , 74 ) + +Mul = NewGraphEssai.FNode( 'MulComponent' , 'MulComponent' , 'Mul' ) +Mul.SetName( 'Mul' ) +Mul.SetAuthor( '' ) +Mul.SetContainer( 'MulServer' ) +Mul.SetComment( 'Mul from MulComponent' ) +Mul.Coords( 617 , 268 ) + +Div = NewGraphEssai.FNode( 'DivComponent' , 'DivComponent' , 'Div' ) +Div.SetName( 'Div' ) +Div.SetAuthor( '' ) +Div.SetContainer( 'SubDivServer' ) +Div.SetComment( 'Div from DivComponent' ) +Div.Coords( 823 , 74 ) + +Addition = NewGraphEssai.FNode( 'AddComponent' , 'AddComponent' , 'Addition' ) +Addition.SetName( 'Addition' ) +Addition.SetAuthor( '' ) +Addition.SetContainer( 'localhost/AddServer' ) +Addition.SetComment( 'Addition from AddComponent' ) +Addition.Coords( 11 , 268 ) + +# Creation of Computing Nodes +Add_ServiceinParameter = [] +Add_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'Adder' , 'Adder' ) ) +Add_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'x' ) ) +Add_ServiceinParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'y' ) ) +Add_ServiceoutParameter = [] +Add_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'FuncValue' ) ) +Add_ServiceoutParameter.append( SALOME_ModuleCatalog.ServicesParameter( 'double' , 'z' ) ) +Add_Service = SALOME_ModuleCatalog.Service( 'Add' , Add_ServiceinParameter , Add_ServiceoutParameter , 0 ) +Add = NewGraphEssai.CNode( Add_Service ) +Add.SetName( 'Add' ) +Add.SetAuthor( '' ) +Add.SetComment( 'Compute Node' ) +Add.Coords( 215 , 268 ) + +# Creation of Links Subz = Sub.Port( 'z' ) -Mulx = GraphEssai.Link( Subz , Mul.Port( 'x' ) ) -Divx = GraphEssai.Link( Subz , Div.Port( 'x' ) ) +Divx = NewGraphEssai.Link( Subz , Div.Port( 'x' ) ) + +Mulx = NewGraphEssai.Link( Subz , Mul.Port( 'x' ) ) +Mulx.AddCoord( 1 , 595 , 348 ) +Mulx.AddCoord( 2 , 595 , 154 ) + Mulz = Mul.Port( 'z' ) -Divy = GraphEssai.Link( Mulz , Div.Port( 'y' ) ) +Divy = NewGraphEssai.Link( Mulz , Div.Port( 'y' ) ) +Divy.AddCoord( 1 , 805 , 183 ) +Divy.AddCoord( 2 , 806 , 348 ) + AdditionAdder = Addition.Port( 'Adder' ) -AddAdder = GraphEssai.Link( AdditionAdder , Add.Port( 'Adder' ) ) +AddAdder = NewGraphEssai.Link( AdditionAdder , Add.Port( 'Adder' ) ) + AddFuncValue = Add.Port( 'FuncValue' ) -Suby = GraphEssai.Link( AddFuncValue , Sub.Port( 'y' ) ) +Suby = NewGraphEssai.Link( AddFuncValue , Sub.Port( 'y' ) ) +Suby.AddCoord( 1 , 395 , 183 ) +Suby.AddCoord( 2 , 395 , 349 ) + Addz = Add.Port( 'z' ) -Muly = GraphEssai.Link( Addz , Mul.Port( 'y' ) ) +Muly = NewGraphEssai.Link( Addz , Mul.Port( 'y' ) ) # Creation of Input datas Subx = Sub.Input( 'x' , 4.5) Addx = Add.Input( 'x' , 1.5) Addy = Add.Input( 'y' , 3) -# Missing Input datas - # Creation of Output variables Divz = Div.Port( 'z' ) -GraphEssai.Run() +NewGraphEssai.Run() + +NewGraphEssai.DoneW() -GraphEssai.DoneW() +NewGraphEssai.State() -GraphEssai.State() +NewGraphEssai.PrintPorts() -GraphEssai.PrintPorts() diff --git a/examples/NewGraphEssai.xml b/examples/NewGraphEssai.xml index 4cf7c28..8659695 100644 --- a/examples/NewGraphEssai.xml +++ b/examples/NewGraphEssai.xml @@ -1,305 +1,264 @@ - - - - - + - - - GraphEssai - ? - GraphEssai - 1 - - GraphEssai - - - double - Sub\x - - - double - Add\x - - - double - Add\y - - - - - double - Div\z - - - - 21/11/2001 - 17:17:23 - 27/3/2002 - 9:20:10 - 1.00 - ? - SuperVisionContainer - ? - 0 - 0 - - - - - - SubComponent - SubComponent - Sub - 0 - - Sub - - - double - x - - - double - y - - - - - double - z - - - - 27/3/2002 - 9:16:4 - 27/3/2002 - 9:16:4 - 1.00 - ? - SubDivServer - ? - 379 - 41 - - - MulComponent - MulComponent - Mul - 0 - - Mul - - - double - x - - - double - y - - - - - double - z - - - - 27/3/2002 - 9:16:4 - 27/3/2002 - 9:16:4 - 1.00 - ? - MulServer - ? - 553 - 275 - - - DivComponent - DivComponent - Div - 0 - - Div - - - double - x - - - double - y - - - - - double - z - - - - 27/3/2002 - 9:16:4 - 27/3/2002 - 9:16:4 - 1.00 - ? - SubDivServer - ? - 608 - 42 - - - AddComponent - AddComponent - Addition - 0 - - Addition - - - - - Adder - Adder - - - - 27/3/2002 - 9:16:4 - 27/3/2002 - 9:16:4 - 1.03 - ? - localhost/AddServer - ? - 14 - 270 - - - AddComponent - Adder - Add - 0 - - Add - - - Adder - Adder - - - double - x - - - double - y - - - - - double - FuncValue - - - double - z - - - - 27/3/2002 - 9:16:4 - 27/3/2002 - 9:16:4 - 1.03 - ? - localhost/AddServer - ? - 204 - 237 - - - - - - Sub - z - Mul - x - - - - - Sub - z - Div - x - - - - - Mul - z - Div - y - - - - - Addition - Adder - Add - Adder - - - - - Add - FuncValue - Sub - y - - - - - Add - z - Mul - y - - - - - - - - GraphEssai - Sub\x - Sub - x - - 7 - 4.5 - - - - - - GraphEssai - Add\x - Add - x - - 7 - 1.5 - - - - - - GraphEssai - Add\y - Add - y - - 3 - 3 - - - - - - - + + +? + ? + NewGraphEssai + 1 + ? + +NewGraphEssai + + +double + Sub\x + +double + Add\x + +double + Add\y + + +double + Div\z + + + 21/11/2001 - 17:17:23 + 19/9/2003 - 15:23:10 + 1.00 + ? + ? + ? + 0 + 0 + + +SubComponent + SubComponent + Sub + 0 + ? + +Sub + + +double + x + +double + y + + +double + z + + + 19/9/2003 - 15:20:52 + 19/9/2003 - 15:20:52 + 1.00 + ? + SubDivServer + Sub from SubComponent + 413 + 74 + +MulComponent + MulComponent + Mul + 0 + ? + +Mul + + +double + x + +double + y + + +double + z + + + 19/9/2003 - 15:20:52 + 19/9/2003 - 15:20:52 + 1.00 + ? + MulServer + Mul from MulComponent + 617 + 268 + +DivComponent + DivComponent + Div + 0 + ? + +Div + + +double + x + +double + y + + +double + z + + + 19/9/2003 - 15:20:52 + 19/9/2003 - 15:20:52 + 1.00 + ? + SubDivServer + Div from DivComponent + 823 + 74 + +AddComponent + AddComponent + Addition + 0 + ? + +Addition + + + +Adder + Adder + + + 19/9/2003 - 15:20:52 + 19/9/2003 - 15:20:52 + 1.03 + ? + localhost/AddServer + Addition from AddComponent + 11 + 268 + +? + ? + Add + 2 + ? + +Add + + +Adder + Adder + +double + x + +double + y + + +double + FuncValue + +double + z + + + 19/9/2003 - 15:20:52 + 19/9/2003 - 15:20:52 + 1.04 + ? + ? + Compute Node + 215 + 268 + + +Sub + z + Div + x + + +Sub + z + Mul + x + + +595 + 348 + +595 + 154 + +Mul + z + Div + y + + +805 + 183 + +806 + 348 + +Addition + Adder + Add + Adder + + +Add + FuncValue + Sub + y + + +395 + 183 + +395 + 349 + +Add + z + Mul + y + + + +NewGraphEssai + Sub\x + Sub + x + +7 + 4.5 + + +NewGraphEssai + Add\x + Add + x + +7 + 1.5 + + +NewGraphEssai + Add\y + Add + y + +7 + 3 + diff --git a/examples/NewGraphGeomEssai.py b/examples/NewGraphGeomEssai.py index d8f8888..ca8ef7a 100644 --- a/examples/NewGraphGeomEssai.py +++ b/examples/NewGraphGeomEssai.py @@ -1,30 +1,51 @@ - -# Generated python file of Graph GraphGeom2Essai +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : NewGraphGeomEssai.py +# Module : SuperVisionTest from SuperV import * # Graph creation -GraphGeom2Essai = Graph( 'GraphGeom2Essai' ) -print GraphGeom2Essai.SetAuthor( '' ) -print GraphGeom2Essai.SetComment( '' ) -GraphGeom2Essai.Coords( 0 , 0 ) +NewGraphGeomEssai = Graph( 'NewGraphGeomEssai' ) +print NewGraphGeomEssai.SetAuthor( '' ) +print NewGraphGeomEssai.SetComment( '' ) +NewGraphGeomEssai.Coords( 0 , 0 ) # Creation of Nodes -MakeSphere = GraphGeom2Essai.Node( 'GEOM' , 'GEOM' , 'MakeSphere' ) +MakeSphere = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeSphere' ) print MakeSphere.SetAuthor( '' ) print MakeSphere.SetContainer( 'FactoryServer' ) print MakeSphere.SetComment( '' ) MakeSphere.Coords( 17 , 75 ) -MakeCopy = GraphGeom2Essai.Node( 'GEOM' , 'GEOM' , 'MakeCopy' ) +MakeCopy = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeCopy' ) print MakeCopy.SetAuthor( '' ) print MakeCopy.SetContainer( 'FactoryServer' ) print MakeCopy.SetComment( '' ) MakeCopy.Coords( 219 , 12 ) -MakeTranslation = GraphGeom2Essai.Node( 'GEOM' , 'GEOM' , 'MakeTranslation' ) +MakeTranslation = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeTranslation' ) print MakeTranslation.SetAuthor( '' ) print MakeTranslation.SetContainer( 'FactoryServer' ) print MakeTranslation.SetComment( '' ) MakeTranslation.Coords( 221 , 209 ) -MakeFuse = GraphGeom2Essai.Node( 'GEOM' , 'GEOM' , 'MakeFuse' ) +MakeFuse = NewGraphGeomEssai.Node( 'GEOM' , 'GEOM' , 'MakeFuse' ) print MakeFuse.SetAuthor( '' ) print MakeFuse.SetContainer( 'FactoryServer' ) print MakeFuse.SetComment( '' ) @@ -32,12 +53,12 @@ MakeFuse.Coords( 465 , 106 ) # Creation of intermediate Output variables and of links MakeSpheresphere = MakeSphere.Port( 'shape' ) -MakeCopyshape = GraphGeom2Essai.Link( MakeSpheresphere , MakeCopy.Port( 'shape1' ) ) -MakeTranslationshape = GraphGeom2Essai.Link( MakeSpheresphere , MakeTranslation.Port( 'shape1' ) ) +MakeCopyshape = NewGraphGeomEssai.Link( MakeSpheresphere , MakeCopy.Port( 'shape1' ) ) +MakeTranslationshape = NewGraphGeomEssai.Link( MakeSpheresphere , MakeTranslation.Port( 'shape1' ) ) MakeCopycopy = MakeCopy.Port( 'shape' ) -MakeFuseshape1 = GraphGeom2Essai.Link( MakeCopycopy , MakeFuse.Port( 'shape1' ) ) +MakeFuseshape1 = NewGraphGeomEssai.Link( MakeCopycopy , MakeFuse.Port( 'shape1' ) ) MakeTranslationtranslation = MakeTranslation.Port( 'shape' ) -MakeFuseshape2 = GraphGeom2Essai.Link( MakeTranslationtranslation , MakeFuse.Port( 'shape2' ) ) +MakeFuseshape2 = NewGraphGeomEssai.Link( MakeTranslationtranslation , MakeFuse.Port( 'shape2' ) ) # Creation of Input datas MakeSpherex1 = MakeSphere.Input( 'x1' , 0) @@ -52,3 +73,12 @@ MakeTranslationz1 = MakeTranslation.Input( 'z1' , 0) # Creation of Output variables MakeFuseresult = MakeFuse.Port( 'shape' ) + +NewGraphGeomEssai.Run() + +NewGraphGeomEssai.DoneW() + +NewGraphGeomEssai.State() + +NewGraphGeomEssai.PrintPorts() + diff --git a/examples/NewGraphGeomEssai.xml b/examples/NewGraphGeomEssai.xml index 552125d..f0c5583 100644 --- a/examples/NewGraphGeomEssai.xml +++ b/examples/NewGraphGeomEssai.xml @@ -6,12 +6,12 @@ - ? - ? - GraphGeom2Essai + NewGraphGeomEssai + NewGraphGeomEssai + NewGraphGeomEssai 1 - GraphGeom2Essai + NewGraphGeomEssai double @@ -63,7 +63,7 @@ GEOM - ? + GEOM MakeSphere 0 @@ -104,7 +104,7 @@ GEOM - ? + GEOM MakeCopy 0 @@ -133,7 +133,7 @@ GEOM - ? + GEOM MakeTranslation 0 @@ -174,7 +174,7 @@ GEOM - ? + GEOM MakeFuse 0 @@ -244,7 +244,7 @@ - GraphGeom2Essai + NewGraphGeomEssai MakeSphere\x1 MakeSphere x1 @@ -256,7 +256,7 @@ - GraphGeom2Essai + NewGraphGeomEssai MakeSphere\y1 MakeSphere y1 @@ -268,7 +268,7 @@ - GraphGeom2Essai + NewGraphGeomEssai MakeSphere\z1 MakeSphere z1 @@ -280,7 +280,7 @@ - GraphGeom2Essai + NewGraphGeomEssai MakeSphere\radius MakeSphere radius @@ -292,7 +292,7 @@ - GraphGeom2Essai + NewGraphGeomEssai MakeTranslation\x1 MakeTranslation x1 @@ -304,7 +304,7 @@ - GraphGeom2Essai + NewGraphGeomEssai MakeTranslation\y1 MakeTranslation y1 @@ -316,7 +316,7 @@ - GraphGeom2Essai + NewGraphGeomEssai MakeTranslation\z1 MakeTranslation z1 diff --git a/examples/SupervRheolefGraph.py b/examples/SupervRheolefGraph.py index b537746..65c720f 100755 --- a/examples/SupervRheolefGraph.py +++ b/examples/SupervRheolefGraph.py @@ -4,147 +4,173 @@ from SuperV import * # Graph creation aNewDataFlow = Graph( 'aNewDataFlow' ) -print aNewDataFlow.SetName( 'aNewDataFlow' ) -print aNewDataFlow.SetAuthor( '' ) -print aNewDataFlow.SetComment( '' ) +aNewDataFlow.SetName( 'aNewDataFlow' ) +aNewDataFlow.SetAuthor( '' ) +aNewDataFlow.SetComment( '' ) aNewDataFlow.Coords( 0 , 0 ) -# Creation of Nodes -InitCL = aNewDataFlow.Node( 'CLRheolef' , 'CLRheolef' , 'InitCL' ) -print InitCL.SetName( 'InitCL' ) -print InitCL.SetAuthor( '' ) -print InitCL.SetContainer( 'localhost/FactoryServer' ) -print InitCL.SetComment( '' ) -InitCL.Coords( 340 , 327 ) -MakeBox = aNewDataFlow.Node( 'GEOM' , 'GEOM' , 'MakeBox' ) -print MakeBox.SetName( 'MakeBox' ) -print MakeBox.SetAuthor( '' ) -print MakeBox.SetContainer( 'localhost/FactoryServer' ) -print MakeBox.SetComment( '' ) -MakeBox.Coords( 0 , 0 ) -MeshGeomShapeSup = aNewDataFlow.Node( 'QMG' , 'QMG' , 'MeshGeomShapeSup' ) -print MeshGeomShapeSup.SetName( 'MeshGeomShapeSup' ) -print MeshGeomShapeSup.SetAuthor( '' ) -print MeshGeomShapeSup.SetContainer( 'localhost/FactoryServer' ) -print MeshGeomShapeSup.SetComment( '' ) -MeshGeomShapeSup.Coords( 339 , 0 ) -SolveSup = aNewDataFlow.Node( 'Rheolef' , 'Rheolef' , 'SolveSup' ) -print SolveSup.SetName( 'SolveSup' ) -print SolveSup.SetAuthor( '' ) -print SolveSup.SetContainer( 'localhost/FactoryServer' ) -print SolveSup.SetComment( '' ) -SolveSup.Coords( 862 , 298 ) -ModifyCL = aNewDataFlow.Node( 'CLRheolef' , 'CLRheolef' , 'ModifyCL' ) -print ModifyCL.SetName( 'ModifyCL' ) -print ModifyCL.SetAuthor( '' ) -print ModifyCL.SetContainer( 'localhost/FactoryServer' ) -print ModifyCL.SetComment( '' ) -ModifyCL.Coords( 509 , 328 ) -MakeBoolean = aNewDataFlow.Node( 'GEOM' , 'GEOM' , 'MakeBoolean' ) -print MakeBoolean.SetName( 'MakeBoolean' ) -print MakeBoolean.SetAuthor( '' ) -print MakeBoolean.SetContainer( 'localhost/FactoryServer' ) -print MakeBoolean.SetComment( '' ) -MakeBoolean.Coords( 171 , 0 ) -MakeBox_1 = aNewDataFlow.Node( 'GEOM' , 'GEOM' , 'MakeBox' ) -print MakeBox_1.SetName( 'MakeBox_1' ) -print MakeBox_1.SetAuthor( '' ) -print MakeBox_1.SetContainer( 'localhost/FactoryServer' ) -print MakeBox_1.SetComment( '' ) +# Creation of Factory Nodes + +InitCL = aNewDataFlow.FNode( 'CLRheolef' , 'CLRheolef' , 'InitCL' ) +InitCL.SetName( 'InitCL' ) +InitCL.SetAuthor( '' ) +InitCL.SetContainer( 'localhost/FactoryServer' ) +InitCL.SetComment( 'InitCL from CLRheolef' ) +InitCL.Coords( 414 , 334 ) + +MakeBox = aNewDataFlow.FNode( 'Geometry' , 'Geometry' , 'MakeBox' ) +MakeBox.SetName( 'MakeBox' ) +MakeBox.SetAuthor( '' ) +MakeBox.SetContainer( 'localhost/FactoryServer' ) +MakeBox.SetComment( 'MakeBox from Geometry' ) +MakeBox.Coords( 7 , 29 ) + +MeshGeomShapeSup = aNewDataFlow.FNode( 'QMG' , 'QMG' , 'MeshGeomShapeSup' ) +MeshGeomShapeSup.SetName( 'MeshGeomShapeSup' ) +MeshGeomShapeSup.SetAuthor( '' ) +MeshGeomShapeSup.SetContainer( 'localhost/FactoryServer' ) +MeshGeomShapeSup.SetComment( 'MeshGeomShapeSup from QMG' ) +MeshGeomShapeSup.Coords( 372 , 0 ) + +SolveSup = aNewDataFlow.FNode( 'Rheolef' , 'Rheolef' , 'SolveSup' ) +SolveSup.SetName( 'SolveSup' ) +SolveSup.SetAuthor( '' ) +SolveSup.SetContainer( 'localhost/FactoryServer' ) +SolveSup.SetComment( 'SolveSup from Rheolef' ) +SolveSup.Coords( 1030 , 304 ) + +ModifyCL = aNewDataFlow.FNode( 'CLRheolef' , 'CLRheolef' , 'ModifyCL' ) +ModifyCL.SetName( 'ModifyCL' ) +ModifyCL.SetAuthor( '' ) +ModifyCL.SetContainer( 'localhost/FactoryServer' ) +ModifyCL.SetComment( 'ModifyCL from CLRheolef' ) +ModifyCL.Coords( 602 , 335 ) + +MakeBoolean = aNewDataFlow.FNode( 'Geometry' , 'Geometry' , 'MakeBoolean' ) +MakeBoolean.SetName( 'MakeBoolean' ) +MakeBoolean.SetAuthor( '' ) +MakeBoolean.SetContainer( 'localhost/FactoryServer' ) +MakeBoolean.SetComment( 'MakeBoolean from Geometry' ) +MakeBoolean.Coords( 188 , 30 ) + +MakeBox_1 = aNewDataFlow.FNode( 'Geometry' , 'Geometry' , 'MakeBox' ) +MakeBox_1.SetName( 'MakeBox_1' ) +MakeBox_1.SetAuthor( '' ) +MakeBox_1.SetContainer( 'localhost/FactoryServer' ) +MakeBox_1.SetComment( 'MakeBox from Geometry' ) MakeBox_1.Coords( 0 , 325 ) -MakeTranslation = aNewDataFlow.Node( 'GEOM' , 'GEOM' , 'MakeTranslation' ) -print MakeTranslation.SetName( 'MakeTranslation' ) -print MakeTranslation.SetAuthor( '' ) -print MakeTranslation.SetContainer( 'localhost/FactoryServer' ) -print MakeTranslation.SetComment( '' ) -MakeTranslation.Coords( 165 , 325 ) -FindNode = aNewDataFlow.Node( 'QMG' , 'QMG' , 'FindNode' ) -print FindNode.SetName( 'FindNode' ) -print FindNode.SetAuthor( '' ) -print FindNode.SetContainer( 'localhost/FactoryServer' ) -print FindNode.SetComment( '' ) -FindNode.Coords( 510 , 0 ) -ValueOf = aNewDataFlow.Node( 'Rheolef' , 'Rheolef' , 'ValueOf' ) -print ValueOf.SetName( 'ValueOf' ) -print ValueOf.SetAuthor( '' ) -print ValueOf.SetContainer( 'localhost/FactoryServer' ) -print ValueOf.SetComment( '' ) -ValueOf.Coords( 692 , 43 ) -ModifyCL_1 = aNewDataFlow.Node( 'CLRheolef' , 'CLRheolef' , 'ModifyCL' ) -print ModifyCL_1.SetName( 'ModifyCL_1' ) -print ModifyCL_1.SetAuthor( '' ) -print ModifyCL_1.SetContainer( 'localhost/FactoryServer' ) -print ModifyCL_1.SetComment( '' ) -ModifyCL_1.Coords( 674 , 328 ) -Plot = aNewDataFlow.Node( 'Rheolef' , 'Rheolef' , 'Plot' ) -print Plot.SetName( 'Plot' ) -print Plot.SetAuthor( '' ) -print Plot.SetContainer( 'localhost/FactoryServer' ) -print Plot.SetComment( '' ) -Plot.Coords( 860 , 43 ) -Add = aNewDataFlow.Node( 'AddComponent' , 'AddComponent' , 'Add' ) -print Add.SetName( 'Add' ) -print Add.SetAuthor( '' ) -print Add.SetContainer( 'localhost/FactoryServer' ) -print Add.SetComment( '' ) -Add.Coords( 0 , 650 ) - -# Creation of intermediate Output variables and of links + +MakeTranslation = aNewDataFlow.FNode( 'Geometry' , 'Geometry' , 'MakeTranslation' ) +MakeTranslation.SetName( 'MakeTranslation' ) +MakeTranslation.SetAuthor( '' ) +MakeTranslation.SetContainer( 'localhost/FactoryServer' ) +MakeTranslation.SetComment( 'MakeTranslation from Geometry' ) +MakeTranslation.Coords( 190 , 325 ) + +FindNode = aNewDataFlow.FNode( 'QMG' , 'QMG' , 'FindNode' ) +FindNode.SetName( 'FindNode' ) +FindNode.SetAuthor( '' ) +FindNode.SetContainer( 'localhost/FactoryServer' ) +FindNode.SetComment( 'FindNode from QMG' ) +FindNode.Coords( 621 , 0 ) + +ValueOf = aNewDataFlow.FNode( 'Rheolef' , 'Rheolef' , 'ValueOf' ) +ValueOf.SetName( 'ValueOf' ) +ValueOf.SetAuthor( '' ) +ValueOf.SetContainer( 'localhost/FactoryServer' ) +ValueOf.SetComment( 'ValueOf from Rheolef' ) +ValueOf.Coords( 832 , 42 ) + +ModifyCL_1 = aNewDataFlow.FNode( 'CLRheolef' , 'CLRheolef' , 'ModifyCL' ) +ModifyCL_1.SetName( 'ModifyCL_1' ) +ModifyCL_1.SetAuthor( '' ) +ModifyCL_1.SetContainer( 'localhost/FactoryServer' ) +ModifyCL_1.SetComment( 'ModifyCL from CLRheolef' ) +ModifyCL_1.Coords( 800 , 334 ) + +Plot = aNewDataFlow.FNode( 'Rheolef' , 'Rheolef' , 'Plot' ) +Plot.SetName( 'Plot' ) +Plot.SetAuthor( '' ) +Plot.SetContainer( 'localhost/FactoryServer' ) +Plot.SetComment( 'Plot from Rheolef' ) +Plot.Coords( 1029 , 41 ) + +Add = aNewDataFlow.FNode( 'AddComponent' , 'AddComponent' , 'Add' ) +Add.SetName( 'Add' ) +Add.SetAuthor( '' ) +Add.SetContainer( 'localhost/FactoryServer' ) +Add.SetComment( 'Add from AddComponent' ) +Add.Coords( 0 , 610 ) + +# Creation of Links InitCLreturn = InitCL.Port( 'return' ) ModifyCLmyRheolefData = aNewDataFlow.Link( InitCLreturn , ModifyCL.Port( 'myRheolefData' ) ) + MakeBoxshape = MakeBox.Port( 'shape' ) MakeBooleanshape1 = aNewDataFlow.Link( MakeBoxshape , MakeBoolean.Port( 'shape1' ) ) + MeshGeomShapeSupreturn = MeshGeomShapeSup.Port( 'return' ) SolveSupmyMesh = aNewDataFlow.Link( MeshGeomShapeSupreturn , SolveSup.Port( 'myMesh' ) ) -print SolveSupmyMesh.AddCoord( 1 , 836 , 509 ) -print SolveSupmyMesh.AddCoord( 2 , 835 , 320 ) -print SolveSupmyMesh.AddCoord( 3 , 499 , 321 ) -print SolveSupmyMesh.AddCoord( 4 , 498 , 152 ) +SolveSupmyMesh.AddCoord( 1 , 985 , 442 ) +SolveSupmyMesh.AddCoord( 2 , 984 , 301 ) +SolveSupmyMesh.AddCoord( 3 , 561 , 300 ) +SolveSupmyMesh.AddCoord( 4 , 561 , 83 ) + InitCLmyMesh = aNewDataFlow.Link( MeshGeomShapeSupreturn , InitCL.Port( 'myMesh' ) ) -print InitCLmyMesh.AddCoord( 1 , 333 , 570 ) -print InitCLmyMesh.AddCoord( 2 , 332 , 321 ) -print InitCLmyMesh.AddCoord( 3 , 499 , 321 ) -print InitCLmyMesh.AddCoord( 4 , 499 , 151 ) +InitCLmyMesh.AddCoord( 1 , 385 , 502 ) +InitCLmyMesh.AddCoord( 2 , 384 , 301 ) +InitCLmyMesh.AddCoord( 3 , 561 , 300 ) +InitCLmyMesh.AddCoord( 4 , 561 , 81 ) + FindNodeaMesh = aNewDataFlow.Link( MeshGeomShapeSupreturn , FindNode.Port( 'aMesh' ) ) -print FindNodeaMesh.AddCoord( 1 , 498 , 152 ) + SolveSupreturn = SolveSup.Port( 'return' ) ValueOfaField = aNewDataFlow.Link( SolveSupreturn , ValueOf.Port( 'aField' ) ) -print ValueOfaField.AddCoord( 1 , 683 , 194 ) -print ValueOfaField.AddCoord( 2 , 682 , 16 ) -print ValueOfaField.AddCoord( 3 , 1000 , 17 ) -print ValueOfaField.AddCoord( 4 , 1001 , 450 ) +ValueOfaField.AddCoord( 1 , 818 , 122 ) +ValueOfaField.AddCoord( 2 , 817 , 26 ) +ValueOfaField.AddCoord( 3 , 1216 , 26 ) +ValueOfaField.AddCoord( 4 , 1218 , 385 ) + ModifyCLreturn = ModifyCL.Port( 'return' ) ModifyCL_1myRheolefData = aNewDataFlow.Link( ModifyCLreturn , ModifyCL_1.Port( 'myRheolefData' ) ) + MakeBooleanshape = MakeBoolean.Port( 'shape' ) MeshGeomShapeSupshape = aNewDataFlow.Link( MakeBooleanshape , MeshGeomShapeSup.Port( 'shape' ) ) -print MeshGeomShapeSupshape.AddCoord( 1 , 333 , 182 ) -print MeshGeomShapeSupshape.AddCoord( 2 , 332 , 153 ) + MakeBox_1shape = MakeBox_1.Port( 'shape' ) MakeTranslationshape1 = aNewDataFlow.Link( MakeBox_1shape , MakeTranslation.Port( 'shape1' ) ) + MakeTranslationshape = MakeTranslation.Port( 'shape' ) MakeBooleanshape2 = aNewDataFlow.Link( MakeTranslationshape , MakeBoolean.Port( 'shape2' ) ) -print MakeBooleanshape2.AddCoord( 1 , 163 , 182 ) -print MakeBooleanshape2.AddCoord( 2 , 163 , 321 ) -print MakeBooleanshape2.AddCoord( 3 , 326 , 321 ) -print MakeBooleanshape2.AddCoord( 4 , 327 , 477 ) +MakeBooleanshape2.AddCoord( 1 , 182 , 140 ) +MakeBooleanshape2.AddCoord( 2 , 181 , 261 ) +MakeBooleanshape2.AddCoord( 3 , 363 , 260 ) +MakeBooleanshape2.AddCoord( 4 , 363 , 411 ) +MakeBooleanshape2.AddCoord( 5 , 327 , 408 ) + FindNodereturn = FindNode.Port( 'return' ) ValueOfnumberOfNode = aNewDataFlow.Link( FindNodereturn , ValueOf.Port( 'numberOfNode' ) ) -print ValueOfnumberOfNode.AddCoord( 1 , 673 , 224 ) -print ValueOfnumberOfNode.AddCoord( 2 , 672 , 151 ) +ValueOfnumberOfNode.AddCoord( 1 , 799 , 152 ) +ValueOfnumberOfNode.AddCoord( 2 , 798 , 81 ) + ValueOfreturn = ValueOf.Port( 'return' ) PlotValue = aNewDataFlow.Link( ValueOfreturn , Plot.Port( 'Value' ) ) + ModifyCL_1return = ModifyCL_1.Port( 'return' ) SolveSupmyRheolefData = aNewDataFlow.Link( ModifyCL_1return , SolveSup.Port( 'myRheolefData' ) ) + Addz = Add.Port( 'z' ) MakeTranslationy1 = aNewDataFlow.Link( Addz , MakeTranslation.Port( 'y1' ) ) -print MakeTranslationy1.AddCoord( 1 , 161 , 537 ) -print MakeTranslationy1.AddCoord( 2 , 162 , 831 ) +MakeTranslationy1.AddCoord( 1 , 181 , 464 ) +MakeTranslationy1.AddCoord( 2 , 182 , 720 ) + FindNodey = aNewDataFlow.Link( Addz , FindNode.Port( 'y' ) ) -print FindNodey.AddCoord( 1 , 504 , 209 ) -print FindNodey.AddCoord( 2 , 503 , 832 ) +FindNodey.AddCoord( 1 , 592 , 139 ) +FindNodey.AddCoord( 2 , 593 , 720 ) + PlotPosition = aNewDataFlow.Link( Addz , Plot.Port( 'Position' ) ) -print PlotPosition.AddCoord( 1 , 854 , 228 ) -print PlotPosition.AddCoord( 2 , 855 , 832 ) +PlotPosition.AddCoord( 1 , 1010 , 150 ) +PlotPosition.AddCoord( 2 , 1011 , 720 ) # Creation of Input datas InitCLstudyId = InitCL.Input( 'studyId' , 1) @@ -183,7 +209,5 @@ PlotFilename = Plot.Input( 'Filename' , 'Result.plt') Addx = Add.Input( 'x' , 0) Addy = Add.Input( 'y' , 10) -# Missing Input datas - # Creation of Output variables AddFuncValue = Add.Port( 'FuncValue' ) diff --git a/examples/SupervRheolefGraph.xml b/examples/SupervRheolefGraph.xml index aa75195..0203403 100755 --- a/examples/SupervRheolefGraph.xml +++ b/examples/SupervRheolefGraph.xml @@ -1,1369 +1,1072 @@ - - - - - + - - - ? - ? - aNewDataFlow - 1 - - aNewDataFlow - - - long - InitCL\studyId - - - string - InitCL\dataName - - - double - InitCL\source - - - double - MakeBox\x1 - - - double - MakeBox\y1 - - - double - MakeBox\z1 - - - double - MakeBox\x2 - - - double - MakeBox\y2 - - - double - MakeBox\z2 - - - long - MeshGeomShapeSup\studyId - - - double - MeshGeomShapeSup\sizeControl - - - double - MeshGeomShapeSup\curveControl - - - double - MeshGeomShapeSup\tolmesh - - - double - MeshGeomShapeSup\tolskin - - - long - SolveSup\studyId - - - long - ModifyCL\faceToModify - - - long - ModifyCL\newFaceCLtype - - - double - ModifyCL\newFaceValue - - - long - MakeBoolean\operation - - - double - MakeBox_1\x1 - - - double - MakeBox_1\y1 - - - double - MakeBox_1\z1 - - - double - MakeBox_1\x2 - - - double - MakeBox_1\y2 - - - double - MakeBox_1\z2 - - - double - MakeTranslation\x1 - - - double - MakeTranslation\z1 - - - double - FindNode\x - - - double - FindNode\z - - - long - ModifyCL_1\faceToModify - - - long - ModifyCL_1\newFaceCLtype - - - double - ModifyCL_1\newFaceValue - - - string - Plot\Filename - - - double - Add\x - - - double - Add\y - - - - - double - Add\FuncValue - - - - 14/7/2002 - 21:1:52 - 18/7/2002 - 9:38:51 - 1.03 - ? - localhost/FactoryServer - ? - 0 - 0 - - - - - - CLRheolef - CLRheolef - InitCL - 0 - - InitCL - - - long - studyId - - - string - dataName - - - double - source - - - QMG_Mesh - myMesh - - - - - Rheolef_Data - return - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 340 - 327 - - - GEOM - GEOM - MakeBox - 0 - - MakeBox - - - double - x1 - - - double - y1 - - - double - z1 - - - double - x2 - - - double - y2 - - - double - z2 - - - - - GEOM_Shape - shape - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 0 - 0 - - - QMG - QMG - MeshGeomShapeSup - 0 - - MeshGeomShapeSup - - - long - studyId - - - GEOM_Shape - shape - - - double - sizeControl - - - double - curveControl - - - double - tolmesh - - - double - tolskin - - - - - QMG_Mesh - return - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 339 - 0 - - - Rheolef - Rheolef - SolveSup - 0 - - SolveSup - - - long - studyId - - - Rheolef_Data - myRheolefData - - - QMG_Mesh - myMesh - - - - - Rheolef_Field - return - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 862 - 298 - - - CLRheolef - CLRheolef - ModifyCL - 0 - - ModifyCL - - - Rheolef_Data - myRheolefData - - - long - faceToModify - - - long - newFaceCLtype - - - double - newFaceValue - - - - - Rheolef_Data - return - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 509 - 328 - - - GEOM - GEOM - MakeBoolean - 0 - - MakeBoolean - - - GEOM_Shape - shape1 - - - GEOM_Shape - shape2 - - - long - operation - - - - - GEOM_Shape - shape - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 171 - 0 - - - GEOM - GEOM - MakeBox_1 - 0 - - MakeBox - - - double - x1 - - - double - y1 - - - double - z1 - - - double - x2 - - - double - y2 - - - double - z2 - - - - - GEOM_Shape - shape - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 0 - 325 - - - GEOM - GEOM - MakeTranslation - 0 - - MakeTranslation - - - GEOM_Shape - shape1 - - - double - x1 - - - double - y1 - - - double - z1 - - - - - GEOM_Shape - shape - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 165 - 325 - - - QMG - QMG - FindNode - 0 - - FindNode - - - QMG_Mesh - aMesh - - - double - x - - - double - y - - - double - z - - - - - long - return - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 510 - 0 - - - Rheolef - Rheolef - ValueOf - 0 - - ValueOf - - - Rheolef_Field - aField - - - long - numberOfNode - - - - - double - return - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 692 - 43 - - - CLRheolef - CLRheolef - ModifyCL_1 - 0 - - ModifyCL - - - Rheolef_Data - myRheolefData - - - long - faceToModify - - - long - newFaceCLtype - - - double - newFaceValue - - - - - Rheolef_Data - return - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 674 - 328 - - - Rheolef - Rheolef - Plot - 0 - - Plot - - - double - Value - - - double - Position - - - string - Filename - - - - - - 18/7/2002 - 9:35:30 - 18/7/2002 - 9:35:30 - 1.03 - ? - localhost/FactoryServer - ? - 860 - 43 - - - AddComponent - AddComponent - Add - 0 - - Add - - - double - x - - - double - y - - - - - double - FuncValue - - - double - z - - - - 18/7/2002 - 9:35:55 - 18/7/2002 - 9:35:55 - 1.03 - ? - localhost/FactoryServer - ? - 0 - 650 - - - - - - InitCL - return - ModifyCL - myRheolefData - - - - - MakeBox - shape - MakeBoolean - shape1 - - - - - MeshGeomShapeSup - return - SolveSup - myMesh - - - 836 - 509 - - - 835 - 320 - - - 499 - 321 - - - 498 - 152 - - - - - MeshGeomShapeSup - return - InitCL - myMesh - - - 333 - 570 - - - 332 - 321 - - - 499 - 321 - - - 499 - 151 - - - - - MeshGeomShapeSup - return - FindNode - aMesh - - - 498 - 152 - - - - - SolveSup - return - ValueOf - aField - - - 683 - 194 - - - 682 - 16 - - - 1000 - 17 - - - 1001 - 450 - - - - - ModifyCL - return - ModifyCL_1 - myRheolefData - - - - - MakeBoolean - shape - MeshGeomShapeSup - shape - - - 333 - 182 - - - 332 - 153 - - - - - MakeBox_1 - shape - MakeTranslation - shape1 - - - - - MakeTranslation - shape - MakeBoolean - shape2 - - - 163 - 182 - - - 163 - 321 - - - 326 - 321 - - - 327 - 477 - - - - - FindNode - return - ValueOf - numberOfNode - - - 673 - 224 - - - 672 - 151 - - - - - ValueOf - return - Plot - Value - - - - - ModifyCL_1 - return - SolveSup - myRheolefData - - - - - Add - z - MakeTranslation - y1 - - - 161 - 537 - - - 162 - 831 - - - - - Add - z - FindNode - y - - - 504 - 209 - - - 503 - 832 - - - - - Add - z - Plot - Position - - - 854 - 228 - - - 855 - 832 - - - - - - - - aNewDataFlow - InitCL\studyId - InitCL - studyId - - 3 - 1 - - - - - - aNewDataFlow - InitCL\dataName - InitCL - dataName - - 18 - BoxData - - - - - - aNewDataFlow - InitCL\source - InitCL - source - - 7 - 0 - - - - - - aNewDataFlow - MakeBox\x1 - MakeBox - x1 - - 3 - 0 - - - - - - aNewDataFlow - MakeBox\y1 - MakeBox - y1 - - 3 - 0 - - - - - - aNewDataFlow - MakeBox\z1 - MakeBox - z1 - - 3 - 0 - - - - - - aNewDataFlow - MakeBox\x2 - MakeBox - x2 - - 3 - 100 - - - - - - aNewDataFlow - MakeBox\y2 - MakeBox - y2 - - 3 - 500 - - - - - - aNewDataFlow - MakeBox\z2 - MakeBox - z2 - - 3 - 50 - - - - - - aNewDataFlow - MeshGeomShapeSup\studyId - MeshGeomShapeSup - studyId - - 3 - 1 - - - - - - aNewDataFlow - MeshGeomShapeSup\sizeControl - MeshGeomShapeSup - sizeControl - - 3 - 999999 - - - - - - aNewDataFlow - MeshGeomShapeSup\curveControl - MeshGeomShapeSup - curveControl - - 7 - 0.5 - - - - - - aNewDataFlow - MeshGeomShapeSup\tolmesh - MeshGeomShapeSup - tolmesh - - 7 - 1e-05 - - - - - - aNewDataFlow - MeshGeomShapeSup\tolskin - MeshGeomShapeSup - tolskin - - 7 - 0 - - - - - - aNewDataFlow - SolveSup\studyId - SolveSup - studyId - - 3 - 1 - - - - - - aNewDataFlow - ModifyCL\faceToModify - ModifyCL - faceToModify - - 3 - 3 - - - - - - aNewDataFlow - ModifyCL\newFaceCLtype - ModifyCL - newFaceCLtype - - 3 - 1 - - - - - - aNewDataFlow - ModifyCL\newFaceValue - ModifyCL - newFaceValue - - 7 - 0 - - - - - - aNewDataFlow - MakeBoolean\operation - MakeBoolean - operation - - 3 - 2 - - - - - - aNewDataFlow - MakeBox_1\x1 - MakeBox_1 - x1 - - 3 - 0 - - - - - - aNewDataFlow - MakeBox_1\y1 - MakeBox_1 - y1 - - 3 - 0 - - - - - - aNewDataFlow - MakeBox_1\z1 - MakeBox_1 - z1 - - 3 - 0 - - - - - - aNewDataFlow - MakeBox_1\x2 - MakeBox_1 - x2 - - 3 - 40 - - - - - - aNewDataFlow - MakeBox_1\y2 - MakeBox_1 - y2 - - 3 - 40 - - - - - - aNewDataFlow - MakeBox_1\z2 - MakeBox_1 - z2 - - 3 - 70 - - - - - - aNewDataFlow - MakeTranslation\x1 - MakeTranslation - x1 - - 3 - 30 - - - - - - aNewDataFlow - MakeTranslation\z1 - MakeTranslation - z1 - - 3 - -10 - - - - - - aNewDataFlow - FindNode\x - FindNode - x - - 3 - 50 - - - - - - aNewDataFlow - FindNode\z - FindNode - z - - 3 - 25 - - - - - - aNewDataFlow - ModifyCL_1\faceToModify - ModifyCL_1 - faceToModify - - 3 - 5 - - - - - - aNewDataFlow - ModifyCL_1\newFaceCLtype - ModifyCL_1 - newFaceCLtype - - 3 - 1 - - - - - - aNewDataFlow - ModifyCL_1\newFaceValue - ModifyCL_1 - newFaceValue - - 7 - 1 - - - - - - aNewDataFlow - Plot\Filename - Plot - Filename - - 18 - Result.plt - - - - - - aNewDataFlow - Add\x - Add - x - - 3 - 0 - - - - - - aNewDataFlow - Add\y - Add - y - - 3 - 10 - - - - - - - + + +? + ? + aNewDataFlow + 1 + ? + +aNewDataFlow + + +long + InitCL\studyId + +string + InitCL\dataName + +double + InitCL\source + +double + MakeBox\x1 + +double + MakeBox\y1 + +double + MakeBox\z1 + +double + MakeBox\x2 + +double + MakeBox\y2 + +double + MakeBox\z2 + +long + MeshGeomShapeSup\studyId + +double + MeshGeomShapeSup\sizeControl + +double + MeshGeomShapeSup\curveControl + +double + MeshGeomShapeSup\tolmesh + +double + MeshGeomShapeSup\tolskin + +long + SolveSup\studyId + +long + ModifyCL\faceToModify + +long + ModifyCL\newFaceCLtype + +double + ModifyCL\newFaceValue + +long + MakeBoolean\operation + +double + MakeBox_1\x1 + +double + MakeBox_1\y1 + +double + MakeBox_1\z1 + +double + MakeBox_1\x2 + +double + MakeBox_1\y2 + +double + MakeBox_1\z2 + +double + MakeTranslation\x1 + +double + MakeTranslation\z1 + +double + FindNode\x + +double + FindNode\z + +long + ModifyCL_1\faceToModify + +long + ModifyCL_1\newFaceCLtype + +double + ModifyCL_1\newFaceValue + +string + Plot\Filename + +double + Add\x + +double + Add\y + + +double + Add\FuncValue + + + 14/7/2002 - 21:1:52 + 19/9/2003 - 15:24:7 + 1.03 + ? + ? + ? + 0 + 0 + + +CLRheolef + CLRheolef + InitCL + 0 + ? + +InitCL + + +long + studyId + +string + dataName + +double + source + +QMG_Mesh + myMesh + + +Rheolef_Data + return + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + InitCL from CLRheolef + 414 + 334 + +Geometry + Geometry + MakeBox + 0 + ? + +MakeBox + + +double + x1 + +double + y1 + +double + z1 + +double + x2 + +double + y2 + +double + z2 + + +GEOM_Shape + shape + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + MakeBox from Geometry + 7 + 29 + +QMG + QMG + MeshGeomShapeSup + 0 + ? + +MeshGeomShapeSup + + +long + studyId + +GEOM_Shape + shape + +double + sizeControl + +double + curveControl + +double + tolmesh + +double + tolskin + + +QMG_Mesh + return + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + MeshGeomShapeSup from QMG + 372 + 0 + +Rheolef + Rheolef + SolveSup + 0 + ? + +SolveSup + + +long + studyId + +Rheolef_Data + myRheolefData + +QMG_Mesh + myMesh + + +Rheolef_Field + return + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + SolveSup from Rheolef + 1030 + 304 + +CLRheolef + CLRheolef + ModifyCL + 0 + ? + +ModifyCL + + +Rheolef_Data + myRheolefData + +long + faceToModify + +long + newFaceCLtype + +double + newFaceValue + + +Rheolef_Data + return + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + ModifyCL from CLRheolef + 602 + 335 + +Geometry + Geometry + MakeBoolean + 0 + ? + +MakeBoolean + + +GEOM_Shape + shape1 + +GEOM_Shape + shape2 + +long + operation + + +GEOM_Shape + shape + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + MakeBoolean from Geometry + 188 + 30 + +Geometry + Geometry + MakeBox_1 + 0 + ? + +MakeBox + + +double + x1 + +double + y1 + +double + z1 + +double + x2 + +double + y2 + +double + z2 + + +GEOM_Shape + shape + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + MakeBox from Geometry + 0 + 325 + +Geometry + Geometry + MakeTranslation + 0 + ? + +MakeTranslation + + +GEOM_Shape + shape1 + +double + x1 + +double + y1 + +double + z1 + + +GEOM_Shape + shape + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + MakeTranslation from Geometry + 190 + 325 + +QMG + QMG + FindNode + 0 + ? + +FindNode + + +QMG_Mesh + aMesh + +double + x + +double + y + +double + z + + +long + return + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + FindNode from QMG + 621 + 0 + +Rheolef + Rheolef + ValueOf + 0 + ? + +ValueOf + + +Rheolef_Field + aField + +long + numberOfNode + + +double + return + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + ValueOf from Rheolef + 832 + 42 + +CLRheolef + CLRheolef + ModifyCL_1 + 0 + ? + +ModifyCL + + +Rheolef_Data + myRheolefData + +long + faceToModify + +long + newFaceCLtype + +double + newFaceValue + + +Rheolef_Data + return + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + ModifyCL from CLRheolef + 800 + 334 + +Rheolef + Rheolef + Plot + 0 + ? + +Plot + + +double + Value + +double + Position + +string + Filename + + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + Plot from Rheolef + 1029 + 41 + +AddComponent + AddComponent + Add + 0 + ? + +Add + + +double + x + +double + y + + +double + FuncValue + +double + z + + + 19/9/2003 - 15:24:7 + 19/9/2003 - 15:24:7 + 1.03 + ? + localhost/FactoryServer + Add from AddComponent + 0 + 610 + + +InitCL + return + ModifyCL + myRheolefData + + +MakeBox + shape + MakeBoolean + shape1 + + +MeshGeomShapeSup + return + SolveSup + myMesh + + +985 + 442 + +984 + 301 + +561 + 300 + +561 + 83 + +MeshGeomShapeSup + return + InitCL + myMesh + + +385 + 502 + +384 + 301 + +561 + 300 + +561 + 81 + +MeshGeomShapeSup + return + FindNode + aMesh + + +SolveSup + return + ValueOf + aField + + +818 + 122 + +817 + 26 + +1216 + 26 + +1218 + 385 + +ModifyCL + return + ModifyCL_1 + myRheolefData + + +MakeBoolean + shape + MeshGeomShapeSup + shape + + +MakeBox_1 + shape + MakeTranslation + shape1 + + +MakeTranslation + shape + MakeBoolean + shape2 + + +182 + 140 + +181 + 261 + +363 + 260 + +363 + 411 + +327 + 408 + +FindNode + return + ValueOf + numberOfNode + + +799 + 152 + +798 + 81 + +ValueOf + return + Plot + Value + + +ModifyCL_1 + return + SolveSup + myRheolefData + + +Add + z + MakeTranslation + y1 + + +181 + 464 + +182 + 720 + +Add + z + FindNode + y + + +592 + 139 + +593 + 720 + +Add + z + Plot + Position + + +1010 + 150 + +1011 + 720 + + +aNewDataFlow + InitCL\studyId + InitCL + studyId + +3 + 1 + + +aNewDataFlow + InitCL\dataName + InitCL + dataName + +18 + BoxData + + +aNewDataFlow + InitCL\source + InitCL + source + +7 + 0 + + +aNewDataFlow + MakeBox\x1 + MakeBox + x1 + +7 + 0 + + +aNewDataFlow + MakeBox\y1 + MakeBox + y1 + +7 + 0 + + +aNewDataFlow + MakeBox\z1 + MakeBox + z1 + +7 + 0 + + +aNewDataFlow + MakeBox\x2 + MakeBox + x2 + +7 + 100 + + +aNewDataFlow + MakeBox\y2 + MakeBox + y2 + +7 + 500 + + +aNewDataFlow + MakeBox\z2 + MakeBox + z2 + +7 + 50 + + +aNewDataFlow + MeshGeomShapeSup\studyId + MeshGeomShapeSup + studyId + +3 + 1 + + +aNewDataFlow + MeshGeomShapeSup\sizeControl + MeshGeomShapeSup + sizeControl + +7 + 999999 + + +aNewDataFlow + MeshGeomShapeSup\curveControl + MeshGeomShapeSup + curveControl + +7 + 0.5 + + +aNewDataFlow + MeshGeomShapeSup\tolmesh + MeshGeomShapeSup + tolmesh + +7 + 1e-05 + + +aNewDataFlow + MeshGeomShapeSup\tolskin + MeshGeomShapeSup + tolskin + +7 + 0 + + +aNewDataFlow + SolveSup\studyId + SolveSup + studyId + +3 + 1 + + +aNewDataFlow + ModifyCL\faceToModify + ModifyCL + faceToModify + +3 + 3 + + +aNewDataFlow + ModifyCL\newFaceCLtype + ModifyCL + newFaceCLtype + +3 + 1 + + +aNewDataFlow + ModifyCL\newFaceValue + ModifyCL + newFaceValue + +7 + 0 + + +aNewDataFlow + MakeBoolean\operation + MakeBoolean + operation + +3 + 2 + + +aNewDataFlow + MakeBox_1\x1 + MakeBox_1 + x1 + +7 + 0 + + +aNewDataFlow + MakeBox_1\y1 + MakeBox_1 + y1 + +7 + 0 + + +aNewDataFlow + MakeBox_1\z1 + MakeBox_1 + z1 + +7 + 0 + + +aNewDataFlow + MakeBox_1\x2 + MakeBox_1 + x2 + +7 + 40 + + +aNewDataFlow + MakeBox_1\y2 + MakeBox_1 + y2 + +7 + 40 + + +aNewDataFlow + MakeBox_1\z2 + MakeBox_1 + z2 + +7 + 70 + + +aNewDataFlow + MakeTranslation\x1 + MakeTranslation + x1 + +7 + 30 + + +aNewDataFlow + MakeTranslation\z1 + MakeTranslation + z1 + +7 + -10 + + +aNewDataFlow + FindNode\x + FindNode + x + +7 + 50 + + +aNewDataFlow + FindNode\z + FindNode + z + +7 + 25 + + +aNewDataFlow + ModifyCL_1\faceToModify + ModifyCL_1 + faceToModify + +3 + 5 + + +aNewDataFlow + ModifyCL_1\newFaceCLtype + ModifyCL_1 + newFaceCLtype + +3 + 1 + + +aNewDataFlow + ModifyCL_1\newFaceValue + ModifyCL_1 + newFaceValue + +7 + 1 + + +aNewDataFlow + Plot\Filename + Plot + Filename + +18 + Result.plt + + +aNewDataFlow + Add\x + Add + x + +7 + 0 + + +aNewDataFlow + Add\y + Add + y + +7 + 10 + diff --git a/examples/SyrStruct.py b/examples/SyrStruct.py index cf52c77..1809102 100644 --- a/examples/SyrStruct.py +++ b/examples/SyrStruct.py @@ -10,63 +10,88 @@ SyrStruct.SetComment( 'Syracuse algorithm' ) SyrStruct.Coords( 0 , 0 ) # Creation of Factory Nodes + m3 = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_M3' ) m3.SetName( 'm3' ) m3.SetAuthor( '' ) m3.SetContainer( 'localhost/FactoryServer' ) -m3.SetComment( '' ) -m3.Coords( 678 , 11 ) +m3.SetComment( 'C_M3 from SyrComponent' ) +m3.Coords( 672 , 28 ) + m3incr = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) m3incr.SetName( 'm3incr' ) m3incr.SetAuthor( '' ) m3incr.SetContainer( 'localhost/FactoryServer' ) -m3incr.SetComment( '' ) -m3incr.Coords( 896 , 10 ) +m3incr.SetComment( 'C_INCR from SyrComponent' ) +m3incr.Coords( 898 , 29 ) + incra = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) incra.SetName( 'incra' ) incra.SetAuthor( '' ) incra.SetContainer( 'localhost/FactoryServer' ) -incra.SetComment( '' ) -incra.Coords( 789 , 201 ) +incra.SetComment( 'C_INCR from SyrComponent' ) +incra.Coords( 803 , 195 ) + div2 = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_DIV2' ) div2.SetName( 'div2' ) div2.SetAuthor( '' ) div2.SetContainer( 'localhost/FactoryServer' ) -div2.SetComment( '' ) -div2.Coords( 792 , 387 ) +div2.SetComment( 'C_DIV2 from SyrComponent' ) +div2.Coords( 810 , 435 ) + incrb = SyrStruct.FNode( 'SyrComponent' , 'SyrComponent' , 'C_INCR' ) incrb.SetName( 'incrb' ) incrb.SetAuthor( '' ) incrb.SetContainer( 'localhost/FactoryServer' ) -incrb.SetComment( '' ) -incrb.Coords( 796 , 577 ) +incrb.SetComment( 'C_INCR from SyrComponent' ) +incrb.Coords( 809 , 574 ) + +# Creation of InLine Nodes +PySyrComponent = [] +PySyrComponent.append( 'from LifeCycleCORBA import * ' ) +PySyrComponent.append( 'def SyrComponent( aContainer , aComponent ) : ' ) +PySyrComponent.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) +PySyrComponent.append( ' lcc = LifeCycleCORBA(orb) ' ) +PySyrComponent.append( ' ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent ) ' ) +PySyrComponent.append( ' return ComponentRef ' ) +SyrComponent = SyrStruct.INode( 'SyrComponent' , PySyrComponent ) +SyrComponent.SetName( 'SyrComponent' ) +SyrComponent.SetAuthor( '' ) +SyrComponent.SetComment( 'SyrComponent( aContainer , aComponent )' ) +SyrComponent.Coords( 0 , 0 ) +SyrComponent.InPort( 'aContainer' , 'string' ) +SyrComponent.InPort( 'aComponent' , 'string' ) +SyrComponent.OutPort( 'SyrComponentobjref' , 'objref' ) # Creation of Loop Nodes PyforN = [] -PyforN.append( 'def InitN( NN , K , SyrComponent , min , max ) :' ) -PyforN.append( ' N = max' ) -PyforN.append( ' if min > 0 :' ) -PyforN.append( ' if min <= max :' ) -PyforN.append( ' N = min' ) -PyforN.append( ' return N,K,SyrComponent,min,max' ) +PyforN.append( 'def InitN( NN , K , SyrComponent , min , max ) : ' ) +PyforN.append( ' N = max ' ) +PyforN.append( ' if min > 0 : ' ) +PyforN.append( ' if max >= min : ' ) +PyforN.append( ' N = min ' ) +PyforN.append( ' return N,K,SyrComponent,min,max ' ) PyMoreforN = [] -PyMoreforN.append( 'def MoreN( NN , KK , SyrComponent , min , max ) :' ) -PyMoreforN.append( ' N = 0' ) -PyMoreforN.append( ' OutLoop = 0' ) -PyMoreforN.append( ' if NN < max :' ) -PyMoreforN.append( ' N = NN' ) -PyMoreforN.append( ' OutLoop = 1' ) -PyMoreforN.append( ' return OutLoop,N,0,SyrComponent,min,max' ) +PyMoreforN.append( 'def MoreN( NN , KK , SyrComponent , min , max ) : ' ) +PyMoreforN.append( ' N = NN ' ) +PyMoreforN.append( ' OutLoop = 0 ' ) +PyMoreforN.append( ' if max > NN : ' ) +PyMoreforN.append( ' OutLoop = 1 ' ) +PyMoreforN.append( ' return OutLoop,N,0,SyrComponent,min,max ' ) PyNextforN = [] -PyNextforN.append( 'def NextN( NN , KK , SyrComponent , min , max ) :' ) -PyNextforN.append( ' N = NN + 1' ) -PyNextforN.append( ' K = KK' ) -PyNextforN.append( ' return N,K,SyrComponent,min,max' ) -forN,endforN = SyrStruct.LNode( 'InitN' , PyforN , 'MoreN' , PyMoreforN , 'NextN' , PyNextforN ) -endforN.SetName( 'endforN' ) -endforN.SetAuthor( '' ) -endforN.SetComment( '' ) -endforN.Coords( 1530 , 332 ) +PyNextforN.append( 'def NextN( NN , KK , SyrComponent , min , max ) : ' ) +PyNextforN.append( ' N = NN + 1 ' ) +PyNextforN.append( ' K = KK ' ) +PyNextforN.append( ' return N,K,SyrComponent,min,max ' ) +forN,EndOfforN = SyrStruct.LNode( 'InitN' , PyforN , 'MoreN' , PyMoreforN , 'NextN' , PyNextforN ) +EndOfforN.SetName( 'EndOfforN' ) +EndOfforN.SetAuthor( '' ) +EndOfforN.SetComment( '' ) +EndOfforN.Coords( 1535 , 332 ) +forN.SetName( 'forN' ) +forN.SetAuthor( '' ) +forN.SetComment( 'InitN , MoreN , NextN' ) +forN.Coords( 20 , 302 ) forN.InPort( 'N' , 'long' ) forN.InPort( 'K' , 'long' ) forN.InPort( 'SyrComponent' , 'objref' ) @@ -77,10 +102,7 @@ forN.OutPort( 'K' , 'long' ) forN.OutPort( 'SyrComponent' , 'objref' ) forN.OutPort( 'min' , 'long' ) forN.OutPort( 'max' , 'long' ) -forN.SetName( 'forN' ) -forN.SetAuthor( '' ) -forN.SetComment( '' ) -forN.Coords( 21 , 242 ) + PywhileNotOne = [] PywhileNotOne.append( 'import threading' ) PywhileNotOne.append( 'import SyrComponent_idl' ) @@ -95,47 +117,49 @@ PyNextwhileNotOne = [] PyNextwhileNotOne.append( 'import SyrComponent_idl' ) PyNextwhileNotOne.append( 'def NextNotOne( SyrComponent , N , K ) :' ) PyNextwhileNotOne.append( ' return SyrComponent,N,K' ) -whileNotOne,endwhileNotOne = SyrStruct.LNode( 'InitNotOne' , PywhileNotOne , 'MoreNotOne' , PyMorewhileNotOne , 'NextNotOne' , PyNextwhileNotOne ) -endwhileNotOne.SetName( 'endwhileNotOne' ) -endwhileNotOne.SetAuthor( '' ) -endwhileNotOne.SetComment( '' ) -endwhileNotOne.Coords( 1340 , 332 ) +whileNotOne,EndOfwhileNotOne = SyrStruct.LNode( 'InitNotOne' , PywhileNotOne , 'MoreNotOne' , PyMorewhileNotOne , 'NextNotOne' , PyNextwhileNotOne ) +EndOfwhileNotOne.SetName( 'EndOfwhileNotOne' ) +EndOfwhileNotOne.SetAuthor( '' ) +EndOfwhileNotOne.SetComment( '' ) +EndOfwhileNotOne.Coords( 1366 , 303 ) +whileNotOne.SetName( 'whileNotOne' ) +whileNotOne.SetAuthor( '' ) +whileNotOne.SetComment( 'InitNotOne , MoreNotOne , NextNotOne' ) +whileNotOne.Coords( 212 , 274 ) whileNotOne.InPort( 'SyrComponent' , 'objref' ) whileNotOne.InPort( 'N' , 'long' ) whileNotOne.InPort( 'K' , 'long' ) whileNotOne.OutPort( 'SyrComponent' , 'objref' ) whileNotOne.OutPort( 'N' , 'long' ) whileNotOne.OutPort( 'K' , 'long' ) -whileNotOne.SetName( 'whileNotOne' ) -whileNotOne.SetAuthor( '' ) -whileNotOne.SetComment( '' ) -whileNotOne.Coords( 210 , 297 ) + Pyfori = [] Pyfori.append( 'def Initfori( ii , K ) :' ) Pyfori.append( ' return 1,0,K' ) PyMorefori = [] PyMorefori.append( 'def Morefori( ii , K ) :' ) PyMorefori.append( ' OutLoop = 0' ) -PyMorefori.append( ' if ii < 2 :' ) +PyMorefori.append( ' if 2 > ii :' ) PyMorefori.append( ' OutLoop = 1' ) PyMorefori.append( ' return OutLoop,ii,K' ) PyNextfori = [] PyNextfori.append( 'def Nextfori( ii , K ) :' ) PyNextfori.append( ' ii = ii + 1' ) PyNextfori.append( ' return ii,K' ) -fori,endfori = SyrStruct.LNode( 'Initfori' , Pyfori , 'Morefori' , PyMorefori , 'Nextfori' , PyNextfori ) -endfori.SetName( 'endfori' ) -endfori.SetAuthor( '' ) -endfori.SetComment( '' ) -endfori.Coords( 971 , 202 ) +fori,EndOffori = SyrStruct.LNode( 'Initfori' , Pyfori , 'Morefori' , PyMorefori , 'Nextfori' , PyNextfori ) +EndOffori.SetName( 'EndOffori' ) +EndOffori.SetAuthor( '' ) +EndOffori.SetComment( '' ) +EndOffori.Coords( 976 , 212 ) +fori.SetName( 'fori' ) +fori.SetAuthor( '' ) +fori.SetComment( 'Initfori, Morefori, Nextfori' ) +fori.Coords( 635 , 212 ) fori.InPort( 'i' , 'long' ) fori.InPort( 'K' , 'long' ) fori.OutPort( 'i' , 'long' ) fori.OutPort( 'K' , 'long' ) -fori.SetName( 'fori' ) -fori.SetAuthor( '' ) -fori.SetComment( '' ) -fori.Coords( 605 , 202 ) + PywhileEven = [] PywhileEven.append( 'import SyrComponent_idl' ) PywhileEven.append( 'def InitEven( SyrComponent , N , K ) :' ) @@ -149,21 +173,21 @@ PyNextwhileEven = [] PyNextwhileEven.append( 'import SyrComponent_idl' ) PyNextwhileEven.append( 'def NextEven( SyrComponent , N , K ) :' ) PyNextwhileEven.append( ' return SyrComponent,N,K' ) -whileEven,endwhileEven = SyrStruct.LNode( 'InitEven' , PywhileEven , 'MoreEven' , PyMorewhileEven , 'NextEven' , PyNextwhileEven ) -endwhileEven.SetName( 'endwhileEven' ) -endwhileEven.SetAuthor( '' ) -endwhileEven.SetComment( '' ) -endwhileEven.Coords( 974 , 450 ) +whileEven,EndOfwhileEven = SyrStruct.LNode( 'InitEven' , PywhileEven , 'MoreEven' , PyMorewhileEven , 'NextEven' , PyNextwhileEven ) +EndOfwhileEven.SetName( 'EndOfwhileEven' ) +EndOfwhileEven.SetAuthor( '' ) +EndOfwhileEven.SetComment( '' ) +EndOfwhileEven.Coords( 988 , 451 ) +whileEven.SetName( 'whileEven' ) +whileEven.SetAuthor( '' ) +whileEven.SetComment( 'InitEven, MoreEven, NextEven' ) +whileEven.Coords( 632 , 451 ) whileEven.InPort( 'SyrComponent' , 'objref' ) whileEven.InPort( 'N' , 'long' ) whileEven.InPort( 'K' , 'long' ) whileEven.OutPort( 'SyrComponent' , 'objref' ) whileEven.OutPort( 'N' , 'long' ) whileEven.OutPort( 'K' , 'long' ) -whileEven.SetName( 'whileEven' ) -whileEven.SetAuthor( '' ) -whileEven.SetComment( '' ) -whileEven.Coords( 605 , 452 ) # Creation of Switch Nodes PyifNotEven = [] @@ -172,17 +196,21 @@ PyifNotEven.append( 'def ifNotEven( SyrComponent , N , K ) :' ) PyifNotEven.append( ' Even = SyrComponent.C_ISEVEN( N )' ) PyifNotEven.append( ' Odd = 1 - Even' ) PyifNotEven.append( ' return Odd,Even,SyrComponent,N,K' ) -ifNotEven,endifNotEven = SyrStruct.SNode( 'ifNotEven' , PyifNotEven ) -endifNotEven.SetName( 'endifNotEven' ) -endifNotEven.SetAuthor( '' ) -endifNotEven.SetComment( '' ) -endifNotEven.Coords( 1155 , 331 ) -PyendifNotEven = [] -endifNotEven.SetPyFunction( 'EndifNotEven' , PyendifNotEven ) -endifNotEven.InPort( 'N' , 'long' ) -endifNotEven.InPort( 'K' , 'long' ) -endifNotEven.OutPort( 'N' , 'long' ) -endifNotEven.OutPort( 'K' , 'long' ) +ifNotEven,EndOfifNotEven = SyrStruct.SNode( 'ifNotEven' , PyifNotEven ) +EndOfifNotEven.SetName( 'EndOfifNotEven' ) +EndOfifNotEven.SetAuthor( '' ) +EndOfifNotEven.SetComment( '' ) +EndOfifNotEven.Coords( 1205 , 331 ) +PyEndOfifNotEven = [] +EndOfifNotEven.SetPyFunction( 'EndifNotEven' , PyEndOfifNotEven ) +EndOfifNotEven.InPort( 'N' , 'long' ) +EndOfifNotEven.InPort( 'K' , 'long' ) +EndOfifNotEven.OutPort( 'N' , 'long' ) +EndOfifNotEven.OutPort( 'K' , 'long' ) +ifNotEven.SetName( 'ifNotEven' ) +ifNotEven.SetAuthor( '' ) +ifNotEven.SetComment( 'ifNotEven' ) +ifNotEven.Coords( 418 , 274 ) ifNotEven.InPort( 'SyrComponent' , 'objref' ) ifNotEven.InPort( 'N' , 'long' ) ifNotEven.InPort( 'K' , 'long' ) @@ -191,164 +219,185 @@ ifNotEven.OutPort( 'Even' , 'long' ) ifNotEven.OutPort( 'SyrComponent' , 'objref' ) ifNotEven.OutPort( 'N' , 'long' ) ifNotEven.OutPort( 'K' , 'long' ) -ifNotEven.SetName( 'ifNotEven' ) -ifNotEven.SetAuthor( '' ) -ifNotEven.SetComment( '' ) -ifNotEven.Coords( 416 , 286 ) -# Creation of intermediate Output variables and of Control Links +# Creation of Links m3anInteger = m3.Port( 'anInteger' ) m3incraCount = SyrStruct.Link( m3anInteger , m3incr.Port( 'aCount' ) ) + m3incraNewCount = m3incr.Port( 'aNewCount' ) -endifNotEvenN = SyrStruct.Link( m3incraNewCount , endifNotEven.Port( 'N' ) ) +EndOfifNotEvenN = SyrStruct.Link( m3incraNewCount , EndOfifNotEven.Port( 'N' ) ) +EndOfifNotEvenN.AddCoord( 1 , 1190 , 366 ) +EndOfifNotEvenN.AddCoord( 2 , 1191 , 109 ) + incraaNewCount = incra.Port( 'aNewCount' ) -endforiK = SyrStruct.Link( incraaNewCount , endfori.Port( 'K' ) ) -endforiK.AddCoord( 1 , 953 , 414 ) -endforiK.AddCoord( 2 , 953 , 353 ) +EndOfforiK = SyrStruct.Link( incraaNewCount , EndOffori.Port( 'K' ) ) + div2anInteger = div2.Port( 'anInteger' ) -endwhileEvenN = SyrStruct.Link( div2anInteger , endwhileEven.Port( 'N' ) ) -endwhileEvenN.AddCoord( 1 , 960 , 632 ) -endwhileEvenN.AddCoord( 2 , 960 , 539 ) +EndOfwhileEvenN = SyrStruct.Link( div2anInteger , EndOfwhileEven.Port( 'N' ) ) + incrbaNewCount = incrb.Port( 'aNewCount' ) -endwhileEvenK = SyrStruct.Link( incrbaNewCount , endwhileEven.Port( 'K' ) ) -endwhileEvenK.AddCoord( 1 , 963 , 662 ) -endwhileEvenK.AddCoord( 2 , 963 , 729 ) -forNDoLoop = forN.Port( 'DoLoop' ) -endforNDoLoop = SyrStruct.Link( forNDoLoop , endforN.Port( 'DoLoop' ) ) +EndOfwhileEvenK = SyrStruct.Link( incrbaNewCount , EndOfwhileEven.Port( 'K' ) ) +EndOfwhileEvenK.AddCoord( 1 , 988 , 543 ) +EndOfwhileEvenK.AddCoord( 2 , 988 , 654 ) + +SyrComponentSyrComponentobjref = SyrComponent.Port( 'SyrComponentobjref' ) +forNSyrComponent = SyrStruct.Link( SyrComponentSyrComponentobjref , forN.Port( 'SyrComponent' ) ) +forNSyrComponent.AddCoord( 1 , 13 , 394 ) +forNSyrComponent.AddCoord( 2 , 12 , 181 ) +forNSyrComponent.AddCoord( 3 , 196 , 181 ) +forNSyrComponent.AddCoord( 4 , 197 , 81 ) + forNN = forN.Port( 'N' ) -endforNN = SyrStruct.Link( forNN , endforN.Port( 'N' ) ) -endforNN.AddCoord( 1 , 1554 , 513 ) -endforNN.AddCoord( 2 , 1523 , 513 ) -endforNN.AddCoord( 3 , 1523 , 806 ) -endforNN.AddCoord( 4 , 202 , 806 ) -endforNN.AddCoord( 5 , 202 , 424 ) whileNotOneN = SyrStruct.Link( forNN , whileNotOne.Port( 'N' ) ) -whileNotOneN.AddCoord( 1 , 200 , 479 ) -whileNotOneN.AddCoord( 2 , 200 , 424 ) + +EndOfforNN = SyrStruct.Link( forNN , EndOfforN.Port( 'N' ) ) + forNK = forN.Port( 'K' ) whileNotOneK = SyrStruct.Link( forNK , whileNotOne.Port( 'K' ) ) -whileNotOneK.AddCoord( 1 , 187 , 509 ) -whileNotOneK.AddCoord( 2 , 187 , 454 ) + forNSyrComponent = forN.Port( 'SyrComponent' ) -endforNSyrComponent = SyrStruct.Link( forNSyrComponent , endforN.Port( 'SyrComponent' ) ) +EndOfforNSyrComponent = SyrStruct.Link( forNSyrComponent , EndOfforN.Port( 'SyrComponent' ) ) + whileNotOneSyrComponent = SyrStruct.Link( forNSyrComponent , whileNotOne.Port( 'SyrComponent' ) ) +whileNotOneSyrComponent.AddCoord( 1 , 192 , 309 ) +whileNotOneSyrComponent.AddCoord( 2 , 191 , 394 ) + forNmin = forN.Port( 'min' ) -endforNmin = SyrStruct.Link( forNmin , endforN.Port( 'min' ) ) +EndOfforNmin = SyrStruct.Link( forNmin , EndOfforN.Port( 'min' ) ) + forNmax = forN.Port( 'max' ) -endforNmax = SyrStruct.Link( forNmax , endforN.Port( 'max' ) ) -endforNDoLoop = endforN.Port( 'DoLoop' ) -forNInitLoop = SyrStruct.Link( endforNDoLoop , forN.Port( 'InitLoop' ) ) -whileNotOneDoLoop = whileNotOne.Port( 'DoLoop' ) -endwhileNotOneDoLoop = SyrStruct.Link( whileNotOneDoLoop , endwhileNotOne.Port( 'DoLoop' ) ) +EndOfforNmax = SyrStruct.Link( forNmax , EndOfforN.Port( 'max' ) ) + whileNotOneSyrComponent = whileNotOne.Port( 'SyrComponent' ) -endwhileNotOneSyrComponent = SyrStruct.Link( whileNotOneSyrComponent , endwhileNotOne.Port( 'SyrComponent' ) ) +EndOfwhileNotOneSyrComponent = SyrStruct.Link( whileNotOneSyrComponent , EndOfwhileNotOne.Port( 'SyrComponent' ) ) + ifNotEvenSyrComponent = SyrStruct.Link( whileNotOneSyrComponent , ifNotEven.Port( 'SyrComponent' ) ) + whileNotOneN = whileNotOne.Port( 'N' ) ifNotEvenN = SyrStruct.Link( whileNotOneN , ifNotEven.Port( 'N' ) ) -ifNotEvenN.AddCoord( 1 , 378 , 438 ) -ifNotEvenN.AddCoord( 2 , 378 , 479 ) + whileNotOneK = whileNotOne.Port( 'K' ) ifNotEvenK = SyrStruct.Link( whileNotOneK , ifNotEven.Port( 'K' ) ) -ifNotEvenK.AddCoord( 1 , 395 , 468 ) -ifNotEvenK.AddCoord( 2 , 395 , 509 ) -endwhileNotOneDoLoop = endwhileNotOne.Port( 'DoLoop' ) -whileNotOneInitLoop = SyrStruct.Link( endwhileNotOneDoLoop , whileNotOne.Port( 'InitLoop' ) ) -endwhileNotOneK = endwhileNotOne.Port( 'K' ) -endforNK = SyrStruct.Link( endwhileNotOneK , endforN.Port( 'K' ) ) -foriDoLoop = fori.Port( 'DoLoop' ) -endforiDoLoop = SyrStruct.Link( foriDoLoop , endfori.Port( 'DoLoop' ) ) + +EndOfwhileNotOneK = EndOfwhileNotOne.Port( 'K' ) +EndOfforNK = SyrStruct.Link( EndOfwhileNotOneK , EndOfforN.Port( 'K' ) ) + forii = fori.Port( 'i' ) -endforii = SyrStruct.Link( forii , endfori.Port( 'i' ) ) +EndOfforii = SyrStruct.Link( forii , EndOffori.Port( 'i' ) ) + foriK = fori.Port( 'K' ) incraaCount = SyrStruct.Link( foriK , incra.Port( 'aCount' ) ) -incraaCount.AddCoord( 1 , 783 , 353 ) -incraaCount.AddCoord( 2 , 783 , 414 ) -endforiDoLoop = endfori.Port( 'DoLoop' ) -foriInitLoop = SyrStruct.Link( endforiDoLoop , fori.Port( 'InitLoop' ) ) -endforiK = endfori.Port( 'K' ) -endifNotEvenK = SyrStruct.Link( endforiK , endifNotEven.Port( 'K' ) ) -whileEvenDoLoop = whileEven.Port( 'DoLoop' ) -endwhileEvenDoLoop = SyrStruct.Link( whileEvenDoLoop , endwhileEven.Port( 'DoLoop' ) ) + +EndOfforiK = EndOffori.Port( 'K' ) +EndOfifNotEvenK = SyrStruct.Link( EndOfforiK , EndOfifNotEven.Port( 'K' ) ) +EndOfifNotEvenK.AddCoord( 1 , 1170 , 396 ) +EndOfifNotEvenK.AddCoord( 2 , 1169 , 275 ) + whileEvenSyrComponent = whileEven.Port( 'SyrComponent' ) -endwhileEvenSyrComponent = SyrStruct.Link( whileEvenSyrComponent , endwhileEven.Port( 'SyrComponent' ) ) +EndOfwhileEvenSyrComponent = SyrStruct.Link( whileEvenSyrComponent , EndOfwhileEven.Port( 'SyrComponent' ) ) + whileEvenN = whileEven.Port( 'N' ) div2anEvenInteger = SyrStruct.Link( whileEvenN , div2.Port( 'anEvenInteger' ) ) -div2anEvenInteger.AddCoord( 1 , 779 , 539 ) -div2anEvenInteger.AddCoord( 2 , 779 , 634 ) + whileEvenK = whileEven.Port( 'K' ) incrbaCount = SyrStruct.Link( whileEvenK , incrb.Port( 'aCount' ) ) -incrbaCount.AddCoord( 1 , 777 , 729 ) -incrbaCount.AddCoord( 2 , 777 , 664 ) -endwhileEvenDoLoop = endwhileEven.Port( 'DoLoop' ) -whileEvenInitLoop = SyrStruct.Link( endwhileEvenDoLoop , whileEven.Port( 'InitLoop' ) ) -endwhileEvenN = endwhileEven.Port( 'N' ) -endifNotEvenN = SyrStruct.Link( endwhileEvenN , endifNotEven.Port( 'N' ) ) -endwhileEvenK = endwhileEven.Port( 'K' ) -endifNotEvenK = SyrStruct.Link( endwhileEvenK , endifNotEven.Port( 'K' ) ) -ifNotEvenDefault = ifNotEven.Port( 'Default' ) -endifNotEvenDefault = SyrStruct.Link( ifNotEvenDefault , endifNotEven.Port( 'Default' ) ) +incrbaCount.AddCoord( 1 , 796 , 655 ) +incrbaCount.AddCoord( 2 , 795 , 543 ) + +EndOfwhileEvenN = EndOfwhileEven.Port( 'N' ) +EndOfifNotEvenN = SyrStruct.Link( EndOfwhileEvenN , EndOfifNotEven.Port( 'N' ) ) +EndOfifNotEvenN.AddCoord( 1 , 1191 , 366 ) +EndOfifNotEvenN.AddCoord( 2 , 1191 , 513 ) + +EndOfwhileEvenK = EndOfwhileEven.Port( 'K' ) +EndOfifNotEvenK = SyrStruct.Link( EndOfwhileEvenK , EndOfifNotEven.Port( 'K' ) ) +EndOfifNotEvenK.AddCoord( 1 , 1169 , 395 ) +EndOfifNotEvenK.AddCoord( 2 , 1170 , 543 ) + ifNotEvenOdd = ifNotEven.Port( 'Odd' ) m3InGate = SyrStruct.Link( ifNotEvenOdd , m3.Port( 'InGate' ) ) -m3InGate.AddCoord( 1 , 585 , 133 ) -m3InGate.AddCoord( 2 , 585 , 438 ) +m3InGate.AddCoord( 1 , 593 , 141 ) +m3InGate.AddCoord( 2 , 593 , 307 ) + foriInGate = SyrStruct.Link( ifNotEvenOdd , fori.Port( 'InGate' ) ) -foriInGate.AddCoord( 1 , 584 , 324 ) -foriInGate.AddCoord( 2 , 584 , 438 ) + ifNotEvenEven = ifNotEven.Port( 'Even' ) whileEvenInGate = SyrStruct.Link( ifNotEvenEven , whileEven.Port( 'InGate' ) ) -whileEvenInGate.AddCoord( 1 , 593 , 574 ) -whileEvenInGate.AddCoord( 2 , 593 , 468 ) +whileEvenInGate.AddCoord( 1 , 593 , 576 ) +whileEvenInGate.AddCoord( 2 , 592 , 339 ) + ifNotEvenSyrComponent = ifNotEven.Port( 'SyrComponent' ) whileEvenSyrComponent = SyrStruct.Link( ifNotEvenSyrComponent , whileEven.Port( 'SyrComponent' ) ) +whileEvenSyrComponent.AddCoord( 1 , 586 , 486 ) +whileEvenSyrComponent.AddCoord( 2 , 587 , 367 ) + ifNotEvenN = ifNotEven.Port( 'N' ) whileEvenN = SyrStruct.Link( ifNotEvenN , whileEven.Port( 'N' ) ) -whileEvenN.AddCoord( 1 , 586 , 634 ) -whileEvenN.AddCoord( 2 , 586 , 498 ) +whileEvenN.AddCoord( 1 , 604 , 513 ) +whileEvenN.AddCoord( 2 , 603 , 397 ) + m3anOddInteger = SyrStruct.Link( ifNotEvenN , m3.Port( 'anOddInteger' ) ) -m3anOddInteger.AddCoord( 1 , 579 , 163 ) -m3anOddInteger.AddCoord( 2 , 579 , 498 ) +m3anOddInteger.AddCoord( 1 , 604 , 107 ) +m3anOddInteger.AddCoord( 2 , 604 , 395 ) + ifNotEvenK = ifNotEven.Port( 'K' ) whileEvenK = SyrStruct.Link( ifNotEvenK , whileEven.Port( 'K' ) ) -whileEvenK.AddCoord( 1 , 580 , 664 ) -whileEvenK.AddCoord( 2 , 580 , 528 ) +whileEvenK.AddCoord( 1 , 621 , 544 ) +whileEvenK.AddCoord( 2 , 622 , 426 ) + foriK = SyrStruct.Link( ifNotEvenK , fori.Port( 'K' ) ) -foriK.AddCoord( 1 , 599 , 414 ) -foriK.AddCoord( 2 , 599 , 528 ) -endifNotEvenN = endifNotEven.Port( 'N' ) -endwhileNotOneN = SyrStruct.Link( endifNotEvenN , endwhileNotOne.Port( 'N' ) ) -endwhileNotOneN.AddCoord( 1 , 1324 , 514 ) -endwhileNotOneN.AddCoord( 2 , 1324 , 483 ) -endifNotEvenK = endifNotEven.Port( 'K' ) -endwhileNotOneK = SyrStruct.Link( endifNotEvenK , endwhileNotOne.Port( 'K' ) ) -endwhileNotOneK.AddCoord( 1 , 1318 , 544 ) -endwhileNotOneK.AddCoord( 2 , 1318 , 513 ) +foriK.AddCoord( 1 , 622 , 275 ) +foriK.AddCoord( 2 , 622 , 426 ) + +ifNotEvenDefault = ifNotEven.Port( 'Default' ) +EndOfifNotEvenDefault = SyrStruct.Link( ifNotEvenDefault , EndOfifNotEven.Port( 'Default' ) ) +EndOfifNotEvenDefault.AddCoord( 1 , 1204 , 429 ) +EndOfifNotEvenDefault.AddCoord( 2 , 1203 , 12 ) +EndOfifNotEvenDefault.AddCoord( 3 , 581 , 13 ) +EndOfifNotEvenDefault.AddCoord( 4 , 581 , 458 ) + +EndOfifNotEvenN = EndOfifNotEven.Port( 'N' ) +EndOfwhileNotOneN = SyrStruct.Link( EndOfifNotEvenN , EndOfwhileNotOne.Port( 'N' ) ) + +EndOfifNotEvenK = EndOfifNotEven.Port( 'K' ) +EndOfwhileNotOneK = SyrStruct.Link( EndOfifNotEvenK , EndOfwhileNotOne.Port( 'K' ) ) # Creation of Input datas +SyrComponentaContainer = SyrComponent.Input( 'aContainer' , 'FactoryServer') +SyrComponentaComponent = SyrComponent.Input( 'aComponent' , 'SyrComponent') forNN = forN.Input( 'N' , 0) + forNK = forN.Input( 'K' , 0) -FactoryServerSyrComponent = SyrStruct.ComponentRef( 'FactoryServer' , 'SyrComponent' ) -forNSyrComponent.Input( FactoryServerSyrComponent ) forNmin = forN.Input( 'min' , 5) forNmax = forN.Input( 'max' , 9) forii = fori.Input( 'i' , 0) # Creation of Output variables -endforNN = endforN.Port( 'N' ) -endforNK = endforN.Port( 'K' ) -endforNSyrComponent = endforN.Port( 'SyrComponent' ) -endforNmin = endforN.Port( 'min' ) -endforNmax = endforN.Port( 'max' ) -endwhileNotOneSyrComponent = endwhileNotOne.Port( 'SyrComponent' ) -endwhileNotOneN = endwhileNotOne.Port( 'N' ) -endforii = endfori.Port( 'i' ) -endwhileEvenSyrComponent = endwhileEven.Port( 'SyrComponent' ) - +EndOfforNN = EndOfforN.Port( 'N' ) +EndOfforNK = EndOfforN.Port( 'K' ) +EndOfforNSyrComponent = EndOfforN.Port( 'SyrComponent' ) +EndOfforNmin = EndOfforN.Port( 'min' ) +EndOfforNmax = EndOfforN.Port( 'max' ) +EndOfwhileNotOneSyrComponent = EndOfwhileNotOne.Port( 'SyrComponent' ) +EndOfwhileNotOneN = EndOfwhileNotOne.Port( 'N' ) +EndOfforii = EndOffori.Port( 'i' ) +EndOfwhileEvenSyrComponent = EndOfwhileEven.Port( 'SyrComponent' ) SyrStruct.Run() SyrStruct.DoneW() -SyrStruct.State() +print SyrStruct.State() SyrStruct.PrintPorts() +SyrStruct.Export( '/tmp/SyrStruct.xml' ) + +SyrStruct = Graph( '/tmp/SyrStruct.xml' ) + +SyrStruct.Run() + +SyrStruct.DoneW() + +print SyrStruct.State() + diff --git a/examples/SyrStruct.xml b/examples/SyrStruct.xml index ffa8982..f5ca1dc 100644 --- a/examples/SyrStruct.xml +++ b/examples/SyrStruct.xml @@ -1,1562 +1,1157 @@ - - - - - + - - - ? - ? - SyrStruct - 1 - ? - - SyrStruct - - - long - forN\N - - - long - forN\K - - - long - forN\min - - - long - forN\max - - - long - fori\i - - - string - SyrComponent\aContainer - - - string - SyrComponent\aComponent - - - - - long - endforN\N - - - long - endforN\K - - - objref - endforN\SyrComponent - - - long - endforN\min - - - long - endforN\max - - - objref - endwhileNotOne\SyrComponent - - - long - endwhileNotOne\N - - - long - endfori\i - - - objref - endwhileEven\SyrComponent - - - - - - - - 14/3/2003 - 11:15:16 - 14/3/2003 - 11:16:1 - 1.04 - JR - ? - Syracuse algorithm - 0 - 0 - - - - - - SyrComponent - SyrComponent - m3 - 0 - ? - - C_M3 - - - long - anOddInteger - - - - - long - anInteger - - - - - - - - 14/3/2003 - 11:15:16 - 14/3/2003 - 11:15:16 - 1.04 - ? - localhost/FactoryServer - ? - 678 - 11 - - - SyrComponent - SyrComponent - m3incr - 0 - ? - - C_INCR - - - long - aCount - - - - - long - aNewCount - - - - - - - - 14/3/2003 - 11:15:16 - 14/3/2003 - 11:15:16 - 1.04 - ? - localhost/FactoryServer - ? - 896 - 10 - - - SyrComponent - SyrComponent - incra - 0 - ? - - C_INCR - - - long - aCount - - - - - long - aNewCount - - - - - - - - 14/3/2003 - 11:15:16 - 14/3/2003 - 11:15:16 - 1.04 - ? - localhost/FactoryServer - ? - 789 - 201 - - - SyrComponent - SyrComponent - div2 - 0 - ? - - C_DIV2 - - - long - anEvenInteger - - - - - long - anInteger - - - - - - - - 14/3/2003 - 11:15:16 - 14/3/2003 - 11:15:16 - 1.04 - ? - localhost/FactoryServer - ? - 792 - 387 - - - SyrComponent - SyrComponent - incrb - 0 - ? - - C_INCR - - - long - aCount - - - - - long - aNewCount - - - - - - - - 14/3/2003 - 11:15:16 - 14/3/2003 - 11:15:16 - 1.04 - ? - localhost/FactoryServer - ? - 796 - 577 - - - ? - ? - forN - 4 - endforN - - InitN - - - long - N - - - long - K - - - objref - SyrComponent - - - long - min - - - long - max - - - - - long - N - - - long - K - - - objref - SyrComponent - - - long - min - - - long - max - - - - - - - - InitN - def InitN( NN , K , SyrComponent , min , max ) : - N = max - if min > 0 : - if max >= min : - N = min - return N,K,SyrComponent,min,max - - - MoreN - def MoreN( NN , KK , SyrComponent , min , max ) : - N = 0 - OutLoop = 0 - if max > NN : - N = NN - OutLoop = 1 - return OutLoop,N,0,SyrComponent,min,max - - - NextN - def NextN( NN , KK , SyrComponent , min , max ) : - N = NN + 1 - K = KK - return N,K,SyrComponent,min,max - - - 14/3/2003 - 11:15:16 - 14/3/2003 - 11:15:16 - 1.04 - ? - ? - ? - 21 - 242 - - - ? - ? - endforN - 5 - forN - - EndInitN - - - long - N - - - long - K - - - objref - SyrComponent - - - long - min - - - long - max - - - - - long - N - - - long - K - - - objref - SyrComponent - - - long - min - - - long - max - - - - - - - - - - 14/3/2003 - 11:15:16 - 14/3/2003 - 11:15:16 - 1.04 - ? - ? - ? - 1530 - 332 - - - ? - ? - whileNotOne - 4 - endwhileNotOne - - InitNotOne - - - objref - SyrComponent - - - long - N - - - long - K - - - - - objref - SyrComponent - - - long - N - - - long - K - - - - - - - - InitNotOne - import threading - import SyrComponent_idl - def InitNotOne( SyrComponent , N , K ) : - return SyrComponent,N,K - - - MoreNotOne - import SyrComponent_idl - def MoreNotOne( SyrComponent , N , K ) : - OutLoop = 1 - SyrComponent.C_ISONE( N ) - return OutLoop,SyrComponent,N,K - - - NextNotOne - import SyrComponent_idl - def NextNotOne( SyrComponent , N , K ) : - return SyrComponent,N,K - - - 14/3/2003 - 11:15:26 - 14/3/2003 - 11:15:26 - 1.04 - ? - ? - ? - 210 - 297 - - - ? - ? - endwhileNotOne - 5 - whileNotOne - - EndInitNotOn - - - objref - SyrComponent - - - long - N - - - long - K - - - - - objref - SyrComponent - - - long - N - - - long - K - - - - - - - - - - 14/3/2003 - 11:15:26 - 14/3/2003 - 11:15:26 - 1.04 - ? - ? - ? - 1340 - 332 - - - ? - ? - fori - 4 - endfori - - Initfori - - - long - i - - - long - K - - - - - long - i - - - long - K - - - - - - - - Initfori - def Initfori( ii , K ) : - return 1,0,K - - - Morefori - def Morefori( ii , K ) : - OutLoop = 0 - if 2 > ii : - OutLoop = 1 - return OutLoop,ii,K - - - Nextfori - def Nextfori( ii , K ) : - ii = ii + 1 - return ii,K - - - 14/3/2003 - 11:15:26 - 14/3/2003 - 11:15:26 - 1.04 - ? - ? - ? - 605 - 202 - - - ? - ? - endfori - 5 - fori - - EndInitfori - - - long - i - - - long - K - - - - - long - i - - - long - K - - - - - - - - - - 14/3/2003 - 11:15:26 - 14/3/2003 - 11:15:26 - 1.04 - ? - ? - ? - 971 - 202 - - - ? - ? - whileEven - 4 - endwhileEven - - InitEven - - - objref - SyrComponent - - - long - N - - - long - K - - - - - objref - SyrComponent - - - long - N - - - long - K - - - - - - - - InitEven - import SyrComponent_idl - def InitEven( SyrComponent , N , K ) : - return SyrComponent,N,K - - - MoreEven - import SyrComponent_idl - def MoreEven( SyrComponent , N , K ) : - OutLoop = SyrComponent.C_ISEVEN( N ) - return OutLoop,SyrComponent,N,K - - - NextEven - import SyrComponent_idl - def NextEven( SyrComponent , N , K ) : - return SyrComponent,N,K - - - 14/3/2003 - 11:15:35 - 14/3/2003 - 11:15:35 - 1.04 - ? - ? - ? - 605 - 452 - - - ? - ? - endwhileEven - 5 - whileEven - - EndInitEven - - - objref - SyrComponent - - - long - N - - - long - K - - - - - objref - SyrComponent - - - long - N - - - long - K - - - - - - - - - - 14/3/2003 - 11:15:35 - 14/3/2003 - 11:15:35 - 1.04 - ? - ? - ? - 974 - 450 - - - ? - ? - ifNotEven - 6 - endifNotEven - - ifNotEven - - - objref - SyrComponent - - - long - N - - - long - K - - - - - long - Odd - - - long - Even - - - objref - SyrComponent - - - long - N - - - long - K - - - - - - - - ifNotEven - import SyrComponent_idl - def ifNotEven( SyrComponent , N , K ) : - Even = SyrComponent.C_ISEVEN( N ) - Odd = 1 - Even - return Odd,Even,SyrComponent,N,K - - - 14/3/2003 - 11:15:35 - 14/3/2003 - 11:15:35 - 1.04 - ? - ? - ? - 416 - 286 - - - ? - ? - endifNotEven - 7 - ifNotEven - - EndifNotEven - - - long - N - - - long - K - - - - - long - N - - - long - K - - - - - - - - - - 14/3/2003 - 11:15:35 - 14/3/2003 - 11:15:35 - 1.04 - ? - ? - ? - 1155 - 331 - - - ? - ? - SyrComponent - 3 - ? - - SyrComponent - - - string - aContainer - - - string - aComponent - - - - - objref - SyrComponentobjref - - - - - - - - SyrComponent - from LifeCycleCORBA import * - def SyrComponent( aContainer , aComponent ) : - orb = CORBA.ORB_init([], CORBA.ORB_ID) - lcc = LifeCycleCORBA(orb) - print "SyrComponent(",aContainer,",",aComponent,")" - ComponentRef = lcc.FindOrLoadComponent( aContainer , aComponent ) - print "SyrComponent(",aContainer,",",aComponent,") --> ",ComponentRef - return ComponentRef - - - 14/3/2003 - 11:16:1 - 14/3/2003 - 11:16:1 - 1.04 - ? - ? - ? - 0 - 0 - - - - - - m3 - anInteger - m3incr - aCount - - - - - m3incr - aNewCount - endifNotEven - N - - - - - incra - aNewCount - endfori - K - - - 953 - 414 - - - 953 - 353 - - - - - div2 - anInteger - endwhileEven - N - - - 960 - 632 - - - 960 - 539 - - - - - incrb - aNewCount - endwhileEven - K - - - 963 - 662 - - - 963 - 729 - - - - - forN - DoLoop - endforN - DoLoop - - - - - forN - N - endforN - N - - - 1554 - 513 - - - 1523 - 513 - - - 1523 - 806 - - - 202 - 806 - - - 202 - 424 - - - - - forN - N - whileNotOne - N - - - 200 - 479 - - - 200 - 424 - - - - - forN - K - whileNotOne - K - - - 187 - 509 - - - 187 - 454 - - - - - forN - SyrComponent - endforN - SyrComponent - - - - - forN - SyrComponent - whileNotOne - SyrComponent - - - - - forN - min - endforN - min - - - - - forN - max - endforN - max - - - - - endforN - DoLoop - forN - InitLoop - - - - - whileNotOne - DoLoop - endwhileNotOne - DoLoop - - - - - whileNotOne - SyrComponent - endwhileNotOne - SyrComponent - - - - - whileNotOne - SyrComponent - ifNotEven - SyrComponent - - - - - whileNotOne - N - ifNotEven - N - - - 378 - 438 - - - 378 - 479 - - - - - whileNotOne - K - ifNotEven - K - - - 395 - 468 - - - 395 - 509 - - - - - endwhileNotOne - DoLoop - whileNotOne - InitLoop - - - - - endwhileNotOne - K - endforN - K - - - - - fori - DoLoop - endfori - DoLoop - - - - - fori - i - endfori - i - - - - - fori - K - incra - aCount - - - 783 - 353 - - - 783 - 414 - - - - - endfori - DoLoop - fori - InitLoop - - - - - endfori - K - endifNotEven - K - - - - - whileEven - DoLoop - endwhileEven - DoLoop - - - - - whileEven - SyrComponent - endwhileEven - SyrComponent - - - - - whileEven - N - div2 - anEvenInteger - - - 779 - 539 - - - 779 - 634 - - - - - whileEven - K - incrb - aCount - - - 777 - 729 - - - 777 - 664 - - - - - endwhileEven - DoLoop - whileEven - InitLoop - - - - - endwhileEven - N - endifNotEven - N - - - - - endwhileEven - K - endifNotEven - K - - - - - ifNotEven - Default - endifNotEven - Default - - - - - ifNotEven - Odd - m3 - InGate - - - 585 - 133 - - - 585 - 438 - - - - - ifNotEven - Odd - fori - InGate - - - 584 - 324 - - - 584 - 438 - - - - - ifNotEven - Even - whileEven - InGate - - - 593 - 574 - - - 593 - 468 - - - - - ifNotEven - SyrComponent - whileEven - SyrComponent - - - - - ifNotEven - N - whileEven - N - - - 586 - 634 - - - 586 - 498 - - - - - ifNotEven - N - m3 - anOddInteger - - - 579 - 163 - - - 579 - 498 - - - - - ifNotEven - K - whileEven - K - - - 580 - 664 - - - 580 - 528 - - - - - ifNotEven - K - fori - K - - - 599 - 414 - - - 599 - 528 - - - - - endifNotEven - N - endwhileNotOne - N - - - 1324 - 514 - - - 1324 - 483 - - - - - endifNotEven - K - endwhileNotOne - K - - - 1318 - 544 - - - 1318 - 513 - - - - - SyrComponent - SyrComponentobjref - forN - SyrComponent - - - - - - - - SyrStruct - forN\N - forN - N - - 3 - 0 - - - - - - SyrStruct - forN\K - forN - K - - 3 - 0 - - - - - - SyrStruct - forN\min - forN - min - - 3 - 5 - - - - - - SyrStruct - forN\max - forN - max - - 3 - 9 - - - - - - SyrStruct - fori\i - fori - i - - 3 - 0 - - - - - - SyrStruct - SyrComponent\aContainer - SyrComponent - aContainer - - 18 - FactoryServer - - - - - - SyrStruct - SyrComponent\aComponent - SyrComponent - aComponent - - 18 - SyrComponent - - - - - - - + + +? + ? + SyrStruct + 1 + ? + +SyrStruct + + +string + SyrComponent\aContainer + +string + SyrComponent\aComponent + +long + forN\N + +long + forN\K + +long + forN\min + +long + forN\max + +long + fori\i + + +long + EndOfforN\N + +long + EndOfforN\K + +objref + EndOfforN\SyrComponent + +long + EndOfforN\min + +long + EndOfforN\max + +objref + EndOfwhileNotOne\SyrComponent + +long + EndOfwhileNotOne\N + +long + EndOffori\i + +objref + EndOfwhileEven\SyrComponent + + + 4/8/2003 - 17:56:20 + 1/10/2003 - 17:39:29 + 1.04 + JR + ? + Syracuse algorithm + 0 + 0 + + +SyrComponent + SyrComponent + m3 + 0 + ? + +C_M3 + + +long + anOddInteger + + +long + anInteger + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + localhost/FactoryServer + C_M3 from SyrComponent + 672 + 28 + +SyrComponent + SyrComponent + m3incr + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 898 + 29 + +SyrComponent + SyrComponent + incra + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 803 + 195 + +SyrComponent + SyrComponent + div2 + 0 + ? + +C_DIV2 + + +long + anEvenInteger + + +long + anInteger + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + localhost/FactoryServer + C_DIV2 from SyrComponent + 810 + 435 + +SyrComponent + SyrComponent + incrb + 0 + ? + +C_INCR + + +long + aCount + + +long + aNewCount + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + localhost/FactoryServer + C_INCR from SyrComponent + 809 + 574 + +? + ? + SyrComponent + 3 + ? + +SyrComponent + + +string + aContainer + +string + aComponent + + +objref + SyrComponentobjref + + + +SyrComponent + + + + + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + ? + SyrComponent( aContainer , aComponent ) + 0 + 0 + +? + ? + forN + 4 + EndOfforN + +forN + + +long + N + +long + K + +objref + SyrComponent + +long + min + +long + max + + +long + N + +long + K + +objref + SyrComponent + +long + min + +long + max + + + +InitN + + + 0 : ]]> + = min : ]]> + + + +MoreN + + + + NN : ]]> + + + +NextN + + + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + ? + InitN , MoreN , NextN + 20 + 302 + +? + ? + EndOfforN + 5 + forN + +EndOfforN + + +long + N + +long + K + +objref + SyrComponent + +long + min + +long + max + + +long + N + +long + K + +objref + SyrComponent + +long + min + +long + max + + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + ? + ? + 1535 + 332 + +? + ? + whileNotOne + 4 + EndOfwhileNotOne + +whileNotOne + + +objref + SyrComponent + +long + N + +long + K + + +objref + SyrComponent + +long + N + +long + K + + + +InitNotOne + + + + + +MoreNotOne + + + + + +NextNotOne + + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + ? + InitNotOne , MoreNotOne , NextNotOne + 212 + 274 + +? + ? + EndOfwhileNotOne + 5 + whileNotOne + +EndOfwhileNotOne + + +objref + SyrComponent + +long + N + +long + K + + +objref + SyrComponent + +long + N + +long + K + + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + ? + ? + 1366 + 303 + +? + ? + fori + 4 + EndOffori + +fori + + +long + i + +long + K + + +long + i + +long + K + + + +Initfori + + + +Morefori + + + ii :]]> + + + +Nextfori + + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + ? + Initfori, Morefori, Nextfori + 635 + 212 + +? + ? + EndOffori + 5 + fori + +EndOffori + + +long + i + +long + K + + +long + i + +long + K + + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + ? + ? + 976 + 212 + +? + ? + whileEven + 4 + EndOfwhileEven + +whileEven + + +objref + SyrComponent + +long + N + +long + K + + +objref + SyrComponent + +long + N + +long + K + + + +InitEven + + + + +MoreEven + + + + + +NextEven + + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + ? + InitEven, MoreEven, NextEven + 632 + 451 + +? + ? + EndOfwhileEven + 5 + whileEven + +EndOfwhileEven + + +objref + SyrComponent + +long + N + +long + K + + +objref + SyrComponent + +long + N + +long + K + + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + ? + ? + 988 + 451 + +? + ? + ifNotEven + 6 + EndOfifNotEven + +ifNotEven + + +objref + SyrComponent + +long + N + +long + K + + +long + Odd + +long + Even + +objref + SyrComponent + +long + N + +long + K + + + +ifNotEven + + + + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + ? + ifNotEven + 418 + 274 + +? + ? + EndOfifNotEven + 7 + ifNotEven + +EndOfifNotEven + + +long + N + +long + K + + +long + N + +long + K + + + + 1/10/2003 - 17:39:29 + 1/10/2003 - 17:39:29 + 1.04 + ? + ? + ? + 1205 + 331 + + +m3 + anInteger + m3incr + aCount + + +m3incr + aNewCount + EndOfifNotEven + N + + +1190 + 366 + +1191 + 109 + +incra + aNewCount + EndOffori + K + + +div2 + anInteger + EndOfwhileEven + N + + +incrb + aNewCount + EndOfwhileEven + K + + +988 + 543 + +988 + 654 + +SyrComponent + SyrComponentobjref + forN + SyrComponent + + +13 + 394 + +12 + 181 + +196 + 181 + +197 + 81 + +forN + DoLoop + EndOfforN + DoLoop + + +forN + N + whileNotOne + N + + +forN + N + EndOfforN + N + + +forN + K + whileNotOne + K + + +forN + SyrComponent + EndOfforN + SyrComponent + + +forN + SyrComponent + whileNotOne + SyrComponent + + +192 + 309 + +191 + 394 + +forN + min + EndOfforN + min + + +forN + max + EndOfforN + max + + +EndOfforN + DoLoop + forN + InitLoop + + +whileNotOne + DoLoop + EndOfwhileNotOne + DoLoop + + +whileNotOne + SyrComponent + EndOfwhileNotOne + SyrComponent + + +whileNotOne + SyrComponent + ifNotEven + SyrComponent + + +whileNotOne + N + ifNotEven + N + + +whileNotOne + K + ifNotEven + K + + +EndOfwhileNotOne + DoLoop + whileNotOne + InitLoop + + +EndOfwhileNotOne + K + EndOfforN + K + + +fori + DoLoop + EndOffori + DoLoop + + +fori + i + EndOffori + i + + +fori + K + incra + aCount + + +EndOffori + DoLoop + fori + InitLoop + + +EndOffori + K + EndOfifNotEven + K + + +1170 + 396 + +1169 + 275 + +whileEven + DoLoop + EndOfwhileEven + DoLoop + + +whileEven + SyrComponent + EndOfwhileEven + SyrComponent + + +whileEven + N + div2 + anEvenInteger + + +whileEven + K + incrb + aCount + + +796 + 655 + +795 + 543 + +EndOfwhileEven + DoLoop + whileEven + InitLoop + + +EndOfwhileEven + N + EndOfifNotEven + N + + +1191 + 366 + +1191 + 513 + +EndOfwhileEven + K + EndOfifNotEven + K + + +1169 + 395 + +1170 + 543 + +ifNotEven + Odd + m3 + InGate + + +593 + 141 + +593 + 307 + +ifNotEven + Odd + fori + InGate + + +ifNotEven + Even + whileEven + InGate + + +593 + 576 + +592 + 339 + +ifNotEven + SyrComponent + whileEven + SyrComponent + + +586 + 486 + +587 + 367 + +ifNotEven + N + whileEven + N + + +604 + 513 + +603 + 397 + +ifNotEven + N + m3 + anOddInteger + + +604 + 107 + +604 + 395 + +ifNotEven + K + whileEven + K + + +621 + 544 + +622 + 426 + +ifNotEven + K + fori + K + + +622 + 275 + +622 + 426 + +ifNotEven + Default + EndOfifNotEven + Default + + +1204 + 429 + +1203 + 12 + +581 + 13 + +581 + 458 + +EndOfifNotEven + N + EndOfwhileNotOne + N + + +EndOfifNotEven + K + EndOfwhileNotOne + K + + + +SyrStruct + SyrComponent\aContainer + SyrComponent + aContainer + +18 + FactoryServer + + +SyrStruct + SyrComponent\aComponent + SyrComponent + aComponent + +18 + SyrComponent + + +SyrStruct + forN\N + forN + N + +3 + 0 + + +SyrStruct + forN\K + forN + K + +3 + 0 + + +SyrStruct + forN\min + forN + min + +3 + 5 + + +SyrStruct + forN\max + forN + max + +3 + 9 + + +SyrStruct + fori\i + fori + i + +3 + 0 + diff --git a/examples/TestSupervMedfieldLoopFori.py b/examples/TestSupervMedfieldLoopFori.py new file mode 100755 index 0000000..70339b9 --- /dev/null +++ b/examples/TestSupervMedfieldLoopFori.py @@ -0,0 +1,159 @@ + +# Generated python file of Graph LoopGraph + +from SuperV import * +# Graph creation +LoopGraph = Graph( 'LoopGraph' ) +LoopGraph.SetName( 'LoopGraph' ) +LoopGraph.SetAuthor( '' ) +LoopGraph.SetComment( '' ) +LoopGraph.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +Mul = LoopGraph.FNode( 'Calculator' , 'Calculator' , 'Mul' ) +Mul.SetName( 'Mul' ) +Mul.SetAuthor( 'LD' ) +Mul.SetContainer( 'localhost/FactoryServer' ) +Mul.SetComment( 'Multiply a field by a constant' ) +Mul.Coords( 429 , 46 ) + +# Creation of InLine Nodes +PyInitDisplay = [] +PyInitDisplay.append( 'from VISU import * ' ) +PyInitDisplay.append( 'import SALOMEDS ' ) +PyInitDisplay.append( 'from LifeCycleCORBA import * ' ) +PyInitDisplay.append( 'from SALOME_NamingServicePy import * ' ) +PyInitDisplay.append( 'def InitDisplay(): ' ) +PyInitDisplay.append( ' # initialize the ORB ' ) +PyInitDisplay.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) +PyInitDisplay.append( ' # create an LifeCycleCORBA instance ' ) +PyInitDisplay.append( ' lcc = LifeCycleCORBA(orb) ' ) +PyInitDisplay.append( ' # ----------------------------------------- ' ) +PyInitDisplay.append( ' # Visualization parameters ' ) +PyInitDisplay.append( ' #create a naming service instance ' ) +PyInitDisplay.append( ' naming_service = SALOME_NamingServicePy_i(orb) ' ) +PyInitDisplay.append( ' # get Study Manager reference ' ) +PyInitDisplay.append( ' obj = naming_service.Resolve("myStudyManager") ' ) +PyInitDisplay.append( ' myStudyManager = obj._narrow(SALOMEDS.StudyManager) ' ) +PyInitDisplay.append( ' myStudy = myStudyManager.GetStudyByID(1) ' ) +PyInitDisplay.append( ' aVisu = lcc.FindOrLoadComponent("FactoryServer", "Visu") ' ) +PyInitDisplay.append( ' print "InitDisplay --> aVisu = ",aVisu ' ) +PyInitDisplay.append( ' aVisu.SetCurrentStudy(myStudy); ' ) +PyInitDisplay.append( ' aViewManager = aVisu.GetViewManager() ' ) +PyInitDisplay.append( ' print "InitDisplay --> aViewManager = ",aViewManager ' ) +PyInitDisplay.append( ' aView = aViewManager.Create3DView() ' ) +PyInitDisplay.append( ' print "InitDisplay --> aView = ",aView ' ) +PyInitDisplay.append( ' return aVisu,aView ' ) +InitDisplay = LoopGraph.INode( 'InitDisplay' , PyInitDisplay ) +InitDisplay.OutPort( 'aVisu' , 'objref' ) +InitDisplay.OutPort( 'aView' , 'objref' ) +InitDisplay.SetName( 'InitDisplay' ) +InitDisplay.SetAuthor( '' ) +InitDisplay.SetComment( 'Compute Node' ) +InitDisplay.Coords( 1 , 105 ) + +# Creation of Loop Nodes +PyInit = [] +PyInit.append( 'def Init(index,min,max,medfield,x1,aVisu,aView): ' ) +PyInit.append( ' if max >= min : ' ) +PyInit.append( ' index = min ' ) +PyInit.append( ' else : ' ) +PyInit.append( ' index = max ' ) +PyInit.append( ' print "Init --> index = ",index ' ) +PyInit.append( ' print " min = ",min ' ) +PyInit.append( ' print " max = ",max ' ) +PyInit.append( ' print " medfield = ",medfield ' ) +PyInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) +PyMoreInit = [] +PyMoreInit.append( 'def More(index,min,max,medfield,x1,aVisu,aView): ' ) +PyMoreInit.append( ' if max >= index : ' ) +PyMoreInit.append( ' DoLoop = 1 ' ) +PyMoreInit.append( ' else : ' ) +PyMoreInit.append( ' DoLoop = 0 ' ) +PyMoreInit.append( ' print "More --> DoLoop = ",DoLoop ' ) +PyMoreInit.append( ' print " index = ",index ' ) +PyMoreInit.append( ' print " min = ",min ' ) +PyMoreInit.append( ' print " max = ",max ' ) +PyMoreInit.append( ' print " medfield = ",medfield ' ) +PyMoreInit.append( ' return DoLoop,index,min,max,medfield,x1,aVisu,aView ' ) +PyNextInit = [] +PyNextInit.append( 'def Next(index,min,max,medfield,x1,aVisu,aView): ' ) +PyNextInit.append( ' index = index + 1 ' ) +PyNextInit.append( ' print "Next --> index = ",index ' ) +PyNextInit.append( ' print " min = ",min ' ) +PyNextInit.append( ' print " max = ",max ' ) +PyNextInit.append( ' print " medfield = ",medfield ' ) +PyNextInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) +Init,EndInit = LoopGraph.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) +EndInit.SetName( 'EndInit' ) +EndInit.SetAuthor( 'LD' ) +EndInit.SetComment( 'no comment' ) +EndInit.Coords( 631 , 5 ) +Init.InPort( 'index' , 'long' ) +Init.InPort( 'min' , 'long' ) +Init.InPort( 'max' , 'long' ) +Init.InPort( 'medfield' , 'objref' ) +Init.InPort( 'x1' , 'double' ) +Init.InPort( 'aVisu' , 'objref' ) +Init.InPort( 'aView' , 'objref' ) +Init.OutPort( 'index' , 'long' ) +Init.OutPort( 'min' , 'long' ) +Init.OutPort( 'max' , 'long' ) +Init.OutPort( 'medfield' , 'objref' ) +Init.OutPort( 'x1' , 'double' ) +Init.OutPort( 'aVisu' , 'objref' ) +Init.OutPort( 'aView' , 'objref' ) +Init.SetName( 'Init' ) +Init.SetAuthor( 'LD' ) +Init.SetComment( 'no comment' ) +Init.Coords( 216 , 5 ) + +# Creation of Links +InitDisplayaVisu = InitDisplay.Port( 'aVisu' ) +InitaVisu = LoopGraph.Link( InitDisplayaVisu , Init.Port( 'aVisu' ) ) + +InitDisplayaView = InitDisplay.Port( 'aView' ) +InitaView = LoopGraph.Link( InitDisplayaView , Init.Port( 'aView' ) ) + +Initindex = Init.Port( 'index' ) +EndInitindex = LoopGraph.Link( Initindex , EndInit.Port( 'index' ) ) + +Initmin = Init.Port( 'min' ) +EndInitmin = LoopGraph.Link( Initmin , EndInit.Port( 'min' ) ) + +Initmax = Init.Port( 'max' ) +EndInitmax = LoopGraph.Link( Initmax , EndInit.Port( 'max' ) ) + +Initmedfield = Init.Port( 'medfield' ) +Mulfield1 = LoopGraph.Link( Initmedfield , Mul.Port( 'field1' ) ) + +Initx1 = Init.Port( 'x1' ) +EndInitx1 = LoopGraph.Link( Initx1 , EndInit.Port( 'x1' ) ) + +Mulx1 = LoopGraph.Link( Initx1 , Mul.Port( 'x1' ) ) + +InitaVisu = Init.Port( 'aVisu' ) +EndInitaVisu = LoopGraph.Link( InitaVisu , EndInit.Port( 'aVisu' ) ) + +InitaView = Init.Port( 'aView' ) +EndInitaView = LoopGraph.Link( InitaView , EndInit.Port( 'aView' ) ) + +Mulreturn = Mul.Port( 'return' ) +EndInitmedfield = LoopGraph.Link( Mulreturn , EndInit.Port( 'medfield' ) ) + +# Creation of Input datas +Initindex = Init.Input( 'index' , 0) +Initmin = Init.Input( 'min' , 0) +Initmax = Init.Input( 'max' , 55) +Initmedfield = Init.Input( 'medfield' , 'IOR:010000001f00000049444c3a53414c4f4d455f4d45442f4649454c44444f55424c453a312e300000010000000000000026000000010100000a0000003132372e302e302e3100ead00e000000fe1948673f000058e60000000021') +Initx1 = Init.Input( 'x1' , 2) + +# Creation of Output variables +EndInitindex = EndInit.Port( 'index' ) +EndInitmin = EndInit.Port( 'min' ) +EndInitmax = EndInit.Port( 'max' ) +EndInitmedfield = EndInit.Port( 'medfield' ) +EndInitx1 = EndInit.Port( 'x1' ) +EndInitaVisu = EndInit.Port( 'aVisu' ) +EndInitaView = EndInit.Port( 'aView' ) diff --git a/examples/TestSupervMedfieldLoopFori.xml b/examples/TestSupervMedfieldLoopFori.xml new file mode 100755 index 0000000..3641c63 --- /dev/null +++ b/examples/TestSupervMedfieldLoopFori.xml @@ -0,0 +1,438 @@ + + + + +? + ? + LoopGraph + 1 + ? + +LoopGraph + + +long + Init\index + +long + Init\min + +long + Init\max + +objref + Init\medfield + +double + Init\x1 + + +long + EndInit\index + +long + EndInit\min + +long + EndInit\max + +objref + EndInit\medfield + +double + EndInit\x1 + +objref + EndInit\aVisu + +objref + EndInit\aView + + + 15/9/2003 - 15:25:24 + 19/9/2003 - 16:0:10 + 1.04 + ? + ? + ? + 0 + 0 + + +? + ? + InitDisplay + 3 + ? + +InitDisplay + + + +objref + aVisu + +objref + aView + + + +InitDisplay + + + + + + + + + + + + + + + + + + + aVisu = ",aVisu ]]> + + + aViewManager = ",aViewManager ]]> + + aView = ",aView ]]> + + 19/9/2003 - 16:0:9 + 19/9/2003 - 16:0:9 + 1.04 + ? + ? + Compute Node + 1 + 105 + +? + ? + Init + 4 + EndInit + +Init + + +long + index + +long + min + +long + max + +objref + medfield + +double + x1 + +objref + aVisu + +objref + aView + + +long + index + +long + min + +long + max + +objref + medfield + +double + x1 + +objref + aVisu + +objref + aView + + + +Init + + = min : ]]> + + + + index = ",index ]]> + + + + + +More + + = index : ]]> + + + + DoLoop = ",DoLoop ]]> + + + + + + +Next + + + index = ",index ]]> + + + + + 19/9/2003 - 16:0:9 + 19/9/2003 - 16:0:9 + 1.04 + LD + ? + no comment + 216 + 5 + +? + ? + EndInit + 5 + Init + +EndInit + + +long + index + +long + min + +long + max + +objref + medfield + +double + x1 + +objref + aVisu + +objref + aView + + +long + index + +long + min + +long + max + +objref + medfield + +double + x1 + +objref + aVisu + +objref + aView + + + + 19/9/2003 - 16:0:9 + 19/9/2003 - 16:0:9 + 1.04 + LD + ? + no comment + 631 + 5 + +Calculator + Calculator + Mul + 0 + ? + +Mul + + +FIELDDOUBLE + field1 + +double + x1 + + +FIELDDOUBLE + return + + + 19/9/2003 - 16:0:10 + 19/9/2003 - 16:0:10 + 1.04 + LD + localhost/FactoryServer + Multiply a field by a constant + 429 + 46 + + +InitDisplay + aVisu + Init + aVisu + + +InitDisplay + aView + Init + aView + + +Init + DoLoop + EndInit + DoLoop + + +Init + index + EndInit + index + + +Init + min + EndInit + min + + +Init + max + EndInit + max + + +Init + medfield + Mul + field1 + + +Init + x1 + EndInit + x1 + + +Init + x1 + Mul + x1 + + +Init + aVisu + EndInit + aVisu + + +Init + aView + EndInit + aView + + +EndInit + DoLoop + Init + InitLoop + + +205 + 98 + +204 + 21 + +936 + 20 + +935 + 70 + +Mul + return + EndInit + medfield + + + +LoopGraph + Init\index + Init + index + +3 + 0 + + +LoopGraph + Init\min + Init + min + +3 + 0 + + +LoopGraph + Init\max + Init + max + +3 + 55 + + +LoopGraph + Init\medfield + Init + medfield + +14 + IOR:010000001f00000049444c3a53414c4f4d455f4d45442f4649454c44444f55424c453a312e300000010000000000000026000000010100000a0000003132372e302e302e3100ead00e000000fe1948673f000058e60000000021 + + +LoopGraph + Init\x1 + Init + x1 + +7 + 2 + diff --git a/examples/TestSupervMedfieldLoopForiVisu.py b/examples/TestSupervMedfieldLoopForiVisu.py new file mode 100755 index 0000000..2eff10b --- /dev/null +++ b/examples/TestSupervMedfieldLoopForiVisu.py @@ -0,0 +1,216 @@ + +# Generated python file of Graph LoopGraph + +from SuperV import * +# Graph creation +LoopGraph = Graph( 'LoopGraph' ) +LoopGraph.SetName( 'LoopGraph' ) +LoopGraph.SetAuthor( '' ) +LoopGraph.SetComment( '' ) +LoopGraph.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +Mul = LoopGraph.FNode( 'Calculator' , 'Calculator' , 'Mul' ) +Mul.SetName( 'Mul' ) +Mul.SetAuthor( 'LD' ) +Mul.SetContainer( 'localhost/FactoryServer' ) +Mul.SetComment( 'Multiply a field by a constant' ) +Mul.Coords( 387 , 104 ) + +# Creation of InLine Nodes +PyInitDisplay = [] +PyInitDisplay.append( 'from LifeCycleCORBA import * ' ) +PyInitDisplay.append( 'from VISU import * ' ) +PyInitDisplay.append( 'def InitDisplay(): ' ) +PyInitDisplay.append( ' # initialize the ORB ' ) +PyInitDisplay.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) +PyInitDisplay.append( ' # create an LifeCycleCORBA instance ' ) +PyInitDisplay.append( ' lcc = LifeCycleCORBA(orb) ' ) +PyInitDisplay.append( ' # ----------------------------------------- ' ) +PyInitDisplay.append( ' # loading visu component ' ) +PyInitDisplay.append( ' aVisu = lcc.FindOrLoadComponent("FactoryServer","Visu") ' ) +PyInitDisplay.append( ' print "InitDisplay --> aVisu = ",aVisu ' ) +PyInitDisplay.append( ' aViewManager = aVisu.GetViewManager() ' ) +PyInitDisplay.append( ' print "InitDisplay --> aViewManager = ",aViewManager ' ) +PyInitDisplay.append( ' # aView = aViewManager.GetCurrentView() ' ) +PyInitDisplay.append( ' aView = aViewManager.Create3DView() ' ) +PyInitDisplay.append( ' print "InitDisplay --> aView = ",aView ' ) +PyInitDisplay.append( ' return aVisu,aView ' ) +InitDisplay = LoopGraph.INode( 'InitDisplay' , PyInitDisplay ) +InitDisplay.OutPort( 'aVisu' , 'objref' ) +InitDisplay.OutPort( 'aView' , 'objref' ) +InitDisplay.SetName( 'InitDisplay' ) +InitDisplay.SetAuthor( '' ) +InitDisplay.SetComment( 'Compute Node' ) +InitDisplay.Coords( 0 , 163 ) + +PyDisplayMed = [] +PyDisplayMed.append( 'import os ' ) +PyDisplayMed.append( 'import SALOME_MED ' ) +PyDisplayMed.append( 'from VISU import * ' ) +PyDisplayMed.append( 'from LifeCycleCORBA import * ' ) +PyDisplayMed.append( 'def DisplayMed(medfield,index,aVisu,aView): ' ) +PyDisplayMed.append( ' # initialize the ORB ' ) +PyDisplayMed.append( ' orb = CORBA.ORB_init([''], CORBA.ORB_ID) ' ) +PyDisplayMed.append( ' # create an LifeCycleCORBA instance ' ) +PyDisplayMed.append( ' lcc = LifeCycleCORBA(orb) ' ) +PyDisplayMed.append( ' print " " ' ) +PyDisplayMed.append( ' print "***************************************************************" ' ) +PyDisplayMed.append( ' calc = lcc.FindOrLoadComponent("FactoryServer", "Calculator") ' ) +PyDisplayMed.append( ' print "-----> calc = ",calc ' ) +PyDisplayMed.append( ' medfilename = "/tmp/LoopGraphFile" + str(index) + ".med" ' ) +PyDisplayMed.append( ' print "-----> Writing Med field in temporary file : ",medfilename ' ) +PyDisplayMed.append( ' calc.writeMEDfile(medfield,medfilename) ' ) +PyDisplayMed.append( ' print "-----> calc = ",calc ' ) +PyDisplayMed.append( ' print "***************************************************************" ' ) +PyDisplayMed.append( ' myResult1 = aVisu.ImportFile(medfilename) ' ) +PyDisplayMed.append( ' print "-----> myResult1 = ",myResult1 ' ) +PyDisplayMed.append( ' field_name = medfield.getName() ' ) +PyDisplayMed.append( ' print "-----> field_name = ",field_name ' ) +PyDisplayMed.append( ' mesh_name = medfield.getSupport().getMesh().getName() ' ) +PyDisplayMed.append( ' print "-----> mesh_name = ",mesh_name ' ) +PyDisplayMed.append( ' aMesh1 = aVisu.MeshOnEntity(myResult1,mesh_name,CELL) ' ) +PyDisplayMed.append( ' print "-----> aMesh1 = ",aMesh1 ' ) +PyDisplayMed.append( ' aScalarMap1 = aVisu.ScalarMapOnField(myResult1,mesh_name,NODE,field_name,1) ' ) +PyDisplayMed.append( ' print "-----> aScalarMap1 = ",aScalarMap1 ' ) +PyDisplayMed.append( ' aView.DisplayOnly(aScalarMap1) ' ) +PyDisplayMed.append( ' aView.FitAll() ' ) +PyDisplayMed.append( ' command = "rm " + medfilename ' ) +PyDisplayMed.append( ' os.system(command) ' ) +PyDisplayMed.append( ' print "-----> Delete temporary Med file : ",medfilename ' ) +PyDisplayMed.append( ' print "***************************************************************" ' ) +PyDisplayMed.append( ' print " " ' ) +PyDisplayMed.append( ' return medfield ' ) +DisplayMed = LoopGraph.INode( 'DisplayMed' , PyDisplayMed ) +DisplayMed.InPort( 'INmedfield' , 'objref' ) +DisplayMed.InPort( 'index' , 'long' ) +DisplayMed.InPort( 'aVisu' , 'objref' ) +DisplayMed.InPort( 'aView' , 'objref' ) +DisplayMed.OutPort( 'OUTmedfield' , 'objref' ) +DisplayMed.SetName( 'DisplayMed' ) +DisplayMed.SetAuthor( '' ) +DisplayMed.SetComment( 'Compute Node' ) +DisplayMed.Coords( 594 , 105 ) + +# Creation of Loop Nodes +PyInit = [] +PyInit.append( 'def Init(index,min,max,medfield,x1,aVisu,aView): ' ) +PyInit.append( ' if max >= min : ' ) +PyInit.append( ' index = min ' ) +PyInit.append( ' else : ' ) +PyInit.append( ' index = max ' ) +PyInit.append( ' print "Init --> index = ",index ' ) +PyInit.append( ' print " min = ",min ' ) +PyInit.append( ' print " max = ",max ' ) +PyInit.append( ' print " medfield = ",medfield ' ) +PyInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) +PyMoreInit = [] +PyMoreInit.append( 'def More(index,min,max,medfield,x1,aVisu,aView): ' ) +PyMoreInit.append( ' if max >= index : ' ) +PyMoreInit.append( ' DoLoop = 1 ' ) +PyMoreInit.append( ' else : ' ) +PyMoreInit.append( ' DoLoop = 0 ' ) +PyMoreInit.append( ' print "More --> DoLoop = ",DoLoop ' ) +PyMoreInit.append( ' print " index = ",index ' ) +PyMoreInit.append( ' print " min = ",min ' ) +PyMoreInit.append( ' print " max = ",max ' ) +PyMoreInit.append( ' print " medfield = ",medfield ' ) +PyMoreInit.append( ' return DoLoop,index,min,max,medfield,x1,aVisu,aView ' ) +PyNextInit = [] +PyNextInit.append( 'def Next(index,min,max,medfield,x1,aVisu,aView): ' ) +PyNextInit.append( ' index = index + 1 ' ) +PyNextInit.append( ' print "Next --> index = ",index ' ) +PyNextInit.append( ' print " min = ",min ' ) +PyNextInit.append( ' print " max = ",max ' ) +PyNextInit.append( ' print " medfield = ",medfield ' ) +PyNextInit.append( ' return index,min,max,medfield,x1,aVisu,aView ' ) +Init,EndInit = LoopGraph.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) +EndInit.SetName( 'EndInit' ) +EndInit.SetAuthor( 'LD' ) +EndInit.SetComment( 'no comment' ) +EndInit.Coords( 776 , 64 ) +Init.InPort( 'index' , 'long' ) +Init.InPort( 'min' , 'long' ) +Init.InPort( 'max' , 'long' ) +Init.InPort( 'medfield' , 'objref' ) +Init.InPort( 'x1' , 'double' ) +Init.InPort( 'aVisu' , 'objref' ) +Init.InPort( 'aView' , 'objref' ) +Init.OutPort( 'index' , 'long' ) +Init.OutPort( 'min' , 'long' ) +Init.OutPort( 'max' , 'long' ) +Init.OutPort( 'medfield' , 'objref' ) +Init.OutPort( 'x1' , 'double' ) +Init.OutPort( 'aVisu' , 'objref' ) +Init.OutPort( 'aView' , 'objref' ) +Init.SetName( 'Init' ) +Init.SetAuthor( 'LD' ) +Init.SetComment( 'no comment' ) +Init.Coords( 205 , 63 ) + +# Creation of Links +InitDisplayaVisu = InitDisplay.Port( 'aVisu' ) +InitaVisu = LoopGraph.Link( InitDisplayaVisu , Init.Port( 'aVisu' ) ) + +InitDisplayaView = InitDisplay.Port( 'aView' ) +InitaView = LoopGraph.Link( InitDisplayaView , Init.Port( 'aView' ) ) + +Initindex = Init.Port( 'index' ) +EndInitindex = LoopGraph.Link( Initindex , EndInit.Port( 'index' ) ) + +DisplayMedindex = LoopGraph.Link( Initindex , DisplayMed.Port( 'index' ) ) +DisplayMedindex.AddCoord( 1 , 566 , 215 ) +DisplayMedindex.AddCoord( 2 , 566 , 96 ) + +Initmin = Init.Port( 'min' ) +EndInitmin = LoopGraph.Link( Initmin , EndInit.Port( 'min' ) ) + +Initmax = Init.Port( 'max' ) +EndInitmax = LoopGraph.Link( Initmax , EndInit.Port( 'max' ) ) + +Initmedfield = Init.Port( 'medfield' ) +Mulfield1 = LoopGraph.Link( Initmedfield , Mul.Port( 'field1' ) ) + +Initx1 = Init.Port( 'x1' ) +EndInitx1 = LoopGraph.Link( Initx1 , EndInit.Port( 'x1' ) ) + +Mulx1 = LoopGraph.Link( Initx1 , Mul.Port( 'x1' ) ) + +InitaVisu = Init.Port( 'aVisu' ) +EndInitaVisu = LoopGraph.Link( InitaVisu , EndInit.Port( 'aVisu' ) ) + +DisplayMedaVisu = LoopGraph.Link( InitaVisu , DisplayMed.Port( 'aVisu' ) ) +DisplayMedaVisu.AddCoord( 1 , 570 , 242 ) +DisplayMedaVisu.AddCoord( 2 , 569 , 263 ) +DisplayMedaVisu.AddCoord( 3 , 377 , 264 ) +DisplayMedaVisu.AddCoord( 4 , 376 , 242 ) + +InitaView = Init.Port( 'aView' ) +EndInitaView = LoopGraph.Link( InitaView , EndInit.Port( 'aView' ) ) + +DisplayMedaView = LoopGraph.Link( InitaView , DisplayMed.Port( 'aView' ) ) + +Mulreturn = Mul.Port( 'return' ) +DisplayMedINmedfield = LoopGraph.Link( Mulreturn , DisplayMed.Port( 'INmedfield' ) ) + +DisplayMedOUTmedfield = DisplayMed.Port( 'OUTmedfield' ) +EndInitmedfield = LoopGraph.Link( DisplayMedOUTmedfield , EndInit.Port( 'medfield' ) ) + +# Creation of Input datas +Initindex = Init.Input( 'index' , 0) +Initmin = Init.Input( 'min' , 0) +Initmax = Init.Input( 'max' , 4) +Initx1 = Init.Input( 'x1' , 2) + +# Missing Input datas +Initmedfield = Init.Port( 'medfield' ) + +# Creation of Output variables +EndInitindex = EndInit.Port( 'index' ) +EndInitmin = EndInit.Port( 'min' ) +EndInitmax = EndInit.Port( 'max' ) +EndInitmedfield = EndInit.Port( 'medfield' ) +EndInitx1 = EndInit.Port( 'x1' ) +EndInitaVisu = EndInit.Port( 'aVisu' ) +EndInitaView = EndInit.Port( 'aView' ) diff --git a/examples/TestSupervMedfieldLoopForiVisu.xml b/examples/TestSupervMedfieldLoopForiVisu.xml new file mode 100755 index 0000000..5086e6d --- /dev/null +++ b/examples/TestSupervMedfieldLoopForiVisu.xml @@ -0,0 +1,536 @@ + + + + +? + ? + LoopGraph + 1 + ? + +LoopGraph + + +long + Init\index + +long + Init\min + +long + Init\max + +objref + Init\medfield + +double + Init\x1 + + +long + EndInit\index + +long + EndInit\min + +long + EndInit\max + +objref + EndInit\medfield + +double + EndInit\x1 + +objref + EndInit\aVisu + +objref + EndInit\aView + + + 20/6/2003 - 15:13:42 + 19/9/2003 - 16:10:16 + 1.04 + ? + ? + ? + 0 + 0 + + +? + ? + InitDisplay + 3 + ? + +InitDisplay + + + +objref + aVisu + +objref + aView + + + +InitDisplay + + + + + + + + + + + aVisu = ",aVisu ]]> + + aViewManager = ",aViewManager ]]> + + + aView = ",aView ]]> + + 19/9/2003 - 16:10:16 + 19/9/2003 - 16:10:16 + 1.04 + ? + ? + Compute Node + 0 + 163 + +? + ? + Init + 4 + EndInit + +Init + + +long + index + +long + min + +long + max + +objref + medfield + +double + x1 + +objref + aVisu + +objref + aView + + +long + index + +long + min + +long + max + +objref + medfield + +double + x1 + +objref + aVisu + +objref + aView + + + +Init + + = min : ]]> + + + + index = ",index ]]> + + + + + +More + + = index : ]]> + + + + DoLoop = ",DoLoop ]]> + + + + + + +Next + + + index = ",index ]]> + + + + + 19/9/2003 - 16:10:16 + 19/9/2003 - 16:10:16 + 1.04 + LD + ? + no comment + 205 + 63 + +? + ? + EndInit + 5 + Init + +EndInit + + +long + index + +long + min + +long + max + +objref + medfield + +double + x1 + +objref + aVisu + +objref + aView + + +long + index + +long + min + +long + max + +objref + medfield + +double + x1 + +objref + aVisu + +objref + aView + + + + 19/9/2003 - 16:10:16 + 19/9/2003 - 16:10:16 + 1.04 + LD + ? + no comment + 776 + 64 + +Calculator + Calculator + Mul + 0 + ? + +Mul + + +objref + field1 + +double + x1 + + +objref + return + + + 19/9/2003 - 16:10:16 + 19/9/2003 - 16:10:16 + 1.04 + LD + localhost/FactoryServer + Multiply a field by a constant + 387 + 104 + +? + ? + DisplayMed + 3 + ? + +DisplayMed + + +objref + INmedfield + +long + index + +objref + aVisu + +objref + aView + + +objref + OUTmedfield + + + +DisplayMed + + + + + + + + + + + + + calc = ",calc ]]> + + Writing Med field in temporary file : ",medfilename ]]> + + calc = ",calc ]]> + + + myResult1 = ",myResult1 ]]> + + field_name = ",field_name ]]> + + mesh_name = ",mesh_name ]]> + + aMesh1 = ",aMesh1 ]]> + + aScalarMap1 = ",aScalarMap1 ]]> + + + + + Delete temporary Med file : ",medfilename ]]> + + + + 19/9/2003 - 16:10:16 + 19/9/2003 - 16:10:16 + 1.04 + ? + ? + Compute Node + 594 + 105 + + +InitDisplay + aVisu + Init + aVisu + + +InitDisplay + aView + Init + aView + + +Init + DoLoop + EndInit + DoLoop + + +Init + index + EndInit + index + + +Init + index + DisplayMed + index + + +566 + 215 + +566 + 96 + +Init + min + EndInit + min + + +Init + max + EndInit + max + + +Init + medfield + Mul + field1 + + +Init + x1 + EndInit + x1 + + +Init + x1 + Mul + x1 + + +Init + aVisu + EndInit + aVisu + + +Init + aVisu + DisplayMed + aVisu + + +570 + 242 + +569 + 263 + +377 + 264 + +376 + 242 + +Init + aView + EndInit + aView + + +Init + aView + DisplayMed + aView + + +EndInit + DoLoop + Init + InitLoop + + +205 + 233 + +204 + 21 + +936 + 20 + +935 + 235 + +Mul + return + DisplayMed + INmedfield + + +DisplayMed + OUTmedfield + EndInit + medfield + + + +LoopGraph + Init\index + Init + index + +3 + 0 + + +LoopGraph + Init\min + Init + min + +3 + 0 + + +LoopGraph + Init\max + Init + max + +3 + 4 + + +LoopGraph + Init\x1 + Init + x1 + +7 + 2 + diff --git a/examples/dataflow_calculator_example.py b/examples/dataflow_calculator_example.py new file mode 100755 index 0000000..d56571f --- /dev/null +++ b/examples/dataflow_calculator_example.py @@ -0,0 +1,211 @@ +#%dataflow_calculator_example.py% +#============================================================================== +# File : dataflow_calculator_example.py +# Created : 30 sept 2002 +# Author : Laurent DADA +# Project : SALOME +# Copyright : CEA +#============================================================================== + +#============================================================================== +# Example of dataflow with CalculatorComponent services (Add, Mult and Const) +# and MED data (mesh and field). +# +# +#============================================================================== + +#============================================================================== +import batchmode_salome +import SALOME_MED +from batchmode_SuperV import * +#============================================================================== +datadir = os.getenv("SALOMEPRO_SRC") +if len(datadir) != 0: + datadir=datadir+ "data/" +input_file = datadir+'pointe.med' +print 'dataflow_calculator_example.py',input_file +str= os.getenv("HOME") +if str == None: + str = "/tmp" +output_file = str + 'test_dataflow_calculator.med' + +export_xmlfile = str + "/my_dataflow_calculator_example.xml" + +#============================================================================== +# Load mesh and field in MED component, register into current study and get +# a field under the following name : fieldnodedouble +#============================================================================== +from batchmode_MED import * + +#============================================================================== +# Define a function for printing on Salome TUI the" until_index" first values +# for each component of a field (MED data) +#============================================================================== + +def PrintField(aField,until_index): + # check parameter + if aField is None: + print "PrintField() : aField is None " + return + name = aField.getName() + desc = aField.getDescription() + nb_comp = aField.getNumberOfComponents() + values = aField.getValue(SALOME_MED.MED_FULL_INTERLACE) + support = aField.getSupport() + if (support.isOnAllElements()): + nb_node = support.getMesh().getNumberOfElements(support.getEntity(),SALOME_MED.MED_ALL_ELEMENTS) + else: + nb_node = support.getNumberOfElements(SALOME_MED.MED_ALL_ELEMENTS); + + if until_index > nb_node: + max_index = nb_node + else: + max_index = until_index + time = aField.getTime() + iter = aField.getIterationNumber() + print "------------------------------------------------" + print "Field %s"%(name) + print " Description : %s"%(desc) + print " Number of components : %d"%(nb_comp) + print " Number of nodes : %d"%(nb_node) + print " Iteration number : %d"%(iter) + print " Time : %f"%(time) + icomp = 0 + while icomp < nb_comp : + icomp = icomp + 1 + namec = aField.getComponentName(icomp) + unit = aField.getComponentUnit(icomp) + print " Component : %s"%(namec) + print " Unit : %s"%(type) + print " first %d values :"%(until_index) + index = 0 + while index < max_index : + index = index + 1 + print " component %d index %d :%f"%(icomp,index,values[(index-1)+(icomp-1)*nb_comp]) + print "------------------------------------------------" + +#---------------------------------------------------------------------- + +med_comp.readStructFileWithFieldType(input_file, studyCurrent) + +med_obj = getMedObjectFromStudy() + +nbMeshes = med_obj.getNumberOfMeshes() + +nbFields = med_obj.getNumberOfFields() + +print "" +print "The med file ",input_file," has ",nbMeshes," Meshe(s) and ",nbFields," Field(s)" +print "" + +mesh = getMeshObjectFromStudy(1) + +name = mesh.getName() + +nbNodes = mesh.getNumberOfNodes() + +spaceDim = mesh.getSpaceDimension() + +print "The mesh from the Study is ",name,".It is a ",spaceDim,"-D mesh and it has ",nbNodes,"Nodes" +print "" + +fieldcelldouble = getFieldIntObjectFromStudy(1,1) +if (fieldcelldouble == None): + fieldcelldouble = getFieldDoubleObjectFromStudy(1,1) + print "The following field is a float (double) one" +else: + print "The following field is an integer one" + +AnalyzeField(fieldcelldouble) + +fieldnodedouble = getFieldIntObjectFromStudy(2,1) +if (fieldnodedouble == None): + fieldnodedouble = getFieldDoubleObjectFromStudy(2,1) + print "The following field is a float (double) one" +else: + print "The following field is an integer one" + +AnalyzeField(fieldnodedouble) +#---------------------------------------------------------------------- + +#============================================================================== +# Building the Dataflow +#============================================================================== + +myGraph = Graph("CalculatorDataflow") + +# nodes and links +# ------------------- + +scal_field_const = myGraph.Node("Calculator","Calculator","Constant") +scal_field_mult = myGraph.Node("Calculator","Calculator","Mul") +scal_field_add = myGraph.Node("Calculator","Calculator","Add") + +write_initial = myGraph.Node("Calculator","Calculator","writeMEDfile") +write_result = myGraph.Node("Calculator","Calculator","writeMEDfile") + +link1 = myGraph.Link( scal_field_const.Port("return") , scal_field_add.Port("field1") ) +link2 = myGraph.Link( scal_field_mult.Port("return") , scal_field_add.Port("field2") ) +link3 = myGraph.Link( scal_field_add.Port("return") , write_result.Port("field1") ) + + +# machines ressources +# ------------------- + +#myGraph.SetContainer('FactoryServer') +scal_field_const.SetContainer('FactoryServer') +scal_field_mult.SetContainer('FactoryServer') +scal_field_add.SetContainer('FactoryServer') +write_initial.SetContainer('FactoryServer') +write_result.SetContainer('FactoryServer') + +# validation and exporting (xml format) +# --------------------------------- +print myGraph.Export(export_xmlfile) + +print myGraph.IsValid() + +#============================================================================== +# Dataflow Input +#============================================================================== + +# Ports Input +# ---------------------------- + +scal_const_in2 = scal_field_const.Input( "x1", 10. ) +scal_mult_in2 = scal_field_mult.Input( "x1", -1. ) +result_write = write_result.Input( "filename", output_file) +initial_write_in2 = write_initial.Input( "filename", output_file) + +# exporting with constant inputs (xml format) +# ------------------------------------------- + +print myGraph.Export(export_xmlfile) + +# Other ports Input +# ---------------------------- + +print "Print fieldnodedouble" +PrintField(fieldnodedouble,20) + +scal_const_in1 = scal_field_const.Input( "field1", fieldnodedouble ) +scal_mult_in1 = scal_field_mult.Input( "field1", fieldnodedouble ) +initial_write_in1 = write_initial.Input( "field1", fieldnodedouble) + +print myGraph.IsExecutable() + +#============================================================================== +# Running the Dataflow (asynchronous) +#============================================================================== + +print myGraph.Run() + +print myGraph.DoneW() + +new_field = scal_field_add.Port("return").ToAny().value() +print "Print new_field" +PrintField(new_field,20) + + + + diff --git a/examples/dataflow_calculator_example.xml b/examples/dataflow_calculator_example.xml new file mode 100755 index 0000000..4edd3bf --- /dev/null +++ b/examples/dataflow_calculator_example.xml @@ -0,0 +1,306 @@ + + + + + + + + + ? + ? + CalculatorDataflow + 1 + + CalculatorDataflow + + + FIELDDOUBLE + +Constant\field1 + + + double + Constant\x1 + + + FIELDDOUBLE + Mul\field1 + + + double + Mul\x1 + + + +FieldNodeDouble + +writeMEDfile\field1 + + + string + +writeMEDfile\filename + + + string + +writeMEDfile_1\filename + + + + + + 22/11/2002 - 14:38:49 + 22/11/2002 - 14:47:14 + 1.03 + ? + FactoryServer + ? + 0 + 0 + + + + + + Calculator + Calculator + Constant + 0 + + Constant + + + FIELDDOUBLE + field1 + + + double + x1 + + + + + FIELDDOUBLE + return + + + + 22/11/2002 - 14:47:14 + 22/11/2002 - 14:47:14 + 1.03 + ? + FactoryServer + ? + 28 + 0 + + + Calculator + Calculator + Mul + 0 + + Mul + + + FIELDDOUBLE + field1 + + + double + x1 + + + + + FIELDDOUBLE + return + + + + 22/11/2002 - 14:47:14 + 22/11/2002 - 14:47:14 + 1.03 + ? + FactoryServer + ? + 27 + 208 + + + Calculator + Calculator + Add + 0 + + Add + + + FIELDDOUBLE + field1 + + + FIELDDOUBLE + field2 + + + + + FIELDDOUBLE + return + + + + 22/11/2002 - 14:47:14 + 22/11/2002 - 14:47:14 + 1.03 + ? + FactoryServer + ? + 398 + 54 + + + Calculator + Calculator + writeMEDfile + 0 + + writeMEDfile + + + +FieldNodeDouble + field1 + + + string + filename + + + + + + 22/11/2002 - 14:47:14 + 22/11/2002 - 14:47:14 + 1.03 + ? + FactoryServer + ? + 212 + 392 + + + Calculator + Calculator + writeMEDfile_1 + 0 + + writeMEDfile + + + FIELDDOUBLE + field1 + + + string + filename + + + + + + 22/11/2002 - 14:47:14 + 22/11/2002 - 14:47:14 + 1.03 + ? + FactoryServer + ? + 572 + 52 + + + + + + Constant + return + Add + field1 + + + + + Mul + return + Add + field2 + + + + + Add + return + writeMEDfile_1 + field1 + + + + + + + + CalculatorDataflow + Constant\x1 + Constant + x1 + + 7 + 10 + + + + + + CalculatorDataflow + Mul\x1 + Mul + x1 + + 7 + -1 + + + + + + CalculatorDataflow + +writeMEDfile\filename + writeMEDfile + filename + + 18 + test_dataflow_calculator.med + + + + + + CalculatorDataflow + +writeMEDfile_1\filename + writeMEDfile_1 + filename + + 18 + test_dataflow_calculator.med + + + + + + + + diff --git a/examples/myFactorialPy.py b/examples/myFactorialPy.py index e91a577..1c57f13 100644 --- a/examples/myFactorialPy.py +++ b/examples/myFactorialPy.py @@ -1,3 +1,9 @@ +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# +# +# File : myFactorialPy.py +# Module : SuperVisionTest from SuperV import * diff --git a/examples/newsupervisionexample.py b/examples/newsupervisionexample.py index 79a2986..053065e 100644 --- a/examples/newsupervisionexample.py +++ b/examples/newsupervisionexample.py @@ -1,34 +1,38 @@ - -# Generated python file of Graph GraphEssai +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# +# +# File : newsupervisionexample.py +# Module : SuperVisionTest from SuperV import * # Graph creation -GraphEssai = Graph( 'GraphEssai' ) -GraphEssai.SetName( 'GraphEssai' ) -GraphEssai.SetAuthor( '' ) -GraphEssai.SetComment( '' ) -GraphEssai.Coords( 0 , 0 ) +newsupervisionexample = Graph( 'newsupervisionexample' ) +newsupervisionexample.SetName( 'newsupervisionexample' ) +newsupervisionexample.SetAuthor( '' ) +newsupervisionexample.SetComment( '' ) +newsupervisionexample.Coords( 0 , 0 ) # Creation of Computing Nodes -Add = GraphEssai.Node( 'AddComponent' , 'AddComponent' , 'Add' ) +Add = newsupervisionexample.Node( 'AddComponent' , 'AddComponent' , 'Add' ) Add.SetName( 'Add' ) Add.SetAuthor( '' ) Add.SetContainer( 'FactoryServer' ) Add.SetComment( '' ) Add.Coords( 15 , 241 ) -Sub = GraphEssai.Node( 'SubComponent' , 'SubComponent' , 'Sub' ) +Sub = newsupervisionexample.Node( 'SubComponent' , 'SubComponent' , 'Sub' ) Sub.SetName( 'Sub' ) Sub.SetAuthor( '' ) Sub.SetContainer( 'FactoryServer' ) Sub.SetComment( '' ) Sub.Coords( 227 , 99 ) -Mul = GraphEssai.Node( 'MulComponent' , 'MulComponent' , 'Mul' ) +Mul = newsupervisionexample.Node( 'MulComponent' , 'MulComponent' , 'Mul' ) Mul.SetName( 'Mul' ) Mul.SetAuthor( '' ) Mul.SetContainer( 'FactoryServer' ) Mul.SetComment( '' ) Mul.Coords( 443 , 278 ) -Div = GraphEssai.Node( 'DivComponent' , 'DivComponent' , 'Div' ) +Div = newsupervisionexample.Node( 'DivComponent' , 'DivComponent' , 'Div' ) Div.SetName( 'Div' ) Div.SetAuthor( '' ) Div.SetContainer( 'FactoryServer' ) @@ -37,13 +41,13 @@ Div.Coords( 634 , 97 ) # Creation of intermediate Output variables and of Computing Links Addz = Add.Port( 'z' ) -Suby = GraphEssai.Link( Addz , Sub.Port( 'y' ) ) -Muly = GraphEssai.Link( Addz , Mul.Port( 'y' ) ) +Suby = newsupervisionexample.Link( Addz , Sub.Port( 'y' ) ) +Muly = newsupervisionexample.Link( Addz , Mul.Port( 'y' ) ) Subz = Sub.Port( 'z' ) -Mulx = GraphEssai.Link( Subz , Mul.Port( 'x' ) ) -Divx = GraphEssai.Link( Subz , Div.Port( 'x' ) ) +Mulx = newsupervisionexample.Link( Subz , Mul.Port( 'x' ) ) +Divx = newsupervisionexample.Link( Subz , Div.Port( 'x' ) ) Mulz = Mul.Port( 'z' ) -Divy = GraphEssai.Link( Mulz , Div.Port( 'y' ) ) +Divy = newsupervisionexample.Link( Mulz , Div.Port( 'y' ) ) # Creation of Input datas Addx = Add.Input( 'x' , 3) @@ -53,3 +57,12 @@ Subx = Sub.Input( 'x' , 1.5) # Creation of Output variables AddFuncValue = Add.Port( 'FuncValue' ) Divz = Div.Port( 'z' ) + +newsupervisionexample.Run() + +newsupervisionexample.DoneW() + +newsupervisionexample.State() + +newsupervisionexample.PrintPorts() + diff --git a/examples/newsupervisionexample.xml b/examples/newsupervisionexample.xml index 9e3ec06..df28e8f 100644 --- a/examples/newsupervisionexample.xml +++ b/examples/newsupervisionexample.xml @@ -6,13 +6,13 @@ - GraphEssai + newsupervisionexample ? - GraphEssai + newsupervisionexample 1 ? - GraphEssai + newsupervisionexample double @@ -247,7 +247,7 @@ - GraphEssai + newsupervisionexample Add\x Add x @@ -259,7 +259,7 @@ - GraphEssai + newsupervisionexample Add\y Add y @@ -271,7 +271,7 @@ - GraphEssai + newsupervisionexample Sub\x Sub x diff --git a/examples/test_events.py b/examples/test_events.py new file mode 100644 index 0000000..fe394f4 --- /dev/null +++ b/examples/test_events.py @@ -0,0 +1,66 @@ + +# Generated python file of Graph aNewDataFlow + +from SuperV import * +# Graph creation +aNewDataFlow = Graph( 'aNewDataFlow' ) +aNewDataFlow.SetName( 'aNewDataFlow' ) +aNewDataFlow.SetAuthor( '' ) +aNewDataFlow.SetComment( '' ) +aNewDataFlow.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyFunc = [] +PyFunc.append( 'def Func( A ): ' ) +PyFunc.append( ' import batchmode_visu ' ) +PyFunc.append( ' batchmode_visu.myVisu.CreateTestView() ' ) +PyFunc.append( ' batchmode_visu.myVisu.ShowTestObject() ' ) +PyFunc.append( ' return A ' ) +Func = aNewDataFlow.INode( 'Func' , PyFunc ) +Func.SetName( 'Func' ) +Func.SetAuthor( '' ) +Func.SetComment( 'Compute Node' ) +Func.Coords( 375 , 162 ) +Func.InPort( 'A' , 'int' ) +Func.OutPort( 'B' , 'int' ) + +# Creation of Loop Nodes +PyInit = [] +PyInit.append( 'def Init( A ): ' ) +PyInit.append( ' return A ' ) +PyMoreInit = [] +PyMoreInit.append( 'def More( A ): ' ) +PyMoreInit.append( ' if A < 10: ' ) +PyMoreInit.append( ' return 1,A ' ) +PyMoreInit.append( ' return 0,A ' ) +PyNextInit = [] +PyNextInit.append( 'def Next( A ): ' ) +PyNextInit.append( ' return (A + 1) ' ) +Init,EndInit = aNewDataFlow.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) +EndInit.SetName( 'EndInit' ) +EndInit.SetAuthor( '' ) +EndInit.SetComment( '' ) +EndInit.Coords( 740 , 168 ) +PyEndInit = [] +EndInit.SetPyFunction( 'EndInit' , PyEndInit ) +Init.SetName( 'Init' ) +Init.SetAuthor( '' ) +Init.SetComment( '' ) +Init.Coords( 118 , 160 ) +Init.InPort( 'A' , 'int' ) +Init.OutPort( 'A' , 'int' ) + +# Creation of Links +InitA = Init.Port( 'A' ) +FuncA = aNewDataFlow.Link( InitA , Func.Port( 'A' ) ) + +FuncB = Func.Port( 'B' ) +EndInitA = aNewDataFlow.Link( FuncB , EndInit.Port( 'A' ) ) + +# Creation of Input datas +InitA = Init.Input( 'A' , 0) + +# Creation of Output variables +EndInitA = EndInit.Port( 'A' ) diff --git a/examples/test_events.xml b/examples/test_events.xml new file mode 100644 index 0000000..97a7ce8 --- /dev/null +++ b/examples/test_events.xml @@ -0,0 +1,167 @@ + + + + +? + ? + aNewDataFlow + 1 + ? + +aNewDataFlow + + +int + Init\A + + +int + EndInit\A + + + 2/4/2004 - 16:38:31 + 2/4/2004 - 18:30:31 + 1.05 + ? + ? + ? + 0 + 0 + + +? + ? + Init + 4 + EndInit + +Init + + +int + A + + +int + A + + + +Init + + + +More + + + + + +Next + + + 2/4/2004 - 18:30:31 + 2/4/2004 - 18:30:31 + 1.05 + ? + ? + ? + 118 + 160 + +? + ? + EndInit + 5 + Init + +EndInit + + +int + A + + +int + A + + + +EndInit + + 2/4/2004 - 18:30:31 + 2/4/2004 - 18:30:31 + 1.05 + ? + ? + ? + 740 + 168 + +? + ? + Func + 3 + ? + +Func + + +int + A + + +int + B + + + +Func + + + + + + 2/4/2004 - 18:30:31 + 2/4/2004 - 18:30:31 + 1.05 + ? + ? + Compute Node + 375 + 162 + + +Init + DoLoop + EndInit + DoLoop + + +Init + A + Func + A + + +EndInit + DoLoop + Init + InitLoop + + +Func + B + EndInit + A + + + +aNewDataFlow + Init\A + Init + A + +3 + 0 + diff --git a/examples/test_superv_basic_loop.py b/examples/test_superv_basic_loop.py new file mode 100755 index 0000000..f98c313 --- /dev/null +++ b/examples/test_superv_basic_loop.py @@ -0,0 +1,103 @@ + +# Generated python file of Graph test_superv_basic_loop + +from SuperV import * +# Graph creation +test_superv_basic_loop = Graph( 'test_superv_basic_loop' ) +test_superv_basic_loop.SetName( 'test_superv_basic_loop' ) +test_superv_basic_loop.SetAuthor( '' ) +test_superv_basic_loop.SetComment( '' ) +test_superv_basic_loop.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyAdd = [] +PyAdd.append( 'def Sum(sum,incr): ' ) +PyAdd.append( ' result = sum+incr ' ) +PyAdd.append( ' return result,incr ' ) +Add = test_superv_basic_loop.INode( 'Sum' , PyAdd ) +Add.InPort( 'sum' , 'long' ) +Add.InPort( 'incr' , 'long' ) +Add.OutPort( 'Sum' , 'long' ) +Add.OutPort( 'incr' , 'long' ) +Add.SetName( 'Add' ) +Add.SetAuthor( '' ) +Add.SetComment( 'Python function' ) +Add.Coords( 220 , 40 ) + +# Creation of Loop Nodes +Pyfori = [] +Pyfori.append( 'def Init(index,min,max,sum): ' ) +Pyfori.append( ' if max > min : ' ) +Pyfori.append( ' index = min ' ) +Pyfori.append( ' else : ' ) +Pyfori.append( ' index = max ' ) +Pyfori.append( ' #print index,min,max,sum ' ) +Pyfori.append( ' return index,min,max,sum ' ) +PyMorefori = [] +PyMorefori.append( 'def More(index,min,max,sum): ' ) +PyMorefori.append( ' OutLoop = 0 ' ) +PyMorefori.append( ' if max > index : ' ) +PyMorefori.append( ' OutLoop = 1 ' ) +PyMorefori.append( ' #print OutLoop,index,min,max,sum ' ) +PyMorefori.append( ' return OutLoop,index,min,max,sum ' ) +PyNextfori = [] +PyNextfori.append( 'def Next(index,min,max,sum): ' ) +PyNextfori.append( ' index = index + 1 ' ) +PyNextfori.append( ' #print index,min,max,sum ' ) +PyNextfori.append( ' return index,min,max,sum ' ) +fori,Endfori = test_superv_basic_loop.LNode( 'Init' , Pyfori , 'More' , PyMorefori , 'Next' , PyNextfori ) +Endfori.SetName( 'Endfori' ) +Endfori.SetAuthor( '' ) +Endfori.SetComment( '' ) +Endfori.Coords( 432 , 0 ) +fori.InPort( 'index' , 'long' ) +fori.InPort( 'min' , 'long' ) +fori.InPort( 'max' , 'long' ) +fori.InPort( 'sum' , 'long' ) +fori.OutPort( 'index' , 'long' ) +fori.OutPort( 'min' , 'long' ) +fori.OutPort( 'max' , 'long' ) +fori.OutPort( 'sum' , 'long' ) +fori.SetName( 'fori' ) +fori.SetAuthor( '' ) +fori.SetComment( '' ) +fori.Coords( 12 , 0 ) + +# Creation of Links +AddSum = Add.Port( 'Sum' ) +Endforisum = test_superv_basic_loop.Link( AddSum , Endfori.Port( 'sum' ) ) + +foriindex = fori.Port( 'index' ) +Endforiindex = test_superv_basic_loop.Link( foriindex , Endfori.Port( 'index' ) ) + +Addincr = test_superv_basic_loop.Link( foriindex , Add.Port( 'incr' ) ) +Addincr.AddCoord( 1 , 186 , 150 ) +Addincr.AddCoord( 2 , 187 , 34 ) + +forimin = fori.Port( 'min' ) +Endforimin = test_superv_basic_loop.Link( forimin , Endfori.Port( 'min' ) ) + +forimax = fori.Port( 'max' ) +Endforimax = test_superv_basic_loop.Link( forimax , Endfori.Port( 'max' ) ) + +forisum = fori.Port( 'sum' ) +Addsum = test_superv_basic_loop.Link( forisum , Add.Port( 'sum' ) ) + +# Creation of Input datas +foriindex = fori.Input( 'index' , 0) +forimin = fori.Input( 'min' , 0) +forimax = fori.Input( 'max' , 1001) +forisum = fori.Input( 'sum' , 0) + +# Creation of Output variables +Addincr = Add.Port( 'incr' ) +Endforiindex = Endfori.Port( 'index' ) +Endforimin = Endfori.Port( 'min' ) +Endforimax = Endfori.Port( 'max' ) +Endforisum = Endfori.Port( 'sum' ) + +test_superv_basic_loop.Run() +test_superv_basic_loop.DoneW() +test_superv_basic_loop.PrintPorts() diff --git a/examples/test_superv_basic_loop.xml b/examples/test_superv_basic_loop.xml new file mode 100755 index 0000000..071f311 --- /dev/null +++ b/examples/test_superv_basic_loop.xml @@ -0,0 +1,304 @@ + + + + +? + ? + test_superv_basic_loop + 1 + ? + +test_superv_basic_loop + + +long + fori\index + +long + fori\min + +long + fori\max + +long + fori\sum + + +long + Add\incr + +long + Endfori\index + +long + Endfori\min + +long + Endfori\max + +long + Endfori\sum + + + 2/5/2003 - 13:43:38 + 19/9/2003 - 16:38:30 + 1.04 + ? + ? + ? + 0 + 0 + + +? + ? + Add + 3 + ? + +Add + + +long + sum + +long + incr + + +long + Sum + +long + incr + + + +Sum + + + + 19/9/2003 - 16:38:30 + 19/9/2003 - 16:38:30 + 1.04 + ? + ? + Python function + 220 + 40 + +? + ? + fori + 4 + Endfori + +fori + + +long + index + +long + min + +long + max + +long + sum + + +long + index + +long + min + +long + max + +long + sum + + + +Init + + min : ]]> + + + + + + +More + + + index : ]]> + + + + +Next + + + + + 19/9/2003 - 16:38:30 + 19/9/2003 - 16:38:30 + 1.04 + ? + ? + ? + 12 + 0 + +? + ? + Endfori + 5 + fori + +Endfori + + +long + index + +long + min + +long + max + +long + sum + + +long + index + +long + min + +long + max + +long + sum + + + + 19/9/2003 - 16:38:30 + 19/9/2003 - 16:38:30 + 1.04 + ? + ? + ? + 432 + 0 + + +Add + Sum + Endfori + sum + + +fori + DoLoop + Endfori + DoLoop + + +fori + index + Endfori + index + + +fori + index + Add + incr + + +186 + 150 + +187 + 34 + +fori + min + Endfori + min + + +fori + max + Endfori + max + + +fori + sum + Add + sum + + +Endfori + DoLoop + fori + InitLoop + + +8 + 215 + +7 + 5 + +747 + 5 + +748 + 214 + + +test_superv_basic_loop + fori\index + fori + index + +3 + 0 + + +test_superv_basic_loop + fori\min + fori + min + +3 + 0 + + +test_superv_basic_loop + fori\max + fori + max + +3 + 1001 + + +test_superv_basic_loop + fori\sum + fori + sum + +3 + 0 + diff --git a/examples/testvisu20.xml b/examples/testvisu20.xml new file mode 100644 index 0000000..7d8e60e --- /dev/null +++ b/examples/testvisu20.xml @@ -0,0 +1,490 @@ + + + + +? + ? + aNewDataFlow + 1 + ? + +aNewDataFlow + + +long + Init\index + +long + Init\min + +long + Init\max + +double + Init\x1 + + +long + EndOfInit\index + +long + EndOfInit\min + +long + EndOfInit\max + +objref + EndOfInit\aVisu + +objref + EndOfInit\aView + +objref + EndOfInit\aResult + +double + EndOfInit\x1 + + + 13/11/2003 - 11:15:53 + 19/1/2004 - 15:33:34 + 1.05 + ? + ? + ? + 0 + 0 + + +? + ? + InitDisplay + 3 + ? + +InitDisplay + + + +objref + aVisu + +objref + aView + +objref + myResult + + + +InitDisplay + + + + + + + + + + + + + + + + + + + + + aVisu ", aVisu ]]> + + + aViewManager ", aViewManager ]]> + + + + aView ", aView ]]> + + + + + myResult ", myResult ]]> + + + 19/1/2004 - 15:33:34 + 19/1/2004 - 15:33:34 + 1.05 + ? + ? + Compute Node + 0 + 46 + +? + ? + Init + 4 + EndOfInit + +Init + + +long + index + +long + min + +long + max + +objref + aVisu + +objref + aView + +objref + aResult + +double + x1 + + +long + index + +long + min + +long + max + +objref + aVisu + +objref + aView + +objref + aResult + +double + x1 + + + +Init + + = min : ]]> + + + + + + +More + + = index : ]]> + + + + + + +Next + + + + + + 19/1/2004 - 15:33:34 + 19/1/2004 - 15:33:34 + 1.05 + ? + ? + ? + 190 + 4 + +? + ? + EndOfInit + 5 + Init + +EndOfInit + + +long + index + +long + min + +long + max + +objref + aVisu + +objref + aView + +objref + aResult + +double + x1 + + +long + index + +long + min + +long + max + +objref + aVisu + +objref + aView + +objref + aResult + +double + x1 + + + + 19/1/2004 - 15:33:34 + 19/1/2004 - 15:33:34 + 1.05 + ? + ? + ? + 553 + 5 + +? + ? + DisplayVitesse + 3 + ? + +DisplayVitesse + + +string + index + +objref + aVisu + +objref + aView + +objref + aResult + +double + x1 + + +objref + theResult + + + +DisplayVitesse + + + + + + + + + + + + + + + + + + + + + + + + + + 19/1/2004 - 15:33:34 + 19/1/2004 - 15:33:34 + 1.05 + ? + ? + Compute Node + 374 + 16 + + +InitDisplay + aVisu + Init + aVisu + + +InitDisplay + aView + Init + aView + + +InitDisplay + myResult + Init + aResult + + +Init + DoLoop + EndOfInit + DoLoop + + +Init + index + EndOfInit + index + + +Init + index + DisplayVitesse + index + + +351 + 96 + +350 + 38 + +Init + min + EndOfInit + min + + +Init + max + EndOfInit + max + + +Init + aVisu + EndOfInit + aVisu + + +Init + aVisu + DisplayVitesse + aVisu + + +Init + aView + EndOfInit + aView + + +Init + aView + DisplayVitesse + aView + + +Init + aResult + DisplayVitesse + aResult + + +Init + x1 + EndOfInit + x1 + + +Init + x1 + DisplayVitesse + x1 + + +EndOfInit + DoLoop + Init + InitLoop + + +DisplayVitesse + theResult + EndOfInit + aResult + + +548 + 183 + +548 + 97 + + +aNewDataFlow + Init\index + Init + index + +3 + 1 + + +aNewDataFlow + Init\min + Init + min + +3 + 1 + + +aNewDataFlow + Init\max + Init + max + +3 + 100 + + +aNewDataFlow + Init\x1 + Init + x1 + +7 + 1 + diff --git a/examples/testvisu20_multi.py b/examples/testvisu20_multi.py new file mode 100644 index 0000000..581ab0c --- /dev/null +++ b/examples/testvisu20_multi.py @@ -0,0 +1,305 @@ + +# Generated python file of Graph aNewDataFlow + +from SuperV import * +# Graph creation +aNewDataFlow = Graph( 'aNewDataFlow' ) +aNewDataFlow.SetName( 'aNewDataFlow' ) +aNewDataFlow.SetAuthor( '' ) +aNewDataFlow.SetComment( '' ) +aNewDataFlow.Coords( 0 , 0 ) + +# Creation of Factory Nodes + +# Creation of InLine Nodes +PyInitDisplay = [] +PyInitDisplay.append( 'import os ' ) +PyInitDisplay.append( 'import time ' ) +PyInitDisplay.append( 'from LifeCycleCORBA import * ' ) +PyInitDisplay.append( 'from SALOME_NamingServicePy import * ' ) +PyInitDisplay.append( 'import SALOMEDS ' ) +PyInitDisplay.append( 'from VISU import * ' ) +PyInitDisplay.append( 'def InitDisplay(): ' ) +PyInitDisplay.append( ' # --- initialize the ORB ' ) +PyInitDisplay.append( ' orb = CORBA.ORB_init([], CORBA.ORB_ID) ' ) +PyInitDisplay.append( ' # --- create a LifeCycleCORBA instance ' ) +PyInitDisplay.append( ' lcc = LifeCycleCORBA(orb) ' ) +PyInitDisplay.append( ' # --- create a naming service instance ' ) +PyInitDisplay.append( ' naming_service = SALOME_NamingServicePy_i(orb) ' ) +PyInitDisplay.append( ' # --- get Study Manager reference ' ) +PyInitDisplay.append( ' obj = naming_service.Resolve('myStudyManager') ' ) +PyInitDisplay.append( ' StudyManager = obj._narrow(SALOMEDS.StudyManager) ' ) +PyInitDisplay.append( ' # --- load visu component ' ) +PyInitDisplay.append( ' aVisu = lcc.FindOrLoadComponent("FactoryServer","VISU") ' ) +PyInitDisplay.append( ' aStudy = StudyManager.GetStudyByID(1) ' ) +PyInitDisplay.append( ' aVisu.SetCurrentStudy(aStudy) ' ) +PyInitDisplay.append( ' print "InitDisplay --> aVisu ", aVisu ' ) +PyInitDisplay.append( ' time.sleep(2) ' ) +PyInitDisplay.append( ' #aViewManager=aVisu.GetViewManager() ' ) +PyInitDisplay.append( ' #print "InitDisplay --> aViewManager ", aViewManager ' ) +PyInitDisplay.append( ' #time.sleep(2) ' ) +PyInitDisplay.append( ' #aView=aViewManager.GetCurrentView() ' ) +PyInitDisplay.append( ' #aView=aViewManager.Create3DView() ' ) +PyInitDisplay.append( ' #print "InitDisplay --> aView ", aView ' ) +PyInitDisplay.append( ' #time.sleep(2) ' ) +PyInitDisplay.append( ' medFile = "TimeStamps.med" ' ) +PyInitDisplay.append( ' medFile = os.getenv('KERNEL_ROOT_DIR') + '/examples/' + medFile ' ) +PyInitDisplay.append( ' myResult = aVisu.ImportFile(medFile) ' ) +PyInitDisplay.append( ' print "InitDisplay --> myResult ", myResult ' ) +PyInitDisplay.append( ' return aVisu,myResult ' ) +PyInitDisplay.append( '' ) +InitDisplay = aNewDataFlow.INode( 'InitDisplay' , PyInitDisplay ) +InitDisplay.SetName( 'InitDisplay' ) +InitDisplay.SetAuthor( '' ) +InitDisplay.SetComment( 'Compute Node' ) +InitDisplay.Coords( 13 , 173 ) +InitDisplay.OutPort( 'aVisu' , 'objref' ) +InitDisplay.OutPort( 'myResult' , 'objref' ) + +PyDisplayVitesse = [] +PyDisplayVitesse.append( 'import VISU ' ) +PyDisplayVitesse.append( 'import os ' ) +PyDisplayVitesse.append( 'import time ' ) +PyDisplayVitesse.append( 'def DisplayVitesse(index,aVisu,aView,aResult,x1): ' ) +PyDisplayVitesse.append( ' print "----- Display 1 index = ", index,aVisu,aView,aResult,x1 ' ) +PyDisplayVitesse.append( ' aMeshName ="dom" ' ) +PyDisplayVitesse.append( ' myFieldName = "vitesse" ' ) +PyDisplayVitesse.append( ' anEntity = VISU.NODE ' ) +PyDisplayVitesse.append( ' aMesh = aVisu.MeshOnEntity(aResult, aMeshName, anEntity) ' ) +PyDisplayVitesse.append( ' print "----- Display 2 ", aMesh ' ) +PyDisplayVitesse.append( ' aScalarMap=aVisu.ScalarMapOnField(aResult,aMeshName,anEntity,myFieldName,x1) ' ) +PyDisplayVitesse.append( ' print "----- Display 4" ' ) +PyDisplayVitesse.append( ' if aScalarMap is not None: ' ) +PyDisplayVitesse.append( ' aScalarMap.SetScaling(VISU.LINEAR) ' ) +PyDisplayVitesse.append( ' else: ' ) +PyDisplayVitesse.append( ' print "Null scalar map is created" ' ) +PyDisplayVitesse.append( ' print "----- Display 5" ' ) +PyDisplayVitesse.append( ' aView.DisplayOnly(aScalarMap) ' ) +PyDisplayVitesse.append( ' aView.FitAll() ' ) +PyDisplayVitesse.append( ' aView.Update() ' ) +PyDisplayVitesse.append( ' print "----- Display 6" ' ) +PyDisplayVitesse.append( ' theResult=aResult ' ) +PyDisplayVitesse.append( ' #time.sleep(2) ' ) +PyDisplayVitesse.append( ' return theResult ' ) +PyDisplayVitesse.append( '' ) +DisplayVitesse = aNewDataFlow.INode( 'DisplayVitesse' , PyDisplayVitesse ) +DisplayVitesse.SetName( 'DisplayVitesse' ) +DisplayVitesse.SetAuthor( '' ) +DisplayVitesse.SetComment( 'Compute Node' ) +DisplayVitesse.Coords( 609 , 506 ) +DisplayVitesse.InPort( 'index' , 'string' ) +DisplayVitesse.InPort( 'aVisu' , 'objref' ) +DisplayVitesse.InPort( 'aView' , 'objref' ) +DisplayVitesse.InPort( 'aResult' , 'objref' ) +DisplayVitesse.InPort( 'x1' , 'double' ) +DisplayVitesse.OutPort( 'theResult' , 'objref' ) + +PyCreateView = [] +PyCreateView.append( 'def CreateView(aVisu,aResult) : ' ) +PyCreateView.append( ' vm=aVisu.GetViewManager() ' ) +PyCreateView.append( ' aView=vm.Create3DView() ' ) +PyCreateView.append( ' theVisu=aVisu ' ) +PyCreateView.append( ' theResult=aResult ' ) +PyCreateView.append( ' return aView,theVisu,theResult ' ) +CreateView = aNewDataFlow.INode( 'CreateView' , PyCreateView ) +CreateView.SetName( 'CreateView' ) +CreateView.SetAuthor( '' ) +CreateView.SetComment( 'Compute Node' ) +CreateView.Coords( 221 , 563 ) +CreateView.InPort( 'aVisu' , 'objref' ) +CreateView.InPort( 'aResult' , 'objref' ) +CreateView.OutPort( 'aView' , 'objref' ) +CreateView.OutPort( 'theVisu' , 'objref' ) +CreateView.OutPort( 'theResult' , 'objref' ) + +# Creation of Loop Nodes +PyInit = [] +PyInit.append( 'def Init(index,min,max,aVisu,aView,myResult,x1): ' ) +PyInit.append( ' if max >= min : ' ) +PyInit.append( ' index = min ' ) +PyInit.append( ' else : ' ) +PyInit.append( ' index = max ' ) +PyInit.append( ' print "---- Init ",index,min,max,aVisu,aView,myResult,x1 ' ) +PyInit.append( ' return index,min,max,aVisu,aView,myResult,x1 ' ) +PyMoreInit = [] +PyMoreInit.append( 'def More(index,min,max,aVisu,aView,myResult,x1): ' ) +PyMoreInit.append( ' if max >= index : ' ) +PyMoreInit.append( ' DoLoop = 1 ' ) +PyMoreInit.append( ' else : ' ) +PyMoreInit.append( ' DoLoop = 0 ' ) +PyMoreInit.append( ' print "---- More",index,min,max,aVisu,aView,myResult,x1 ' ) +PyMoreInit.append( ' return DoLoop,index,min,max,aVisu,aView,myResult,x1 ' ) +PyNextInit = [] +PyNextInit.append( 'def Next(index,min,max,aVisu,aView,myResult,x1): ' ) +PyNextInit.append( ' index = index + 1 ' ) +PyNextInit.append( ' x1=x1+1.0 ' ) +PyNextInit.append( ' print "---- Next",index,min,max,aVisu,aView,myResult,x1 ' ) +PyNextInit.append( ' return index,min,max,aVisu,aView,myResult,x1 ' ) +Init,EndOfInit = aNewDataFlow.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit ) +EndOfInit.SetName( 'EndOfInit' ) +EndOfInit.SetAuthor( '' ) +EndOfInit.SetComment( '' ) +EndOfInit.Coords( 797 , 507 ) +PyEndOfInit = [] +EndOfInit.SetPyFunction( 'EndInit' , PyEndOfInit ) +Init.SetName( 'Init' ) +Init.SetAuthor( '' ) +Init.SetComment( '' ) +Init.Coords( 428 , 493 ) +Init.InPort( 'index' , 'long' ) +Init.InPort( 'min' , 'long' ) +Init.InPort( 'max' , 'long' ) +Init.InPort( 'aVisu' , 'objref' ) +Init.InPort( 'aView' , 'objref' ) +Init.InPort( 'aResult' , 'objref' ) +Init.InPort( 'x1' , 'double' ) +Init.OutPort( 'index' , 'long' ) +Init.OutPort( 'min' , 'long' ) +Init.OutPort( 'max' , 'long' ) +Init.OutPort( 'aVisu' , 'objref' ) +Init.OutPort( 'aView' , 'objref' ) +Init.OutPort( 'aResult' , 'objref' ) +Init.OutPort( 'x1' , 'double' ) + +PyLoopOnViews = [] +PyLoopOnViews.append( 'def InitViews( aVisu,aResult,ViewCount,MinCount,MaxCount ): ' ) +PyLoopOnViews.append( ' ViewCount=MinCount ' ) +PyLoopOnViews.append( ' return aVisu,aResult,ViewCount,MinCount,MaxCount ' ) +PyMoreLoopOnViews = [] +PyMoreLoopOnViews.append( 'def MoreViews( aVisu,aResult,ViewCount,MinCount,MaxCount ): ' ) +PyMoreLoopOnViews.append( ' if ViewCount < MaxCount: ' ) +PyMoreLoopOnViews.append( ' return 1,aVisu,aResult,ViewCount,MinCount,MaxCount ' ) +PyMoreLoopOnViews.append( ' return 0,aVisu,aResult,ViewCount,MinCount,MaxCount ' ) +PyNextLoopOnViews = [] +PyNextLoopOnViews.append( 'def NextViews( aVisu,aResult,ViewCount,MinCount,MaxCount ): ' ) +PyNextLoopOnViews.append( ' ViewCount = ViewCount + 1 ' ) +PyNextLoopOnViews.append( ' return aVisu,aResult,ViewCount,MinCount,MaxCount ' ) +LoopOnViews,EndOfLoopOnViews = aNewDataFlow.LNode( 'InitViews' , PyLoopOnViews , 'MoreViews' , PyMoreLoopOnViews , 'NextViews' , PyNextLoopOnViews ) +EndOfLoopOnViews.SetName( 'EndOfLoopOnViews' ) +EndOfLoopOnViews.SetAuthor( '' ) +EndOfLoopOnViews.SetComment( '' ) +EndOfLoopOnViews.Coords( 773 , 224 ) +PyEndOfLoopOnViews = [] +EndOfLoopOnViews.SetPyFunction( 'EndInitViews' , PyEndOfLoopOnViews ) +LoopOnViews.SetName( 'LoopOnViews' ) +LoopOnViews.SetAuthor( '' ) +LoopOnViews.SetComment( '' ) +LoopOnViews.Coords( 219 , 218 ) +LoopOnViews.InPort( 'aVisu' , 'objref' ) +LoopOnViews.InPort( 'aResult' , 'objref' ) +LoopOnViews.InPort( 'ViewCount' , 'int' ) +LoopOnViews.InPort( 'MinCount' , 'int' ) +LoopOnViews.InPort( 'MaxCount' , 'int' ) +LoopOnViews.OutPort( 'aVisu' , 'objref' ) +LoopOnViews.OutPort( 'aResult' , 'objref' ) +LoopOnViews.OutPort( 'ViewCount' , 'int' ) +LoopOnViews.OutPort( 'MinCount' , 'int' ) +LoopOnViews.OutPort( 'MaxCount' , 'int' ) + +# Creation of Links +InitDisplayaVisu = InitDisplay.Port( 'aVisu' ) +LoopOnViewsInGate = aNewDataFlow.Link( InitDisplayaVisu , LoopOnViews.Port( 'InGate' ) ) + +LoopOnViewsaVisu = aNewDataFlow.Link( InitDisplayaVisu , LoopOnViews.Port( 'aVisu' ) ) + +InitDisplaymyResult = InitDisplay.Port( 'myResult' ) +LoopOnViewsaResult = aNewDataFlow.Link( InitDisplaymyResult , LoopOnViews.Port( 'aResult' ) ) + +Initindex = Init.Port( 'index' ) +EndOfInitindex = aNewDataFlow.Link( Initindex , EndOfInit.Port( 'index' ) ) + +DisplayVitesseindex = aNewDataFlow.Link( Initindex , DisplayVitesse.Port( 'index' ) ) +DisplayVitesseindex.AddCoord( 1 , 590 , 587 ) +DisplayVitesseindex.AddCoord( 2 , 591 , 527 ) + +Initmin = Init.Port( 'min' ) +EndOfInitmin = aNewDataFlow.Link( Initmin , EndOfInit.Port( 'min' ) ) + +Initmax = Init.Port( 'max' ) +EndOfInitmax = aNewDataFlow.Link( Initmax , EndOfInit.Port( 'max' ) ) + +InitaVisu = Init.Port( 'aVisu' ) +EndOfInitaVisu = aNewDataFlow.Link( InitaVisu , EndOfInit.Port( 'aVisu' ) ) + +DisplayVitesseaVisu = aNewDataFlow.Link( InitaVisu , DisplayVitesse.Port( 'aVisu' ) ) + +InitaView = Init.Port( 'aView' ) +EndOfInitaView = aNewDataFlow.Link( InitaView , EndOfInit.Port( 'aView' ) ) + +DisplayVitesseaView = aNewDataFlow.Link( InitaView , DisplayVitesse.Port( 'aView' ) ) + +InitaResult = Init.Port( 'aResult' ) +DisplayVitesseaResult = aNewDataFlow.Link( InitaResult , DisplayVitesse.Port( 'aResult' ) ) + +Initx1 = Init.Port( 'x1' ) +EndOfInitx1 = aNewDataFlow.Link( Initx1 , EndOfInit.Port( 'x1' ) ) + +DisplayVitessex1 = aNewDataFlow.Link( Initx1 , DisplayVitesse.Port( 'x1' ) ) + +EndOfInitaResult = EndOfInit.Port( 'aResult' ) +EndOfLoopOnViewsaResult = aNewDataFlow.Link( EndOfInitaResult , EndOfLoopOnViews.Port( 'aResult' ) ) +EndOfLoopOnViewsaResult.AddCoord( 1 , 762 , 288 ) +EndOfLoopOnViewsaResult.AddCoord( 2 , 763 , 424 ) +EndOfLoopOnViewsaResult.AddCoord( 3 , 972 , 425 ) +EndOfLoopOnViewsaResult.AddCoord( 4 , 971 , 687 ) + +DisplayVitessetheResult = DisplayVitesse.Port( 'theResult' ) +EndOfInitaResult = aNewDataFlow.Link( DisplayVitessetheResult , EndOfInit.Port( 'aResult' ) ) +EndOfInitaResult.AddCoord( 1 , 787 , 687 ) +EndOfInitaResult.AddCoord( 2 , 786 , 585 ) + +LoopOnViewsaVisu = LoopOnViews.Port( 'aVisu' ) +EndOfLoopOnViewsaVisu = aNewDataFlow.Link( LoopOnViewsaVisu , EndOfLoopOnViews.Port( 'aVisu' ) ) + +CreateViewaVisu = aNewDataFlow.Link( LoopOnViewsaVisu , CreateView.Port( 'aVisu' ) ) +CreateViewaVisu.AddCoord( 1 , 186 , 643 ) +CreateViewaVisu.AddCoord( 2 , 186 , 442 ) +CreateViewaVisu.AddCoord( 3 , 400 , 441 ) +CreateViewaVisu.AddCoord( 4 , 401 , 251 ) + +LoopOnViewsaResult = LoopOnViews.Port( 'aResult' ) +CreateViewaResult = aNewDataFlow.Link( LoopOnViewsaResult , CreateView.Port( 'aResult' ) ) +CreateViewaResult.AddCoord( 1 , 169 , 671 ) +CreateViewaResult.AddCoord( 2 , 170 , 412 ) +CreateViewaResult.AddCoord( 3 , 386 , 413 ) +CreateViewaResult.AddCoord( 4 , 387 , 280 ) + +LoopOnViewsViewCount = LoopOnViews.Port( 'ViewCount' ) +EndOfLoopOnViewsViewCount = aNewDataFlow.Link( LoopOnViewsViewCount , EndOfLoopOnViews.Port( 'ViewCount' ) ) + +LoopOnViewsMinCount = LoopOnViews.Port( 'MinCount' ) +EndOfLoopOnViewsMinCount = aNewDataFlow.Link( LoopOnViewsMinCount , EndOfLoopOnViews.Port( 'MinCount' ) ) + +LoopOnViewsMaxCount = LoopOnViews.Port( 'MaxCount' ) +EndOfLoopOnViewsMaxCount = aNewDataFlow.Link( LoopOnViewsMaxCount , EndOfLoopOnViews.Port( 'MaxCount' ) ) + +CreateViewaView = CreateView.Port( 'aView' ) +InitaView = aNewDataFlow.Link( CreateViewaView , Init.Port( 'aView' ) ) + +CreateViewtheVisu = CreateView.Port( 'theVisu' ) +InitaVisu = aNewDataFlow.Link( CreateViewtheVisu , Init.Port( 'aVisu' ) ) + +CreateViewtheResult = CreateView.Port( 'theResult' ) +InitaResult = aNewDataFlow.Link( CreateViewtheResult , Init.Port( 'aResult' ) ) + +# Creation of Input datas +Initindex = Init.Input( 'index' , 1) +Initmin = Init.Input( 'min' , 1) +Initmax = Init.Input( 'max' , 10) +Initx1 = Init.Input( 'x1' , 1) +LoopOnViewsViewCount = LoopOnViews.Input( 'ViewCount' , 0) +LoopOnViewsMinCount = LoopOnViews.Input( 'MinCount' , 0) +LoopOnViewsMaxCount = LoopOnViews.Input( 'MaxCount' , 10) + +# Creation of Output variables +EndOfInitindex = EndOfInit.Port( 'index' ) +EndOfInitmin = EndOfInit.Port( 'min' ) +EndOfInitmax = EndOfInit.Port( 'max' ) +EndOfInitaVisu = EndOfInit.Port( 'aVisu' ) +EndOfInitaView = EndOfInit.Port( 'aView' ) +EndOfInitx1 = EndOfInit.Port( 'x1' ) +EndOfLoopOnViewsaVisu = EndOfLoopOnViews.Port( 'aVisu' ) +EndOfLoopOnViewsaResult = EndOfLoopOnViews.Port( 'aResult' ) +EndOfLoopOnViewsViewCount = EndOfLoopOnViews.Port( 'ViewCount' ) +EndOfLoopOnViewsMinCount = EndOfLoopOnViews.Port( 'MinCount' ) +EndOfLoopOnViewsMaxCount = EndOfLoopOnViews.Port( 'MaxCount' ) diff --git a/examples/testvisu20_multi.xml b/examples/testvisu20_multi.xml new file mode 100644 index 0000000..346e044 --- /dev/null +++ b/examples/testvisu20_multi.xml @@ -0,0 +1,807 @@ + + + + +? + ? + aNewDataFlow + 1 + ? + +aNewDataFlow + + +long + Init\index + +long + Init\min + +long + Init\max + +double + Init\x1 + +int + LoopOnViews\ViewCount + +int + LoopOnViews\MinCount + +int + LoopOnViews\MaxCount + + +long + EndOfInit\index + +long + EndOfInit\min + +long + EndOfInit\max + +objref + EndOfInit\aVisu + +objref + EndOfInit\aView + +double + EndOfInit\x1 + +objref + EndOfLoopOnViews\aVisu + +objref + EndOfLoopOnViews\aResult + +int + EndOfLoopOnViews\ViewCount + +int + EndOfLoopOnViews\MinCount + +int + EndOfLoopOnViews\MaxCount + + + 13/11/2003 - 11:15:53 + 6/5/2004 - 12:59:28 + 1.05 + ? + ? + ? + 0 + 0 + + +? + ? + InitDisplay + 3 + ? + +InitDisplay + + + +objref + aVisu + +objref + myResult + + + +InitDisplay + + + + + + + + + + + + + + + + + + + + + aVisu ", aVisu ]]> + + + aViewManager ", aViewManager ]]> + + + + aView ", aView ]]> + + + + + myResult ", myResult ]]> + + + 6/5/2004 - 12:59:28 + 6/5/2004 - 12:59:28 + 1.05 + ? + ? + Compute Node + 13 + 173 + +? + ? + Init + 4 + EndOfInit + +Init + + +long + index + +long + min + +long + max + +objref + aVisu + +objref + aView + +objref + aResult + +double + x1 + + +long + index + +long + min + +long + max + +objref + aVisu + +objref + aView + +objref + aResult + +double + x1 + + + +Init + + = min : ]]> + + + + + + +More + + = index : ]]> + + + + + + +Next + + + + + + 6/5/2004 - 12:59:28 + 6/5/2004 - 12:59:28 + 1.05 + ? + ? + ? + 428 + 493 + +? + ? + EndOfInit + 5 + Init + +EndOfInit + + +long + index + +long + min + +long + max + +objref + aVisu + +objref + aView + +objref + aResult + +double + x1 + + +long + index + +long + min + +long + max + +objref + aVisu + +objref + aView + +objref + aResult + +double + x1 + + + +? + + 6/5/2004 - 12:59:28 + 6/5/2004 - 12:59:28 + 1.05 + ? + ? + ? + 797 + 507 + +? + ? + DisplayVitesse + 3 + ? + +DisplayVitesse + + +string + index + +objref + aVisu + +objref + aView + +objref + aResult + +double + x1 + + +objref + theResult + + + +DisplayVitesse + + + + + + + + + + + + + + + + + + + + + + + + + + 6/5/2004 - 12:59:28 + 6/5/2004 - 12:59:28 + 1.05 + ? + ? + Compute Node + 609 + 506 + +? + ? + LoopOnViews + 4 + EndOfLoopOnViews + +LoopOnViews + + +objref + aVisu + +objref + aResult + +int + ViewCount + +int + MinCount + +int + MaxCount + + +objref + aVisu + +objref + aResult + +int + ViewCount + +int + MinCount + +int + MaxCount + + + +InitViews + + + + +MoreViews + + + + + +NextViews + + + + 6/5/2004 - 12:59:28 + 6/5/2004 - 12:59:28 + 1.05 + ? + ? + ? + 219 + 218 + +? + ? + EndOfLoopOnViews + 5 + LoopOnViews + +EndOfLoopOnViews + + +objref + aVisu + +objref + aResult + +int + ViewCount + +int + MinCount + +int + MaxCount + + +objref + aVisu + +objref + aResult + +int + ViewCount + +int + MinCount + +int + MaxCount + + + +EndLoop + + 6/5/2004 - 12:59:28 + 6/5/2004 - 12:59:28 + 1.05 + ? + ? + ? + 773 + 224 + +? + ? + CreateView + 3 + ? + +CreateView + + +objref + aVisu + +objref + aResult + + +objref + aView + +objref + theVisu + +objref + theResult + + + +CreateView + + + + + + + 6/5/2004 - 12:59:28 + 6/5/2004 - 12:59:28 + 1.05 + ? + ? + Compute Node + 221 + 563 + + +InitDisplay + aVisu + LoopOnViews + InGate + + +InitDisplay + aVisu + LoopOnViews + aVisu + + +InitDisplay + myResult + LoopOnViews + aResult + + +Init + DoLoop + EndOfInit + DoLoop + + +Init + index + EndOfInit + index + + +Init + index + DisplayVitesse + index + + +590 + 587 + +591 + 527 + +Init + min + EndOfInit + min + + +Init + max + EndOfInit + max + + +Init + aVisu + EndOfInit + aVisu + + +Init + aVisu + DisplayVitesse + aVisu + + +Init + aView + EndOfInit + aView + + +Init + aView + DisplayVitesse + aView + + +Init + aResult + DisplayVitesse + aResult + + +Init + x1 + EndOfInit + x1 + + +Init + x1 + DisplayVitesse + x1 + + +EndOfInit + DoLoop + Init + InitLoop + + +EndOfInit + aResult + EndOfLoopOnViews + aResult + + +762 + 288 + +763 + 424 + +972 + 425 + +971 + 687 + +DisplayVitesse + theResult + EndOfInit + aResult + + +787 + 687 + +786 + 585 + +LoopOnViews + DoLoop + EndOfLoopOnViews + DoLoop + + +LoopOnViews + aVisu + EndOfLoopOnViews + aVisu + + +LoopOnViews + aVisu + CreateView + aVisu + + +186 + 643 + +186 + 442 + +400 + 441 + +401 + 251 + +LoopOnViews + aResult + CreateView + aResult + + +169 + 671 + +170 + 412 + +386 + 413 + +387 + 280 + +LoopOnViews + ViewCount + EndOfLoopOnViews + ViewCount + + +LoopOnViews + MinCount + EndOfLoopOnViews + MinCount + + +LoopOnViews + MaxCount + EndOfLoopOnViews + MaxCount + + +EndOfLoopOnViews + DoLoop + LoopOnViews + InitLoop + + +CreateView + aView + Init + aView + + +CreateView + theVisu + Init + aVisu + + +CreateView + theResult + Init + aResult + + + +aNewDataFlow + Init\index + Init + index + +3 + 1 + + +aNewDataFlow + Init\min + Init + min + +3 + 1 + + +aNewDataFlow + Init\max + Init + max + +3 + 10 + + +aNewDataFlow + Init\x1 + Init + x1 + +7 + 1 + + +aNewDataFlow + LoopOnViews\ViewCount + LoopOnViews + ViewCount + +3 + 0 + + +aNewDataFlow + LoopOnViews\MinCount + LoopOnViews + MinCount + +3 + 0 + + +aNewDataFlow + LoopOnViews\MaxCount + LoopOnViews + MaxCount + +3 + 10 + diff --git a/idl/Makefile.in b/idl/Makefile.in index bf0306b..c831f20 100644 --- a/idl/Makefile.in +++ b/idl/Makefile.in @@ -17,15 +17,15 @@ # # See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org # + # # # File : Makefile.in # Module : idl - top_srcdir=@top_srcdir@ top_builddir=.. srcdir=@srcdir@ -VPATH=.:$(srcdir):${KERNEL_ROOT_DIR}/idl/salome +VPATH=.:${KERNEL_ROOT_DIR}/idl/salome @COMMENCE@ @@ -35,11 +35,14 @@ IDL_FILES = \ PY_CLIENT_IDL = $(IDL_FILES) # we copy all idl file in $(top_builddir)/idl -inc: $(IDL_FILES:%=$(top_builddir)/idl/%) +inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%) + +$(top_builddir)/idl/salome: + mkdir $@ -$(IDL_FILES:%=$(top_builddir)/idl/%):$(top_builddir)/idl/%:% +$(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%) # $(CP) $< $@ - cp -f $< $@ + cp -f $^ $(top_builddir)/idl/salome lib: pyidl @@ -51,7 +54,7 @@ pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py) $(PYTHON_BUILD_SITE): $(INSTALL) -d $@ -$(PYTHON_BUILD_SITE)/%_idl.py: %.idl +$(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $< @@ -59,12 +62,12 @@ $(PYTHON_BUILD_SITE)/%_idl.py: %.idl install: install-pyidl install-idl # create directory $(idldir) and copy idl files into it -install-idl: $(IDL_FILES) +install-idl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%) $(INSTALL) -d $(idldir) $(INSTALL_DATA) $^ $(idldir) -install-pyidl: $(IDL_FILES) +install-pyidl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%) $(INSTALL) -d $(PYTHON_SITE_INSTALL) @for file in $^ dummy; do \ if [ $$file != "dummy" ]; then \ @@ -79,6 +82,6 @@ cleandep: distclean: -$(RM) *.py - -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/%) + -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/salome/%) -$(RM) Makefile diff --git a/idl/SUPERV.idl b/idl/SUPERV.idl index 18eae1a..4d3f195 100644 --- a/idl/SUPERV.idl +++ b/idl/SUPERV.idl @@ -44,14 +44,40 @@ implemented in different kinds of nodes of the graph. */ enum KindOfPort { UndefinedParameter , ServiceParameter , GateParameter , InLineParameter , LoopParameter , SwitchParameter , - EndSwitchParameter , GOTOParameter } ; + EndSwitchParameter , GOTOParameter , DataStreamParameter } ; + +/*! +This enumeration contains a set of dependencies of InPorts and OutPorts. +*/ +// enum KindOfDependency { UndefinedDependency , TimeDependency , IterationDependency } ; + +/*! +This enumeration contains a set of schemas of InPorts. +*/ + enum KindOfSchema { SCHENULL , TI , TF , DELTA } ; + +/*! +This enumeration contains a set of interpolations of InPorts. +*/ + enum KindOfInterpolation { INTERNULL , L0 , L1 } ; + +/*! +This enumeration contains a set of extrapolations of InPorts. +*/ + enum KindOfExtrapolation { EXTRANULL , E0 , E1 } ; + +/*! +This enumeration contains a set of dependencies of Ports. +*/ + enum KindOfDataStreamTrace { WithoutTrace , SummaryTrace , DetailedTrace } ; /*! This enumeration contains a set of elements defining the type of the node. */ - enum KindOfNode { FactoryNode , DataFlowNode , ComputingNode , + enum KindOfNode { FactoryNode , DataFlowGraph , ComputingNode , InLineNode , LoopNode , EndLoopNode , - SwitchNode , EndSwitchNode , GOTONode , UnknownNode }; + SwitchNode , EndSwitchNode , GOTONode , DataStreamGraph , + UnknownNode }; /*! This struct contains fields defining the date. @@ -97,12 +123,16 @@ This enumeration contains a set of elements defining the current state of the no interface Value ; interface Link ; + interface StreamLink ; typedef sequence ListOfLinks ; + typedef sequence ListOfStreamLinks ; interface Port ; + interface StreamPort ; typedef sequence ListOfPorts ; + typedef sequence ListOfStreamPorts ; interface CNode ; interface FNode ; @@ -112,6 +142,9 @@ This enumeration contains a set of elements defining the current state of the no interface ELNode ; interface SNode ; interface ESNode ; + interface StreamGraph ; + interface Graph ; + typedef sequence ListOfCNodes ; typedef sequence ListOfFNodes ; typedef sequence ListOfINodes ; @@ -120,6 +153,8 @@ This enumeration contains a set of elements defining the current state of the no typedef sequence ListOfELNodes ; typedef sequence ListOfSNodes ; typedef sequence ListOfESNodes ; + typedef sequence ListOfGraphs ; + /*! This struct contains fields defining different types of nodes. */ @@ -133,12 +168,9 @@ This struct contains fields defining different types of nodes. ListOfELNodes ELNodes ; ListOfSNodes SNodes ; ListOfESNodes ESNodes ; + ListOfGraphs Graphs ; } ; - interface Graph ; - - typedef sequence ListOfGraphs ; - // ToSuspendState : will be Suspended before running if waiting or // will be Suspended while running or // will be Suspended after run @@ -222,6 +254,20 @@ This interface contains a set of methods necessary for management of a %graph. */ SUPERV::Graph GraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile +/*! + Constructs a StreamGraph with possibility to read/edit it + \param aGraph %aGraphName or %aGraphXmlFile +*/ + SUPERV::StreamGraph StreamGraph(in string aGraph ) ; // aGraphName or aGraphXmlFile + +/*! + Constructs a read Only StreamGraph ( for execution ). + \note
In this graph there is also a possibility to update nodes, coordinates of the links, + of container names and input data. + \param aGraph %aGraphName or %aGraphXmlFile +*/ + SUPERV::StreamGraph StreamGraphE(in string aGraph ) ; // aGraphName or aGraphXmlFile + /*! Creates a value of string type which will be used for Input method in the interface %Node. \param aString Input value of string type. @@ -238,6 +284,12 @@ Creates a value of any type which will be used for Input metho */ SUPERV::Graph getGraph(in string ior); // get Graph from is IOR +/*! + Gets a graph with a definite %IOR +\param ior String parameter defining %IOR of the graph. +*/ + SUPERV::StreamGraph getStreamGraph(in string ior); // get Graph from is IOR + }; /*! \brief %CNode interface @@ -310,38 +362,59 @@ Allows to update the comments about this node(graph). boolean SetComment(in string aComment ) ; /*! - Gets a port of the node. + Gets a port of the node (for compatibility : see GetInPort - GetOutPort). */ SUPERV::Port Port( in string aParameterName ) ; +/*! Gets an Input port in a node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +*/ + SUPERV::Port GetInPort( in string aParameterName ) ; + +/*! Gets an Output port in a node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +*/ + SUPERV::Port GetOutPort( in string aParameterName ) ; + +/*! Gets an Input StreamPort in a node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +*/ + SUPERV::StreamPort GetInStreamPort( in string aParameterName ) ; + +/*! Gets an Output StreamPort in a node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +*/ + SUPERV::StreamPort GetOutStreamPort( in string aParameterName ) ; + /*! Enters a value into an Input %Port */ SUPERV::Port Input( in string InputParameterName , in Value aValue ) ; - - // Create an Input %Port and an Output Port in LabelNode or ControlNode - // boolean BusPort( in string InOutParameterName , - // in string InOutParameterType , - // out SUPERV::Port InputPort , - // out SUPERV::Port OutputPort ) ; - // boolean BusPorts( in string InputParameterName , - // in string InputParameterType , - // in string OutputParameterName , - // in string OutputParameterType , - // out SUPERV::Port InputPort , - // out SUPERV::Port OutputPort ) ; - /*! Gets a list of ports of the node(graph) */ SUPERV::ListOfPorts Ports() ; -/*! Gets a list of links of a port +/*! + Gets a list of ports of the node(graph) +*/ + SUPERV::ListOfStreamPorts StreamPorts() ; + +/*! Gets a list of links of a node(graph) */ SUPERV::ListOfLinks Links() ; +/*! Gets a list of StreamLinks of a node(graph) +*/ + SUPERV::ListOfStreamLinks StreamLinks() ; + +/*! +Returns True if this node is a graph. +\note
A node of the graph can also represent in its turn another graph. +*/ + boolean IsStreamGraph() ; /*! Returns True if this node is a graph. \note
A node of the graph can also represent in its turn another graph. @@ -381,9 +454,13 @@ Returns True if the node appears to be a %endswitch node. boolean IsEndSwitch() ; /*! - Returns the number of subgraphs. + Returns the numero of subgraph of a node. */ long SubGraph() ; +/*! + Returns the numero of substreamgraph of a node. +*/ + long SubStreamGraph() ; /*! Returns the number of threads of the graph. @@ -581,20 +658,29 @@ executed for performing calculations, as well as input and output parameters for */ string PyFuncName() ; -/*! Creates an Input port in an Inline node. - +/*! Creates an Input port in a node. \param aParameterName This value sets the name of the parameter which will be defined in this port. \param aParameterType This value sets the type of the parameter which will be defined in this port. */ - SUPERV::Port InPort( in string aParameterName , in string aParameterType ) ; /*! Creates an Output port in an Inline node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +\param aParameterType This value sets the type of the parameter which will be defined in this port. +*/ + SUPERV::Port OutPort( in string aParameterName , in string aParameterType ) ; +/*! Creates an Input DataStreamPort in an Inline node. \param aParameterName This value sets the name of the parameter which will be defined in this port. \param aParameterType This value sets the type of the parameter which will be defined in this port. */ + SUPERV::StreamPort InStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ; + +/*! Creates an Output DataStreamPort in an Inline node. +\param aParameterName This value sets the name of the parameter which will be defined in this port. +\param aParameterType This value sets the type of the parameter which will be defined in this port. +*/ + SUPERV::StreamPort OutStreamPort( in string aParameterName , in SALOME_ModuleCatalog::DataStreamType aParameterType , in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ; - SUPERV::Port OutPort( in string aParameterName , in string aParameterType ) ; } ; /*! \brief %GNode class @@ -803,10 +889,6 @@ method and its next usage. /*@}*/ -/*! -Returns the number of independent subgraphs -*/ - long GraphsNumber() ; /*! Returns the number of currently running threads. */ @@ -824,11 +906,6 @@ Returns True if the graph can be executed. */ boolean IsExecutable() ; /*! -Returns True if the graph represents a working algorithm. -*/ - boolean IsDataFlow() ; - -/*! Returns True if the graph is being currently edited. */ boolean IsEditing() ; @@ -850,6 +927,10 @@ Allows to copy one graph into another. */ SUPERV::Graph Copy() ; /*! +Convert a FlowGraph to a StreamGraph. +*/ + SUPERV::StreamGraph ToStreamGraph() ; +/*! Merges two graphs */ boolean Merge( in Graph aGraph ) ; @@ -867,10 +948,68 @@ Gets IOR of the garph. string getIOR(); /*! -Returns a list of graphs. -\note Not implemented +Returns the number of independent subgraphs +*/ + long SubGraphsNumber() ; +/*! +Returns a list of Nodes of a SubGraph. +*/ + SUPERV::ListOfNodes SubGraphsNodes( in long SubGraphNumber ) ; + + } ; + + + + + +/*! \brief Interface of a StreamGraph + +This interface includes a set of methods used for management of the graphs in %SUPERVISION module. +*/ + + ///////////////////// + interface StreamGraph : Graph { + ///////////////////// + +/*! +Allows to copy one graph into another. +*/ + SUPERV::StreamGraph StreamCopy() ; +/*! + Creates a link connecting two ports (%Output %Port and %Input %Port) of the nodes in a Graph +*/ + SUPERV::StreamLink StreamLink( in SUPERV::StreamPort OutputPort , + in SUPERV::StreamPort InputPort ) ; + +/*! +Returns a list of links of the graph. +*/ + SUPERV::ListOfStreamLinks GStreamLinks() ; + boolean SetStreamParams( in long Timeout , + in SUPERV::KindOfDataStreamTrace DataStreamTrace , + in double DeltaTime ) ; + void StreamParams( out long Timeout , + out SUPERV::KindOfDataStreamTrace DataStreamTrace , + out double DeltaTime ) ; + +/*! +Returns the number of independent subStreamgraphs +*/ + long SubStreamGraphsNumber() ; +/*! +Returns a list of Nodes of a SubStreamGraph. +*/ + SUPERV::ListOfNodes SubStreamGraphsNodes( in long SubStreamGraphNumber ) ; + +/*! +Convert a StreamGraph to a FlowGraph. +*/ + SUPERV::Graph ToFlowGraph() ; + +/*! +Merge a StreamGraph. */ - SUPERV::ListOfGraphs Graphs() ; + boolean StreamMerge( in StreamGraph aStreamGraph ) ; } ; @@ -878,6 +1017,7 @@ Returns a list of graphs. + /*! \brief Interface of the %link This interface contains a set of methods used for representation and management of the links @@ -888,12 +1028,12 @@ connecting nodes in a %graph. interface Link : Engines::Component { ////////////// /*! -Associates an %Output %Port to the Link +Returns the %Output %Port of the Link */ SUPERV::Port OutPort() ; /*! -Associates an %Input %Port to the Link +Returns the %Input %Port of the Link */ SUPERV::Port InPort() ; @@ -944,6 +1084,37 @@ Sets the location of a coordinate point of the link. } ; + + + + + +/*! \brief Interface of the %link + +This interface contains a set of methods used for representation and management of the links +connecting nodes in a %graph. +*/ + + //////////////////// + interface StreamLink : Link { + //////////////////// +/*! +Returns the %Output %StreamPort of the StreamLink +*/ + SUPERV::StreamPort OutStreamPort() ; + +/*! +Returns the %Input %StreamPort of the StreamLink +*/ + SUPERV::StreamPort InStreamPort() ; + + + } ; + + + + + /*! \brief %Value interface This interface contains a set of methods used for setting initial parameters of the ports @@ -1067,14 +1238,47 @@ Returns True if the %Port appears to be an EndSwitch Node connected to several o */ boolean IsEndSwitch() ; -/*! Returns the current state of the graph. + boolean IsDataStream() ; + +/*! Returns the current state of the port. */ SUPERV::GraphState State() ; -/*! Returns True if calculation is finished. +/*! Returns True if computation is finished. */ boolean IsDone() ; } ; + //////////////////// + interface StreamPort : Port { + //////////////////// + + // Link of a StreamPort +/*! +Returns the link of a %StreamPort +*/ + SUPERV::StreamLink StreamLink() ; + +/*! Returns the current Dependency of the DataStreamPort : TimeDependency or IterationDependency +*/ + SALOME_ModuleCatalog::DataStreamDependency Dependency() ; + boolean SetDependency( in SALOME_ModuleCatalog::DataStreamDependency aDependency ) ; + +/*! Sets or Returns the current kinds of Schema, Interpolation and Extrapolation of the InDataStreamPort +*/ + boolean SetParams( in KindOfSchema aKindOfSchema , + in KindOfInterpolation aKindOfInterpolation , + in KindOfExtrapolation aKindOfExtrapolation ) ; + boolean Params( out KindOfSchema aKindOfSchema , + out KindOfInterpolation aKindOfInterpolation , + out KindOfExtrapolation aKindOfExtrapolation ) ; + +/*! Sets or Returns the current number of values ("NIVEAU") of the OutDataStreamPort +*/ + boolean SetNumberOfValues( in long aNumberOfValues ) ; + long NumberOfValues() ; + + } ; + }; #endif diff --git a/resources/SUPERV.config b/resources/SUPERV.config new file mode 100644 index 0000000..6925397 --- /dev/null +++ b/resources/SUPERV.config @@ -0,0 +1 @@ +language=en \ No newline at end of file diff --git a/resources/SUPERV_en.xml b/resources/SUPERV_en.xml index 0542605..c268509 100755 --- a/resources/SUPERV_en.xml +++ b/resources/SUPERV_en.xml @@ -34,7 +34,7 @@ - + -- 2.39.2