+++ /dev/null
-# 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
-GraphSyracuseCpp = Graph( 'GraphSyracuseCpp' )
-GraphSyracuseCpp.SetName( 'GraphSyracuseCpp' )
-GraphSyracuseCpp.SetAuthor( 'JR' )
-GraphSyracuseCpp.SetComment( 'Syracuse algorithm' )
-GraphSyracuseCpp.Coords( 0 , 0 )
-
-# Creation of Computing Nodes
-Syracuse = GraphSyracuseCpp.Node( 'SyrComponent' , 'SyrComponent' , 'Init' )
-Syracuse.SetName( 'Syracuse' )
-Syracuse.SetAuthor( '' )
-#Syracuse.SetContainer( 'localhost/FactoryServer' )
-Syracuse.SetComment( '' )
-Syracuse.Coords( 9 , 207 )
-test_IsEven = GraphSyracuseCpp.CNode( 'SyrComponent' , 'Syr' , 'IsEven' )
-test_IsEven.SetName( 'test_IsEven' )
-test_IsEven.SetAuthor( '' )
-#test_IsEven.SetContainer( 'localhost/FactoryServer' )
-test_IsEven.SetComment( '' )
-test_IsEven.Coords( 197 , 407 )
-test_IsOne = GraphSyracuseCpp.CNode( 'SyrComponent' , 'Syr' , 'IsOne' )
-test_IsOne.SetName( 'test_IsOne' )
-test_IsOne.SetAuthor( '' )
-#test_IsOne.SetContainer( 'localhost/FactoryServer' )
-test_IsOne.SetComment( '' )
-test_IsOne.Coords( 208 , 59 )
-m3p1_M3p1 = GraphSyracuseCpp.CNode( 'SyrComponent' , 'Syr' , 'M3p1' )
-m3p1_M3p1.SetName( 'm3p1_M3p1' )
-m3p1_M3p1.SetAuthor( '' )
-#m3p1_M3p1.SetContainer( 'localhost/FactoryServer' )
-m3p1_M3p1.SetComment( '' )
-m3p1_M3p1.Coords( 418 , 408 )
-div2_Div2 = GraphSyracuseCpp.CNode( 'SyrComponent' , 'Syr' , 'Div2' )
-div2_Div2.SetName( 'div2_Div2' )
-div2_Div2.SetAuthor( '' )
-#div2_Div2.SetContainer( 'localhost/FactoryServer' )
-div2_Div2.SetComment( '' )
-div2_Div2.Coords( 414 , 10 )
-incr_Incr = GraphSyracuseCpp.CNode( 'SyrComponent' , 'Syr' , 'Incr' )
-incr_Incr.SetName( 'incr_Incr' )
-incr_Incr.SetAuthor( '' )
-#incr_Incr.SetContainer( 'localhost/FactoryServer' )
-incr_Incr.SetComment( '' )
-incr_Incr.Coords( 416 , 207 )
-result_Current = GraphSyracuseCpp.CNode( 'SyrComponent' , 'Syr' , 'Current' )
-result_Current.SetName( 'result_Current' )
-result_Current.SetAuthor( '' )
-#result_Current.SetContainer( 'localhost/FactoryServer' )
-result_Current.SetComment( '' )
-result_Current.Coords( 603 , 216 )
-result_Count = GraphSyracuseCpp.CNode( 'SyrComponent' , 'Syr' , 'Count' )
-result_Count.SetName( 'result_Count' )
-result_Count.SetAuthor( '' )
-#result_Count.SetContainer( 'localhost/FactoryServer' )
-result_Count.SetComment( '' )
-result_Count.Coords( 803 , 212 )
-
-# Creation of intermediate Output variables and of Computing Links
-SyracuseaSyracuse = Syracuse.Port( 'aSyracuse' )
-test_IsEvenaSyracuse = GraphSyracuseCpp.Link( SyracuseaSyracuse , test_IsEven.Port( 'aSyracuse' ) )
-test_IsEvenaSyracuse.AddCoord( 1 , 175 , 559 )
-test_IsEvenaSyracuse.AddCoord( 2 , 175 , 359 )
-test_IsOneaSyracuse = GraphSyracuseCpp.Link( SyracuseaSyracuse , test_IsOne.Port( 'aSyracuse' ) )
-test_IsOneaSyracuse.AddCoord( 1 , 177 , 211 )
-test_IsOneaSyracuse.AddCoord( 2 , 177 , 359 )
-m3p1_M3p1aSyracuse = GraphSyracuseCpp.Link( SyracuseaSyracuse , m3p1_M3p1.Port( 'aSyracuse' ) )
-m3p1_M3p1aSyracuse.AddCoord( 1 , 388 , 560 )
-m3p1_M3p1aSyracuse.AddCoord( 2 , 388 , 359 )
-div2_Div2aSyracuse = GraphSyracuseCpp.Link( SyracuseaSyracuse , div2_Div2.Port( 'aSyracuse' ) )
-div2_Div2aSyracuse.AddCoord( 1 , 389 , 162 )
-div2_Div2aSyracuse.AddCoord( 2 , 389 , 359 )
-incr_IncraSyracuse = GraphSyracuseCpp.Link( SyracuseaSyracuse , incr_Incr.Port( 'aSyracuse' ) )
-result_CurrentaSyracuse = GraphSyracuseCpp.Link( SyracuseaSyracuse , result_Current.Port( 'aSyracuse' ) )
-result_CurrentaSyracuse.AddCoord( 1 , 590 , 368 )
-result_CurrentaSyracuse.AddCoord( 2 , 590 , 390 )
-result_CurrentaSyracuse.AddCoord( 3 , 388 , 390 )
-result_CurrentaSyracuse.AddCoord( 4 , 388 , 359 )
-result_CountaSyracuse = GraphSyracuseCpp.Link( SyracuseaSyracuse , result_Count.Port( 'aSyracuse' ) )
-result_CountaSyracuse.AddCoord( 1 , 785 , 364 )
-result_CountaSyracuse.AddCoord( 2 , 785 , 391 )
-result_CountaSyracuse.AddCoord( 3 , 389 , 391 )
-result_CountaSyracuse.AddCoord( 4 , 389 , 357 )
-
-# Missing Input datas
-SyracuseanOddInteger = Syracuse.Input( 'anOddInteger' , 7 )
-
-# Creation of Output variables
-test_IsEvenBoolEven = test_IsEven.Port( 'BoolEven' )
-test_IsOneBoolOne = test_IsOne.Port( 'BoolOne' )
-count_incr_Incr = incr_Incr.Port('aSyracuse')
-result_CurrentaCurrent = result_Current.Port( 'aCurrent' )
-
-GraphSyracuseCpp.IsValid()
-GraphSyracuseCpp.LevelMax()
-GraphSyracuseCpp.ThreadsMax()
-
-exec GraphSyracuseCpp.ListNodes()
-SyracuseanOddInteger = Syracuse.Input( 'anOddInteger' , 7 )
-test_IsEvenBoolEven = test_IsEven.Port( 'BoolEven' )
-test_IsOneBoolOne = test_IsOne.Port( 'BoolOne' )
-count_incr_Incr = incr_Incr.Port('aSyracuse')
-result_CurrentaCurrent = result_Current.Port( 'aCurrent' )
-
-
-GraphSyracuseCpp.Start( 7 )
-
-# Suspend des nodes de tete de Syr
-sts = test_IsOne.Suspend()
-sts = test_IsEven.Suspend()
-sts = m3p1_M3p1.Suspend()
-sts = div2_Div2.Suspend()
-sts = incr_Incr.Suspend()
-sts = result_Current.Suspend()
-sts = result_Count.Suspend()
-
-# Ex\81écution du node de tete
-sts = Syracuse.Resume()
-sts = Syracuse.DoneW()
-
-# Attente de suspension de test et demandes de suspension apr\81ès ex\81écution
-sts = test_IsOne.SuspendedW()
-sts = test_IsOne.SuspendDone()
-sts = test_IsEven.SuspendedW()
-sts = test_IsEven.SuspendDone()
-
-# Ex\81écution de test avec la valeur de d\81épart
-sts = test_IsOne.Resume()
-sts = test_IsEven.Resume()
-
-# Attentes de suspension de m3p1, div2, incr et result.
-# Puis demandes de suspension apr\81ès ex\81écution
-sts = m3p1_M3p1.SuspendedW()
-sts = div2_Div2.SuspendedW()
-sts = incr_Incr.SuspendedW()
-sts = result_Current.SuspendedW()
-sts = result_Count.SuspendedW()
-sts = m3p1_M3p1.SuspendDone()
-sts = div2_Div2.SuspendDone()
-sts = incr_Incr.SuspendDone()
-sts = result_Current.SuspendDone()
-
-# Attente de fin d'ex\81écution de test
-sts = test_IsOne.SuspendedW()
-sts = test_IsEven.SuspendedW()
-
-GraphSyracuseCpp.PrintThreads()
-
-IsOneBoolOne = test_IsOneBoolOne.ToString()
-while int( IsOneBoolOne ) == 0 :
- IsEvenBoolEven = test_IsEvenBoolEven.ToString()
- if int( IsEvenBoolEven ) == 0 :
- sts = m3p1_M3p1.ReRun()
- sts = incr_Incr.ReRun()
- sts = m3p1_M3p1.SuspendedW()
- sts = result_Current.ReRun()
- sts = test_IsOne.ReRun()
- sts = test_IsEven.ReRun()
- sts = test_IsOne.SuspendedW()
- sts = test_IsEven.SuspendedW()
- sts = incr_Incr.SuspendedW()
- sts = result_Current.SuspendedW()
- print "m3p1_M3p1",result_CurrentaCurrent.ToString(),IsEvenBoolEven
- IsEvenBoolEven = test_IsEvenBoolEven.ToString()
- while int( IsEvenBoolEven ) == 1 :
- sts = div2_Div2.ReRun()
- sts = incr_Incr.ReRun()
- sts = div2_Div2.SuspendedW()
- sts = result_Current.ReRun()
- sts = test_IsOne.ReRun()
- sts = test_IsEven.ReRun()
- sts = test_IsOne.SuspendedW()
- sts = test_IsEven.SuspendedW()
- sts = incr_Incr.SuspendedW()
- sts = IsEvenBoolEven = test_IsEvenBoolEven.ToString()
- sts = result_Current.SuspendedW()
- print "div2_Div2",result_CurrentaCurrent.ToString(),IsEvenBoolEven
- IsOneBoolOne = test_IsOneBoolOne.ToString()
-
-
-
-GraphSyracuseCpp.PrintThreads()
-sts = m3p1_M3p1.ControlClear()
-sts = m3p1_M3p1.Resume()
-sts = div2_Div2.ControlClear()
-sts = div2_Div2.Resume()
-sts = incr_Incr.ControlClear()
-sts = incr_Incr.Resume()
-sts = test_IsOne.Resume()
-sts = test_IsEven.Resume()
-sts = result_Current.ControlClear()
-sts = result_Current.Resume()
-sts = result_Count.ControlClear()
-sts = result_Count.Resume()
-sts = GraphSyracuseCpp.DoneW()
-GraphSyracuseCpp.PrintPorts()
-GraphSyracuseCpp.PrintThreads()
-