From e92234e01975ce15be247ff9d03f7b3e9cd7fccb Mon Sep 17 00:00:00 2001 From: yfr Date: Tue, 20 Jul 2004 09:27:37 +0000 Subject: [PATCH] DCQ:prepare 2.0.0 --- doc/html/INPUT/HTML/AddComponent.html | 46 - doc/html/INPUT/HTML/DivComponent.html | 14 - doc/html/INPUT/HTML/FactorialComponent.html | 14 - doc/html/INPUT/HTML/MulComponent.html | 14 - doc/html/INPUT/HTML/NPMatComponent.html | 50 - doc/html/INPUT/HTML/NPSolveComponent.html | 18 - doc/html/INPUT/HTML/NPVecComponent.html | 50 - doc/html/INPUT/HTML/SUPERV.html | 682 -------- doc/html/INPUT/HTML/SubComponent.html | 14 - doc/html/INPUT/HTML/SyrComponent.html | 110 -- doc/html/INPUT/HTML/SyrControlComponent.html | 38 - doc/html/INPUT/doxyfile | 200 --- doc/html/INPUT/sources/Application-About.png | Bin 19226 -> 0 bytes doc/html/INPUT/sources/Application-About1.jpg | Bin 14327 -> 0 bytes doc/html/INPUT/sources/application.gif | Bin 2602 -> 0 bytes doc/html/INPUT/sources/application.jpg | Bin 792 -> 0 bytes doc/html/INPUT/sources/bg_salome.gif | Bin 17294 -> 0 bytes doc/html/INPUT/sources/logocorp.gif | Bin 1792 -> 0 bytes doc/html/INPUT/sources/myheader.html | 24 - doc/html/INPUT/sources/occ.gif | Bin 14790 -> 0 bytes doc/html/INPUT/sources/static/doxygen.css | 49 - .../INPUT/sources/static/examples_SUPERV.html | 495 ------ doc/html/INPUT/sources/static/nodestypes.jpg | Bin 9384 -> 0 bytes .../sources/static/overview_Supervision.html | 324 ---- doc/html/INPUT/sources/static/page2.html | 31 - doc/html/INPUT/sources/static/tree.js | 71 - doc/html/INPUT/sources/static/treeview.js | 505 ------ doc/html/Makefile.in | 41 - src/AddComponent/AddComponent_Impl.cxx | 227 --- src/GraphEditor/DataFlowEditor_DataFlow.hxx | 36 +- src/GraphEditor/DataFlowEditor_DataFlow.lxx | 102 +- src/GraphEditor/DataFlowEditor_InNode.cxx | 44 +- src/GraphEditor/DataFlowEditor_InNode.hxx | 11 + src/GraphEditor/DataFlowEditor_OutNode.cxx | 499 ++++-- src/GraphEditor/DataFlowEditor_OutNode.hxx | 37 +- src/GraphEditor/Makefile.in | 2 +- .../DataFlowExecutor_DataFlow.cxx | 114 +- .../DataFlowExecutor_DataFlow.hxx | 26 +- .../DataFlowExecutor_DataFlow.lxx | 41 +- .../DataFlowExecutor_FiniteStateMachine.cxx | 229 ++- .../DataFlowExecutor_FiniteStateMachine.hxx | 73 +- src/GraphExecutor/DataFlowExecutor_InNode.cxx | 177 +- src/GraphExecutor/DataFlowExecutor_InNode.hxx | 26 +- .../DataFlowExecutor_InNodeThreads.cxx | 504 +++--- .../DataFlowExecutor_OutNode.cxx | 412 ++--- .../DataFlowExecutor_OutNode.hxx | 33 +- src/GraphExecutor/Makefile.in | 2 +- src/MulComponent/MulComponent.cxx | 90 - src/SubComponent/SubComponent.cxx | 90 - src/Supervision/CNode_Impl.cxx | 281 +++- src/Supervision/CNode_Impl.hxx | 45 +- src/Supervision/ELNode_Impl.cxx | 1 + src/Supervision/ESNode_Impl.cxx | 1 + src/Supervision/FNode_Impl.cxx | 1 + src/Supervision/GNode_Impl.cxx | 110 +- src/Supervision/GNode_Impl.hxx | 14 + src/Supervision/Graph_Impl.cxx | 1488 ++++++++++++----- src/Supervision/Graph_Impl.hxx | 48 +- src/Supervision/INode_Impl.cxx | 75 +- src/Supervision/INode_Impl.hxx | 10 +- src/Supervision/LNode_Impl.cxx | 1 + src/Supervision/Port_Impl.cxx | 61 +- src/Supervision/Port_Impl.hxx | 2 + src/Supervision/SNode_Impl.cxx | 1 + src/Supervision/StreamGraph_Impl.cxx | 577 ++++--- src/Supervision/StreamGraph_Impl.hxx | 53 +- src/Supervision/SuperV.py | 65 +- src/Supervision/Value_Impl.cxx | 16 + src/Supervision/Value_Impl.hxx | 1 + src/SyrComponent/SyrComponent_Impl.cxx | 398 ----- 70 files changed, 3578 insertions(+), 5236 deletions(-) delete mode 100644 doc/html/INPUT/HTML/AddComponent.html delete mode 100644 doc/html/INPUT/HTML/DivComponent.html delete mode 100644 doc/html/INPUT/HTML/FactorialComponent.html delete mode 100644 doc/html/INPUT/HTML/MulComponent.html delete mode 100644 doc/html/INPUT/HTML/NPMatComponent.html delete mode 100644 doc/html/INPUT/HTML/NPSolveComponent.html delete mode 100644 doc/html/INPUT/HTML/NPVecComponent.html delete mode 100644 doc/html/INPUT/HTML/SUPERV.html delete mode 100644 doc/html/INPUT/HTML/SubComponent.html delete mode 100644 doc/html/INPUT/HTML/SyrComponent.html delete mode 100644 doc/html/INPUT/HTML/SyrControlComponent.html delete mode 100755 doc/html/INPUT/doxyfile delete mode 100755 doc/html/INPUT/sources/Application-About.png delete mode 100755 doc/html/INPUT/sources/Application-About1.jpg delete mode 100644 doc/html/INPUT/sources/application.gif delete mode 100755 doc/html/INPUT/sources/application.jpg delete mode 100755 doc/html/INPUT/sources/bg_salome.gif delete mode 100755 doc/html/INPUT/sources/logocorp.gif delete mode 100755 doc/html/INPUT/sources/myheader.html delete mode 100755 doc/html/INPUT/sources/occ.gif delete mode 100755 doc/html/INPUT/sources/static/doxygen.css delete mode 100755 doc/html/INPUT/sources/static/examples_SUPERV.html delete mode 100755 doc/html/INPUT/sources/static/nodestypes.jpg delete mode 100755 doc/html/INPUT/sources/static/overview_Supervision.html delete mode 100755 doc/html/INPUT/sources/static/page2.html delete mode 100755 doc/html/INPUT/sources/static/tree.js delete mode 100644 doc/html/INPUT/sources/static/treeview.js delete mode 100644 doc/html/Makefile.in delete mode 100644 src/AddComponent/AddComponent_Impl.cxx delete mode 100644 src/MulComponent/MulComponent.cxx delete mode 100644 src/SubComponent/SubComponent.cxx delete mode 100755 src/SyrComponent/SyrComponent_Impl.cxx diff --git a/doc/html/INPUT/HTML/AddComponent.html b/doc/html/INPUT/HTML/AddComponent.html deleted file mode 100644 index b9ec0e7..0000000 --- a/doc/html/INPUT/HTML/AddComponent.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
interface AddComponent
IDL file
Python
Adder Addition ( )
return_value = Addition ( )
double Add ( in double x, in double y, out double z )
[ return_value, z ] = Add ( x, y )
double LastResult ( )
return_value = LastResult ( )

- - - - - - - - - - - - - - - - - - - - - - - -
interface Adder
IDL file
Python
double Add ( in double x, in double y, out double z )
[ return_value, z ] = Add ( x, y )
double AddAndCompare ( in double x, in double y, in Adder anOtherAdder, out double z )
[ return_value, z ] = AddAndCompare ( x, y, anOtherAdder )
void SetLastResult ( in double z )
SetLastResult ( z )
void LastResult ( out double z )
z = LastResult ( )

-
diff --git a/doc/html/INPUT/HTML/DivComponent.html b/doc/html/INPUT/HTML/DivComponent.html deleted file mode 100644 index 7e0477c..0000000 --- a/doc/html/INPUT/HTML/DivComponent.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - -
interface DivComponent
IDL file
Python
void Div ( in double x, in double y, out double z )
z = Div ( x, y )

-
diff --git a/doc/html/INPUT/HTML/FactorialComponent.html b/doc/html/INPUT/HTML/FactorialComponent.html deleted file mode 100644 index b95e4b9..0000000 --- a/doc/html/INPUT/HTML/FactorialComponent.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - -
interface FactorialComponent
IDL file
Python
long eval ( in long n )
return_value = eval ( n )

-
diff --git a/doc/html/INPUT/HTML/MulComponent.html b/doc/html/INPUT/HTML/MulComponent.html deleted file mode 100644 index df34913..0000000 --- a/doc/html/INPUT/HTML/MulComponent.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - -
interface MulComponent
IDL file
Python
void Mul ( in double x, in double y, out double z )
z = Mul ( x, y )

-
diff --git a/doc/html/INPUT/HTML/NPMatComponent.html b/doc/html/INPUT/HTML/NPMatComponent.html deleted file mode 100644 index ae3d601..0000000 --- a/doc/html/INPUT/HTML/NPMatComponent.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -
interface PCSRMat
IDL file
Python
unsigned long NbRows ( )
return_value = NbRows ( )
unsigned long NbCols ( )
return_value = NbCols ( )
void LMat ( out unsigned long start, out unsigned long end )
[ start, end ] = LMat ( )
CSRMatStruct ncsrmat ( in unsigned long start, in unsigned long end )
return_value = ncsrmat ( start, end )

- - - - - - - - - - - - - - - - - - - - - - - -
interface NPMatComponent
IDL file
Python
void SetFileName ( in string filename )
SetFileName ( filename )
void ReadDataFromFile ( in string id_callback )
ReadDataFromFile ( id_callback )
void SaveDataToFile ( in string id_callback )
SaveDataToFile ( id_callback )
void SPGetData ( in string id_callback )
SPGetData ( id_callback )

-
diff --git a/doc/html/INPUT/HTML/NPSolveComponent.html b/doc/html/INPUT/HTML/NPSolveComponent.html deleted file mode 100644 index c7f797f..0000000 --- a/doc/html/INPUT/HTML/NPSolveComponent.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - -
interface NPSolveComponent
IDL file
Python
void Solve ( in PCSRMat A, in PVec b, out PVec x )
x = Solve ( A, b )
void SPSolve ( in PCSRMat A, in PVec b, in string id_callback )
SPSolve ( A, b, id_callback )

-
diff --git a/doc/html/INPUT/HTML/NPVecComponent.html b/doc/html/INPUT/HTML/NPVecComponent.html deleted file mode 100644 index 9f39247..0000000 --- a/doc/html/INPUT/HTML/NPVecComponent.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
interface PVec
IDL file
Python
unsigned long Size ( )
return_value = Size ( )
void LVec ( out unsigned long start, out unsigned long end )
[ start, end ] = LVec ( )
DoubleVec nvec ( in unsigned long start, in unsigned long end )
return_value = nvec ( start, end )

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface NPVecComponent
IDL file
Python
void SetFileName ( in string filename )
SetFileName ( filename )
void ReadDataFromFile ( in string id_callback )
ReadDataFromFile ( id_callback )
void SaveDataToFile ( in string id_callback )
SaveDataToFile ( id_callback )
void SPGetData ( in string id_callback )
SPGetData ( id_callback )
void SPPutData ( in PVec vec, in string id_callback )
SPPutData ( vec, id_callback )

-
diff --git a/doc/html/INPUT/HTML/SUPERV.html b/doc/html/INPUT/HTML/SUPERV.html deleted file mode 100644 index a191eaa..0000000 --- a/doc/html/INPUT/HTML/SUPERV.html +++ /dev/null @@ -1,682 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface SuperG
IDL file
Python
Graph Graph ( in string aGraph )
return_value = Graph ( aGraph )
Graph GraphE ( in string aGraph )
return_value = GraphE ( aGraph )
Value StringValue ( in string aString )
return_value = StringValue ( aString )
Value AnyValue ( in any anAny )
return_value = AnyValue ( anAny )
Graph getGraph ( in string ior )
return_value = getGraph ( ior )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface CNode
IDL file
Python
string Name ( )
return_value = Name ( )
Service Service ( )
return_value = Service ( )
KindOfNode Kind ( )
return_value = Kind ( )
SDate CreationDate ( )
return_value = CreationDate ( )
SDate LastUpdateDate ( )
return_value = LastUpdateDate ( )
string Version ( )
return_value = Version ( )
string Author ( )
return_value = Author ( )
string Comment ( )
return_value = Comment ( )
boolean SetName ( in string aNewName )
return_value = SetName ( aNewName )
boolean SetAuthor ( in string anAuthor )
return_value = SetAuthor ( anAuthor )
boolean SetComment ( in string aComment )
return_value = SetComment ( aComment )
Port Port ( in string aParameterName )
return_value = Port ( aParameterName )
Port Input ( in string InputParameterName, in Value aValue )
return_value = Input ( InputParameterName, aValue )
ListOfPorts Ports ( )
return_value = Ports ( )
ListOfLinks Links ( )
return_value = Links ( )
boolean IsGraph ( )
return_value = IsGraph ( )
boolean IsComputing ( )
return_value = IsComputing ( )
boolean IsFactory ( )
return_value = IsFactory ( )
boolean IsInLine ( )
return_value = IsInLine ( )
boolean IsGOTO ( )
return_value = IsGOTO ( )
boolean IsLoop ( )
return_value = IsLoop ( )
boolean IsEndLoop ( )
return_value = IsEndLoop ( )
boolean IsSwitch ( )
return_value = IsSwitch ( )
boolean IsEndSwitch ( )
return_value = IsEndSwitch ( )
long SubGraph ( )
return_value = SubGraph ( )
long Thread ( )
return_value = Thread ( )
boolean IsWaiting ( )
return_value = IsWaiting ( )
boolean IsReady ( )
return_value = IsReady ( )
boolean IsRunning ( )
return_value = IsRunning ( )
boolean IsDone ( )
return_value = IsDone ( )
boolean IsSuspended ( )
return_value = IsSuspended ( )
GraphState State ( )
return_value = State ( )
boolean ReadyW ( )
return_value = ReadyW ( )
boolean RunningW ( )
return_value = RunningW ( )
boolean DoneW ( )
return_value = DoneW ( )
boolean SuspendedW ( )
return_value = SuspendedW ( )
boolean Kill ( )
return_value = Kill ( )
boolean KillDone ( )
return_value = KillDone ( )
boolean Stop ( )
return_value = Stop ( )
boolean Suspend ( )
return_value = Suspend ( )
boolean SuspendDone ( )
return_value = SuspendDone ( )
boolean Resume ( )
return_value = Resume ( )
boolean ReRun ( )
return_value = ReRun ( )
boolean ReRunAt ( in string aNodeName )
return_value = ReRunAt ( aNodeName )
boolean ReStart ( )
return_value = ReStart ( )
boolean ReStartAt ( in string aNodeName )
return_value = ReStartAt ( aNodeName )
AutomatonState AutoState ( )
return_value = AutoState ( )
ControlState Control ( )
return_value = Control ( )
void ControlClear ( )
ControlClear ( )
boolean ContainerKill ( )
return_value = ContainerKill ( )
void Coords ( in long X, in long Y )
Coords ( X, Y )
long X ( )
return_value = X ( )
long Y ( )
return_value = Y ( )
long CpuUsed ( )
return_value = CpuUsed ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface FNode
IDL file
Python
string GetComponentName ( )
return_value = GetComponentName ( )
string GetInterfaceName ( )
return_value = GetInterfaceName ( )
string GetContainer ( )
return_value = GetContainer ( )
boolean SetComponentName ( in string aComponentName )
return_value = SetComponentName ( aComponentName )
boolean SetInterfaceName ( in string anInterfaceName )
return_value = SetInterfaceName ( anInterfaceName )
boolean SetContainer ( in string aContainer )
return_value = SetContainer ( aContainer )

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface INode
IDL file
Python
void SetPyFunction ( in string FuncName, in ListOfStrings aPyInitFunction )
SetPyFunction ( FuncName, aPyInitFunction )
ListOfStrings PyFunction ( )
return_value = PyFunction ( )
string PyFuncName ( )
return_value = PyFuncName ( )
Port InPort ( in string aParameterName, in string aParameterType )
return_value = InPort ( aParameterName, aParameterType )
Port OutPort ( in string aParameterName, in string aParameterType )
return_value = OutPort ( aParameterName, aParameterType )

- - - - - - - - - - - - - - - -
interface GNode
IDL file
Python
boolean SetCoupled ( in string anInLineNode )
return_value = SetCoupled ( anInLineNode )
INode Coupled ( )
return_value = Coupled ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface LNode
IDL file
Python
void SetPyInit ( in string MoreName, in ListOfStrings aPyMoreFunction )
SetPyInit ( MoreName, aPyMoreFunction )
ListOfStrings PyInit ( )
return_value = PyInit ( )
string PyInitName ( )
return_value = PyInitName ( )
void SetPyMore ( in string MoreName, in ListOfStrings aPyMoreFunction )
SetPyMore ( MoreName, aPyMoreFunction )
ListOfStrings PyMore ( )
return_value = PyMore ( )
string PyMoreName ( )
return_value = PyMoreName ( )
void SetPyNext ( in string NextName, in ListOfStrings aPyNextFunction )
SetPyNext ( NextName, aPyNextFunction )
ListOfStrings PyNext ( )
return_value = PyNext ( )
string PyNextName ( )
return_value = PyNextName ( )

- - - - - - - -
interface ELNode
IDL file
Python

- - - - - - - -
interface SNode
IDL file
Python

- - - - - - - -
interface ESNode
IDL file
Python

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface Graph
IDL file
Python
CNode CNode ( in Service aService )
return_value = CNode ( aService )
FNode FNode ( in string aComponentName, in string anInterfaceName, in Service aService )
return_value = FNode ( aComponentName, anInterfaceName, aService )
INode INode ( in string FuncName, in ListOfStrings aPythonFunction )
return_value = INode ( FuncName, aPythonFunction )
GNode GNode ( in string FuncName, in ListOfStrings aPythonFunction, in string anINode )
return_value = GNode ( FuncName, aPythonFunction, anINode )
LNode LNode ( in string InitName, in ListOfStrings InitFunction, in string MoreName, in ListOfStrings MoreFunction, in string NextName, in ListOfStrings NextFunction, out INode anEndOfLoop )
[ return_value, anEndOfLoop ] = LNode ( InitName, InitFunction, MoreName, MoreFunction, NextName, NextFunction )
SNode SNode ( in string FuncName, in ListOfStrings aPythonFunction, out INode anEndOfSwitch )
[ return_value, anEndOfSwitch ] = SNode ( FuncName, aPythonFunction )
Component ComponentRef ( in string aComputerContainer, in string aComponentName )
return_value = ComponentRef ( aComputerContainer, aComponentName )
Link Link ( in Port OutputPort, in Port InputPort )
return_value = Link ( OutputPort, InputPort )
boolean Import ( in string anXmlFile )
return_value = Import ( anXmlFile )
boolean Export ( in string anXmlFile )
return_value = Export ( anXmlFile )
boolean IsReadOnly ( )
return_value = IsReadOnly ( )
boolean Run ( )
return_value = Run ( )
boolean EventNoW ( out CNode aNode, out GraphEvent anEvent, out GraphState aState )
[ return_value, aNode, anEvent, aState ] = EventNoW ( )
boolean Event ( out CNode aNode, out GraphEvent anEvent, out GraphState aState )
[ return_value, aNode, anEvent, aState ] = Event ( )
boolean EventW ( out CNode aNode, out GraphEvent anEvent, out GraphState aState )
[ return_value, aNode, anEvent, aState ] = EventW ( )
long LevelMax ( )
return_value = LevelMax ( )
ListOfNodes LevelNodes ( in long aLevel )
return_value = LevelNodes ( aLevel )
long ThreadsMax ( )
return_value = ThreadsMax ( )
long GraphsNumber ( )
return_value = GraphsNumber ( )
long Threads ( )
return_value = Threads ( )
long SuspendedThreads ( )
return_value = SuspendedThreads ( )
boolean IsValid ( )
return_value = IsValid ( )
boolean IsExecutable ( )
return_value = IsExecutable ( )
boolean IsDataFlow ( )
return_value = IsDataFlow ( )
boolean IsEditing ( )
return_value = IsEditing ( )
boolean IsExecuting ( )
return_value = IsExecuting ( )
long LastLevelDone ( )
return_value = LastLevelDone ( )
boolean Start ( )
return_value = Start ( )
Graph Copy ( )
return_value = Copy ( )
boolean Merge ( in Graph aGraph )
return_value = Merge ( aGraph )
ListOfNodes Nodes ( )
return_value = Nodes ( )
ListOfLinks GLinks ( )
return_value = GLinks ( )
string getIOR ( )
return_value = getIOR ( )
ListOfGraphs Graphs ( )
return_value = Graphs ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface Link
IDL file
Python
Port OutPort ( )
return_value = OutPort ( )
Port InPort ( )
return_value = InPort ( )
long CoordsSize ( )
return_value = CoordsSize ( )
boolean AddCoord ( in long index, in long X, in long Y )
return_value = AddCoord ( index, X, Y )
boolean ChangeCoord ( in long index, in long X, in long Y )
return_value = ChangeCoord ( index, X, Y )
boolean RemoveCoord ( in long index )
return_value = RemoveCoord ( index )
boolean Coords ( in long index, out long X, out long Y )
[ return_value, X, Y ] = Coords ( index )

- - - - - - - - - - - - - - - - - - - - - - - -
interface Value
IDL file
Python
string ToString ( )
return_value = ToString ( )
any ToAny ( )
return_value = ToAny ( )
boolean IsIOR ( )
return_value = IsIOR ( )
string ComponentDataType ( )
return_value = ComponentDataType ( )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface Port
IDL file
Python
boolean Input ( in Value aValue )
return_value = Input ( aValue )
CNode Node ( )
return_value = Node ( )
string Name ( )
return_value = Name ( )
string Type ( )
return_value = Type ( )
Link Link ( )
return_value = Link ( )
ListOfLinks Links ( )
return_value = Links ( )
boolean IsInput ( )
return_value = IsInput ( )
boolean HasInput ( )
return_value = HasInput ( )
boolean IsLinked ( )
return_value = IsLinked ( )
KindOfPort Kind ( )
return_value = Kind ( )
boolean IsParam ( )
return_value = IsParam ( )
boolean IsGate ( )
return_value = IsGate ( )
boolean IsInLine ( )
return_value = IsInLine ( )
boolean IsLoop ( )
return_value = IsLoop ( )
boolean IsSwitch ( )
return_value = IsSwitch ( )
boolean IsEndSwitch ( )
return_value = IsEndSwitch ( )
GraphState State ( )
return_value = State ( )
boolean IsDone ( )
return_value = IsDone ( )

-
diff --git a/doc/html/INPUT/HTML/SubComponent.html b/doc/html/INPUT/HTML/SubComponent.html deleted file mode 100644 index ecbbcfc..0000000 --- a/doc/html/INPUT/HTML/SubComponent.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - -
interface SubComponent
IDL file
Python
void Sub ( in double x, in double y, out double z )
z = Sub ( x, y )

-
diff --git a/doc/html/INPUT/HTML/SyrComponent.html b/doc/html/INPUT/HTML/SyrComponent.html deleted file mode 100644 index c94b3c5..0000000 --- a/doc/html/INPUT/HTML/SyrComponent.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface SyrComponent
IDL file
Python
long C_ISEVEN ( in long anInteger )
return_value = C_ISEVEN ( anInteger )
long C_ISONE ( in long anOddInteger )
return_value = C_ISONE ( anOddInteger )
long C_M3 ( in long anOddInteger )
return_value = C_M3 ( anOddInteger )
long C_M3P1 ( in long anOddInteger )
return_value = C_M3P1 ( anOddInteger )
long C_DIV2 ( in long anEvenInteger )
return_value = C_DIV2 ( anEvenInteger )
long C_INCR ( in long aCount )
return_value = C_INCR ( aCount )
long C_MIN ( in long aMinVal, in long anInteger )
return_value = C_MIN ( aMinVal, anInteger )
long C_MAX ( in long aMaxVal, in long anInteger )
return_value = C_MAX ( aMaxVal, anInteger )
ListOfSyr C_LISTOFSYR ( )
return_value = C_LISTOFSYR ( )
ListOfSyr C_AVERAGE ( in ListOfSyr aListOfSyr, in long anInteger, in long aCount, out double anAverage )
[ return_value, anAverage ] = C_AVERAGE ( aListOfSyr, anInteger, aCount )
Syr Init ( in long anOddInteger )
return_value = Init ( anOddInteger )

- - - - - - - - - - - - - - - -
interface ListOfSyr
IDL file
Python
SeqOfSyr GetSeqOfSyr ( )
return_value = GetSeqOfSyr ( )
void SetSeqOfSyr ( in SeqOfSyr aSeqOfSyr )
SetSeqOfSyr ( aSeqOfSyr )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface Syr
IDL file
Python
long Initial ( )
return_value = Initial ( )
long Current ( )
return_value = Current ( )
long IsEven ( )
return_value = IsEven ( )
long IsOne ( )
return_value = IsOne ( )
long Count ( )
return_value = Count ( )
void M3p1 ( )
M3p1 ( )
void Div2 ( )
Div2 ( )
void Incr ( )
Incr ( )

-
diff --git a/doc/html/INPUT/HTML/SyrControlComponent.html b/doc/html/INPUT/HTML/SyrControlComponent.html deleted file mode 100644 index 8f39a3d..0000000 --- a/doc/html/INPUT/HTML/SyrControlComponent.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface SyrControlComponent
IDL file
Python
void L_OneEven ( in long ValOne, in long ValEven, out long Finished, out long Incr, out long Even, out long Odd )
[ Finished, Incr, Even, Odd ] = L_OneEven ( ValOne, ValEven )
void C_NotOneIsEven ( out long ValOne, out long ValEven )
[ ValOne, ValEven ] = C_NotOneIsEven ( )
void LOOPN ( in long InLoop, in long NN, in long KK, in long min, in long max, out long OutLoop, out long N, out long K )
[ OutLoop, N, K ] = LOOPN ( InLoop, NN, KK, min, max )
void WHILENOTONE ( in long N, out long OutLoop )
OutLoop = WHILENOTONE ( N )
void IFNOTEVEN ( in long N, out long Odd, out long Even )
[ Odd, Even ] = IFNOTEVEN ( N )
void LOOPi ( in long InLoop, in long ii, out long OutLoop, out long i )
[ OutLoop, i ] = LOOPi ( InLoop, ii )
void WHILEEVEN ( in long N, out long OutLoop )
OutLoop = WHILEEVEN ( N )

-
diff --git a/doc/html/INPUT/doxyfile b/doc/html/INPUT/doxyfile deleted file mode 100755 index 2a2869b..0000000 --- a/doc/html/INPUT/doxyfile +++ /dev/null @@ -1,200 +0,0 @@ -# Doxyfile 1.3-rc1 - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "SALOME - SUPERV - v.2.0.0" -PROJECT_NUMBER = id#1.0 -OUTPUT_DIRECTORY = ../ -OUTPUT_LANGUAGE = English -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = NO -ALWAYS_DETAILED_SEC = YES -INLINE_INHERITED_MEMB = YES -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -INTERNAL_DOCS = YES -CASE_SENSE_NAMES = YES -SHORT_NAMES = NO -HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = YES -SHOW_INCLUDE_FILES = YES -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 5 -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ALIASES = -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 25 -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = YES -SHOW_USED_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = log.txt -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../../../share/salome/idl/SUPERV.idl -FILE_PATTERNS = -RECURSIVE = NO -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = sources/ -INPUT_FILTER = -FILTER_SOURCE_FILES = YES -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = sources/myheader.html -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = YES -TOC_EXPAND = YES -DISABLE_INDEX = YES -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_SCHEMA = -XML_DTD = -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = NO -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = NO -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = NO -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DOT_IMAGE_FORMAT = jpg -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1200 -GENERATE_LEGEND = NO -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO -CGI_NAME = search.cgi -CGI_URL = -DOC_URL = -DOC_ABSPATH = -BIN_ABSPATH = /usr/local/bin/ -EXT_DOC_PATHS = diff --git a/doc/html/INPUT/sources/Application-About.png b/doc/html/INPUT/sources/Application-About.png deleted file mode 100755 index 7b58330d50856e28562e8f9ed80dae72d6e6dda3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19226 zcmd3NW1D8nvTb*Dq06>y+g-M8+qP}nwr$(CZMk`Se*^t}dY$LT{`eujCnm_J=(>KDWfO|El5}c= zL){8uRT>QM7yv~P`-j@l78b=YcnNGu0GDeR5@#>SRJ50KEZ~yOPf%R<03Uaf4N{F9 zwlf`?=nQ%=63T*TfDy+F&gOxS4!c$klc*R3r3M7WF#xRn542V;Xb;EpcKc&bd-G1{Bck4UzwWpx-U|N7l#O<50w~*lYc`;1bSfyq{Gbf@YyniNxQfxEk|B2_ z-q$K-7OYQzIOyF;%6TVQt=4q8{Ya^rl8eu9_JE zxeQP*pLD=(=wT)*y1!bv#+veou|ADWb33!*rkOirf;mT~uD>4PDu)j61VYVNs=~Y% zzNrm-*gR@CJT)?JJJjjiA2qBW%b<>4a!aaw6?k85f2Lx7@91>vdDD3Hu+<$Sdpioq zFr>CRLJUJ}+|Wu@29eVV**lr+Xtv&!vL_=RCN`<;;%K$ox}P=GZC2ubdsMv*d4D`< zdSP!DrufK4w|uI)2LbwYE-+ibcyBXmW-@Yax)j13Bnu$x&-dRuIAw-E7{vO&-v=nh zrbTHGbC2Nu=Z-2gW7#{59LbztS(}^&30uc>zn3ik)NtwFEqYuxSLhV zHQ-!nEQ|=`SkaSF#p`HBeB?ygOxXqhdT{*+QekH`rbN#cJ?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vc$xqQ#s{@L{MxE$jHSe%xoH zxE;-^K^-A@@x{NIj;o(PY0L7PNd5fH5nWY$BvQbuhNm zcMcP!FT*^Mq8s9zdgz0&M|y94qy=>Fay;!b->YG1W9P4 zBhFl>ID$GQGLzQ;-2UOraz?wg1$RjIv(uOcsrk?zhG%_xg2S!XixkiJu0-X}R2;Nf zKaf26uCLJWRDGKLZqt0MeKtF)0=!joc05<7p%xhaU7@K`1Ee_P(+%wv)Ab)u&%5B2fN1QKPZgnrEbdu zFL24YSKO5LyG(pA_RigaV7Nz#5H6wpXk`~(@j7k~kROiL1Mx2YYR4C(qFv{u(*1GX zE;R-~G*QA&Sb#dO&$?v-V2qexDdS!K(H;NO!2ApL=wGn*|LU=*vHaqg2pFY`X{M+CS?^^C-7V#3hTvL$iSkEKN2v z8^mA*y!n+RU!UU5-`tE0w^lzc=KVsp?yIdkD5Nmd$+lYt^ZJ^1An_n?>f%ZoT1!C~ z3v2HA_6}APph+tlDFs$dkJxa>D04%Ucz8>b3#nW}my?|o-?T?tuvX(NjfmEbE==n<1hhxK?}0=sYm ze*C8%vj&GYwhaIfMg^k|n+NFVFBCW`Fe;3FL29gl8iArrj?9!>=J}s+&c_U8!yadte(hY)0=41tOU|6{<1sN%i>}kWjd{&j3;S2z3U4x!yQ)2(8e%%( z#Pc)w-LXc%kpH)k{~nY7wv+$Exl`^h6V;3(mXB3$`CC*vQ*s+UBBN`3^W)#dk#pia z^vKocrzgxxk$V?#5a`HKX^fM8^3-6k6@}P?s|FQm*7xZ{0~4wzPjmG3lR@rs$D5|1iGPqy+K@Y`1-m{|1HFzW=NeRx(y= z$Nrmx&Cqz`s#>k5A>H~Cf1n%_Zq~Udb+H8q+;-=LhNK&@ZK*x*|KVRRq}QeY0oL4} Ao&W#< diff --git a/doc/html/INPUT/sources/application.gif b/doc/html/INPUT/sources/application.gif deleted file mode 100644 index 0b05d5c18ee88779d283508781836e2b151f606f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 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O=am?)v#v=Y$tVvo>o`d(V^*ixTv>ZZDX3QFXcToO*@xTm3CIa<27tEIc#! zWx8M8?h`8_qqEtJR5Yui4EIMazr(xByvXzMzf0?$2CWRax^UXZS*s@%RlmEiXqi&U zv6PDAY{#9wTC9VfKD+s&O=r4T6dx~>x9e7&gdYvo8^51ls#!DPMamTK%`aPJ6?q?+ z%yVDxb^Z406Q4}q)Ma`pwL@9=KH2nE%g+j0$PN+6w!7WCc0S)@-fuIzZ#hkAx*44E xJV2p&e;fZ&&B#yDAuHbPYtLW(<#g|%_lh@oH9azfmdriy#cs<|Z3p)MHvxBP8gc*t diff --git a/doc/html/INPUT/sources/bg_salome.gif b/doc/html/INPUT/sources/bg_salome.gif deleted file mode 100755 index 677b70468f798fe4fbc20fac3d706e61179ff12b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17294 zcmWh!hc_FJ_pQBxgosd75MqnbqNPT}ZYB2KYPM#JE;J#;icRgkH$_n^HWhodwTsfC z+R{&3zwht;0q>mm&bjBk`|f?Z`eEFvNThr>lhMa9I#5D0|0xVVIb zgruaTl$4aTw6u(jjI6AzoSYmIiIkU@S5Qz;R8&+_Qo4Eb=B-<|l$DiLR8&+|Rd3(E zedo>{H8nMLb@jVgML=?(Xj4;ql^R4<9~y z^vK`eKOi6=FfcGEC@45MI3y(G@#Du&o;(Q+4Gjwm3l9%}`t<3uXV0ELfBxddilaom# zQc6lnYHDg)T3UK~dPYV@W@ctqR#tX)c1}*t>({Syb93|Z^78ZZ3knJf3k!>iii(Si zOG-*gOH0ej%F4^jD=I1~D=Vw2s;aB2Yieq0YisN3>gwz38yXrK8ylONnwp!NTUuIL zTU*=O+S=RO-@JL#(b3V_+1b_A_4e)C?(XiMo}S*`-gocb_4W1j_xBGB3=9qq4h;>F z$>ibT;gOM%(b3Vdv9a;-@rj9v$;rv7sj2Dd>G$v7&&lp-m6g@i)wQ*?_4V}+A3l8i`0>-HPa7K>o12?kTU*=P+dDfuySux4dw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%V>ZMK(dsTIHem}kjgq@F#;8UjC{3wKSIW|sy7Z+T iFpX*a^t7Gi*z~42&8bdz%F~|u^rt`#YI0B%1OPi{2poO@ diff --git a/doc/html/INPUT/sources/myheader.html b/doc/html/INPUT/sources/myheader.html deleted file mode 100755 index 83ca543..0000000 --- a/doc/html/INPUT/sources/myheader.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - Main Page - - - -  -
- - - - - - -
-
-
- - - - diff --git a/doc/html/INPUT/sources/occ.gif b/doc/html/INPUT/sources/occ.gif deleted file mode 100755 index ce017c8ae11236ef5c52eee1723657cb8b08989f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14790 zcmV;%IXT8hNk%v~VRQkY0QUd@1_TBOg`<>&4T;4JdIT4h$I-{foOVg3n-^whzoZv-R!6wSgo zd8iFsVia^~2;Ql+iLnuX7c0ux+OKvLsTV=p$y2eac}|U*=;-JMXL)pSb1-6Xxy6^W zCQAt`F?R%0NJmH#pRnrm^vbOXz^tt#Moh4XfIU1t26&LQ+1mzHTeSl%+1kbS_4B2q zq`telsD>Q4cwFY##Prt%$cvX6sLmvYIYxw}ad>Dt^G85xj_IEO`C@9fY~nxy30jcu;KFQ2h`1}ymOq+WU$udJH>PJW^6oiI+KETwH(|REUokENkjXNP$Yd}>4`9wO@IwTw4!M79 za5;*nTqZcCot(c%XdG^QnU|P$j}(ZgEX1lLuhT!As$^t(G`HjA%(^j{mO{jeRN3e2 znZ3cBGIWm`T2`*SdBe>7w^lDj72SvhIr(&6Fuywje?BN{m>iPFIZ>ktXfH0Yz{X zefp$HldQY4>Z(&mjT#CR=K`N|C;={lvP9#X6L&umgDN=m@$AKe&`2ggH4J%OK;Oc49TrXP|qkar|^5)Nn z0)=pD)1HAwR8;{|R-k|gCdd?m2dQOU1{r+t0UZ?5amy_dUS-*8s&uHzcHfC1;)o=Y z7)d1c)H4%=G|&)CFl@D`g%*E#Hrjv*nUZL!4_S9H@&0}Z_BgAYIaaK{}D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THzXMpc=wq2a=x@Zei4A0ph)0>lxt- zej$YE-V_F+AOe~k(p&**o*`0&9o``xPG507pQzEE62=)5Mi?1-;31mfAtqu7#{c0) zRUr>%p{una=w;m-(%}z!Ru^=E?A;;!?V&ACkc?{vtF&p$}dgHOis4ogs5H1u+oA5EkQ|!Cu^j;{;6I zbCFydUgIXtp#Y*F=e47go#ODRqdQ(60j8Wi3Zga=19LIr?9Jj1besb&o`5lw(3RFR z`du%kpx3<`JhE3IUSUTx1wZfuauF3HCg4B%V?a^?6)061vZLieWUY;&DL!OEs*^9C zoJp=^G+G&3NEAP20Y)m|WVIO^utCz89fhGGD#F@H2471?<3;2{J}8(s&i`aaCLK^w z0wtK-L5kK>2BlP*RxT=}=@nid^Z^3;qa+d-N17ZiLSK~!VgID!r*y_+ zLsn;QMkj4frS@FJD#oQyE!#43)_b@QC~_xyrl)#-6+>y3P!UzqH6`PE&L@4=r;n*( g7YNmO(t&i@r+@w@fO3RVWu=3~W`G{3R0ae9JDa2X1poj5 diff --git a/doc/html/INPUT/sources/static/doxygen.css b/doc/html/INPUT/sources/static/doxygen.css deleted file mode 100755 index 0a8e93d..0000000 --- a/doc/html/INPUT/sources/static/doxygen.css +++ /dev/null @@ -1,49 +0,0 @@ -H1 { text-align: center; } -CAPTION { font-weight: bold } -A.qindex {} -A.qindexRef {} -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code { text-decoration: none; font-weight: normal; color: #4444ee } -A.codeRef { font-weight: normal; color: #4444ee } -A:hover { text-decoration: none; background-color: lightblue } -DL.el { margin-left: -1cm } -DIV.fragment { width: 100%; border: none; background-color: #CCCCCC } -DIV.ah { background-color: #CCCCCC; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } -TD.md { background-color: lightblue; font-weight: bold; } -TD.mdname1 { background-color: lightblue; font-weight: bold; color: #602020; } -TD.mdname { background-color: lightblue; font-weight: bold; color: #602020; width: 600px; } -DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } -DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } -BODY { background: url(sources/bg_salome.gif) } -TD.indexkey { - background-color: #CCCCCC; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -TD.indexvalue { - background-color: #CCCCCC; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -span.keyword { color: #008000 } -span.keywordtype { color: #604020 } -span.keywordflow { color: #e08000 } -span.comment { color: #800000 } -span.preprocessor { color: #806020 } -span.stringliteral { color: #002080 } -span.charliteral { color: #008080 } diff --git a/doc/html/INPUT/sources/static/examples_SUPERV.html b/doc/html/INPUT/sources/static/examples_SUPERV.html deleted file mode 100755 index 8642d34..0000000 --- a/doc/html/INPUT/sources/static/examples_SUPERV.html +++ /dev/null @@ -1,495 +0,0 @@ - - - - - - - - Main Page - - - - -   -
- - - - - - - - -
- - -
-
- -

Examples

- -

Interfaces:

-
-SUPERV::Graph
-SUPERV::CNode
-SUPERV::FNode
-SUPERV::INode

-SUPERV::LNode
-SUPERV::Port
-SUPERV::Link
-
-
-
-

-

-
-
SUPERV::Graph
-

-
CNode CNode( in SALOME_ModuleCatalog::Service -aService )
-
-Create a Computing Node in a Graph
-
-GraphEssai = Graph( 'GraphEssai' )
-
-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 = GraphEssai.CNode( AddAndCompare_Service )
-
-
-
-
-
FNode FNode( in string aComponentName,  -in string anInterfaceName,  in SALOME_ModuleCatalog::Service -aService )
-
-Create a Factory Node in a Graph
-
-GraphEssai = Graph( 'GraphEssai' )
-Add = GraphEssai.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
-
-
-
-INode INode( in string FuncName, in ListOfStrings aPythonFunction -)
-
-Create an InLine Node in a Graph
-
-GraphEssai = Graph( 'GraphEssai' )
-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 = GraphEssai.INode( 'Add' , PyAdd )
-
-
-
-GNode GNode( in string FuncName , in ListOfStrings aPythonFunction, -in string anINode )
-
-Create a GOTO node and link to the corresponding InLine node
-
-GraphEssai = Graph( 'GraphEssai' )
-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 = GraphEssai.INode( 'label_test' , Pylabel_test )
-Pycontrol = []
-Pycontrol.append( 'def control_m3p1( N , K ):' )
-Pycontrol.append( '    return 0,1,N,K' )
-control = GraphEssai.GNode( 'control_m3p1' , Pycontrol , 'label_test' )
-
-
-
-LNode LNode( in string InitName , in ListOfStrings InitFunction -, in string MoreName , in ListOfStrings MoreFunction , in string -NextName , in ListOfStrings NextFunction , out INode anEndOfLoop -)
-
-Create a "for" or "while" node and the corresponding end of loop -node
-
-GraphEssai = Graph( 'GraphEssai' )
-
-PyforN = []
-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 max > NN :' )
-PyMoreforN.append( '        N = 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 = GraphEssai.LNode( 'InitN' , PyforN , 'MoreN' , PyMoreforN -, 'NextN' , PyNextforN )
-
-
-SNode SNode( in string FuncName, in ListOfStrings aPythonFunction, -out INode anEndOfSwitch )
-
-Create a "if / elseif / else" or "switch" node and the corresponding -end node
-
-GraphEssai = Graph( 'GraphEssai' )
-
-PyifNotEven = []
-PyifNotEven.append( 'import SyrComponent_idl' )
-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 = GraphEssai.SNode( 'ifNotEven' , PyifNotEven )
-
-
-Link Link( in Port OutputPort ,  in Port InputPort -)
-
-Creates a link  connecting two ports of the nodes in a Graph
-
-GraphEssai = Graph( 'GraphEssai' )
-Add = GraphEssai.FNode( 'AddComponent' , 'AddComponent' , 'Add' )
-Mul = GraphEssai.FNode( 'MulComponent' , 'MulComponent' , 'Mul' )
-Link = GraphEssai.Link(  Add.Port( 'FuncValue' ), Mul.Port( 'x' ) )
-
-
-boolean Run()
-
-Starts asynchronous execution of the graph
-
-...
-GraphEssai.Run()
-
-
-boolean Event( out CNode aNode , out GraphEvent anEvent -, out GraphState aState )
-
-Runs Graph and prints information about Graph performance
-
-...
-GraphEssai.Run()
-aStatus,aNode,anEvent,aState = GraphEssai.Event()
-while aStatus :
-    print aNode.Thread(),aNode.SubGraph(),aNode.Name(),anEvent,aState
-    aStatus,aNode,anEvent,aState = GraphEssai.Event()
-
-
-
-
-
SUPERV::CNode
-
-
-string Name()
-string Author()
-string Comment()
-boolean SetName(in string aNewName )
-boolean SetAuthor(in string anAuthor )
-boolean SetComment(in string aComment )
-
-
Get / Set methods for Name, Author and Comment strings of the node.
-
-
#Create CNode
-
AddAndCompare.SetName( 'AddAndCompare' )
-AddAndCompare.SetAuthor( 'NoBody' )
-AddAndCompare.SetComment( 'Python function' )
-print "Name:", AddAndCompare.Name(), "  Author:", AddAndCompare.Author(), -"   Comment:", AddAndCompare.Comment()
-
-
-
-Port Port( in string aParameterName )
-
-Returns Port instance from created node
-
-#Create FNode
-Addz = Add.Port('z')
-
-
-Port Input( in string InputParameterName ,  in Value -aValue )
-
-Sets value into Port by its name and returs correspondent port -instance
-
-#Create FNode
-Addx = Add.Input("x",3.)
-
-
-
-void Coords( in long X , in long Y )
-
long X()

-long Y()
-
-Methods to sets position of the node and getting current coordinates
-
-#Create -FNode
-Add.Coords( 1 , 152 )
-print "X=", Add.X(), "   Y=", Add.Y()
-
-
-long CpuUsed()
-
-Returns the Cpu used by a node in seconds
-
-#Run Graph and wait for its finish
-print "CPU used: ", Add.CpuUsed(), " sec"
-
-
-
-
-
-
SUPERV::FNode
-
-
-string GetContainer()
-boolean SetContainer(in string aContainer )
-

-Get / Set method for container name
-
-#Create -FNode
-Add.SetContainer( 'localhost/FactoryServer' )
-print "Container: ", Add.GetContainer()
-
-
-
-
SUPERV::INode
-
-
-
-void SetPyFunction( in string FuncName ,  in ListOfStrings -aPyInitFunction )
-
-Replaces Python function of inline node by new one
-
-#Create INode
-PyIsOdd = []
-PyIsOdd.append( 'def IsOdd(a) :   ' )
-PyIsOdd.append( '    print a,"IsOdd"  ' )
-PyIsOdd.append( '    return a ' )
-Add.SetPyFunction("IsOdd", PyIsOdd)
-
-
-string PyFuncName()
-
-
Returns Name of the Python function
-
-#Create -INode
-print "Name:",  Add.PyFuncName()
-
-
-
- ListOfStrings PyFunction()
-
-
Returns Python function as a list of strings
-
-#Create -INode
-PyFunc = Add.PyFunction()
-
-
-SUPERV::Port InPort( in string aParameterName , in string -aParameterType )
-SUPERV::Port OutPort( in string aParameterName , in string aParameterType -)
-

-Creation of In and Out ports of Inline Node
-
-#Create -INode
-Add.InPort('a', 'long')
-
Add.InPort('b', 'long')
- -
Add.OutPort('s', 'long')
-
-
-
-
-
-
SUPERV::LNode
-
-
-
-void SetPyInit( in string InitName ,  in ListOfStrings -aPyInitFunction )
-void SetPyMore( in string MoreName ,  in ListOfStrings -aPyMoreFunction )
-void SetPyNext( in string NextName ,  in ListOfStrings aPyNextFunction -)
-

-Sets (replaces) Python fonction of according clause (Init, More, -Next) in Loop Node
-
-#Create Loop Node
-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 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' )
-forN.SetPyInit('Initfori', Pyfori)
-
forN.SetPyMore('Morefori', PyMorefori)
- -
forN.SetPyNext('Nextfori', PyNextfori)
-
-
-
-string PyInitName()
-
-string PyMoreName()
-string PyNextName()
-
-
-
Returns Python function name of according clause
-
-#Create -Loop Node
-print "Init Name:", forN.PyInitName()
-print "More Name:", forN.PyMoreName()
-print "Next Name:", forN.PyNextName()
-
-
-ListOfStrings PyInit()
-ListOfStrings PyMore()
-ListOfStrings PyNext()
-

-Returns Python function as a list of strings -from according clause
-
-#Create -Loop Node
-InitFunc = forN.PyInit()
-
MoreFunc = forN.PyMoret()
- -
NextFunc = forN.PyNext()
-
-
-
-
- -
SUPERV::Port
-
-
-boolean Input( in Value aValue )
-
-Sets value to the input port instance
-
-#CreatePorts
-aPort = Add.Port('a')
-aPort.Input(10)
-
-
-CNode Node()
-
-Returns Node - owner of the port
-
-Add = aPort.Node()
-
-
-string Name()
-
-Returns Name of the Port
-
-print "Port Name:", aPort.Name()
-
-
-
- -
-
-
- - - diff --git a/doc/html/INPUT/sources/static/nodestypes.jpg b/doc/html/INPUT/sources/static/nodestypes.jpg deleted file mode 100755 index 22f0ce4cd298f0ff6b67c19803454d1f348f0f8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9384 zcmcIp2Rzm7+y9xzEM#O9*=2=;k{ps_^hn3fNRb^yX2uaADPQA|)sa6~S$SM@mXcK~8a+lJd03IhJ!G|Kk_-JwQzYOy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}I z+5=|EGACPbYVq2`$sYwy>yTf1al^XKbqR2=7=mU3L!fo5LSE>eYJN=;MiU&3MEf1x zM{4yHvYQ9Q%(@gXRP{HN$?XDA$nfBKb`n|iXp`Cc)%#qC3b~*qy0ygUpnB5si5o?rz(7j=IlF7V z_b-SBt%qx%k3Ue-Hlfi=j6Zvz19qix0-S)t)+|71;^;Yg(9cQ9!|KbhKR#N>kxvfJ z(z=qldyfds{{7XQtxveS9k{1GjWPA`HWrMUToF}`4^1s84uJ3~skJ}7Df&W$cPQIr zKLFMk mSa+eg`mi|nXSVQN3n*6)lBPYcQCX-3#$tBIAC)BRr~d*XFJ^}T diff --git a/doc/html/INPUT/sources/static/overview_Supervision.html b/doc/html/INPUT/sources/static/overview_Supervision.html deleted file mode 100755 index ef630f8..0000000 --- a/doc/html/INPUT/sources/static/overview_Supervision.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - Main Page - - - -  -
- - - - - -
-
-
-
-

General overview

-

Table of contents

- - -
-

1. Introduction

-

The Supervision module of the SALOME platform allows to define and execute - a chain of distributed numeric components, as well as to control the progress - of this chain. The various calculations to be chained and the exchanged data - are specified in a computing scheme, which can be of two types :

-
    -
  • Data flow computing schemes.
    - These schemes are represented by graphs without loops, conditional branches - or any operation of control. The execution of theses schemes can be automatically - optimized by the supervision engine by detecting and executing simultaneously - independant branches and by managing in a optimal way the life cycle of components.
  • -
    -
    -
  • Script type computing schemes.
    - These schemes allow to define chainings or complex couplings of components - using loops, conditional execution and control flow breaks by leaning on a - scripting language (parametric studies, multi-physical coupling). Contrary - in data flows, the specification of these schemes must define the sequence - of execution of components. Notably, the simultaneous execution of components - should be explicitly defined.
  • -
-

Of simple conception, the data flow schemes can be built in a graphic way and - validated automatically by the supervision engine.

-

The script type computing schemes, which offer the possibility of building - complex chains, should be conceived by warned users (developers) who master - the syntax and the use of the scripting language.

-

Once specified and validated, certain computing schemes defined by scripts - can be made customizable (input and output data, parameter sets) and integrated - into the platform to form components. These components can be used to build - schemes of higher level.

-

Besides the definition of computing schemes, the Supervision module must also - take care of their execution and follow-up (complete execution or step by step) - :

-
    -
  • Asking of instanciation of the components (kernel calls) and data (data - servers calls),
  • -
  • Launching computations specified in the computing scheme,
  • -
  • Managing the events emitted or received by the supervision engine and the - component,
  • -
  • Recovering the results of computations and demand of filing for the data - service.
  • -
-

The user can visualize the progress of the scheme and the exchanged data, be - informed about the evolution of the execution of a component (errors, warning, - tracks, ...), to intervene by stopping, pausing or by resuming the execution - of the scheme or a particular component.

- Back to the contents -

2. Defintions

-

2.1 Computing scheme of type DataFlow

-

The computing schemes of type dataflow, feasible by the Supervision module, - are directed acyclic graphs, described by a set of nodes and of directed links. - A node represents a service of an instance of a computation component.

-

A node is provided with input port(s) and/or output port(s). The input port(s) - (resp. output port(s)) represent the input argument(s) (resp. output argument(s)) - of the service. Certain services can possibly require the use of parameters - which will be grouped together in configuration files (defined in the Data/Properties - module, and recorded in the study).

-

The computing schemes of type data flow do not contain either loops, conditional - branches or any operation of control. They can thus be built easily in a graphic - way, by connecting output ports to input ports of nodes. Although the graphic - construction is the simplest way, these computing schemes can also be defined - in the language of script.

-

A node represents a service (function, method) of an instance of a component. - If the component possesses a unique service (“Run” method), one will omit the - term “service of”. Various services of the same component can be used in various - nodes of the graph, or the same service can be used several times.

-

2.2 Types of nodes

-

In the SUPERVISION module there are the following types of nodes:

- -
    -
  • computation node,
  • -
  • loop node,
  • -
  • switch node,
  • -
  • GOTO node.
  • -
-
-

The dependance between different types of nodes is shown on the following picture: -

-
-

2.2.1 Computation node

-

This node represents a computation algorithm in the graph structure. Nodes - of such type can present a service registered in the Component Catalog (Factory - Node) or an external service defined in Python script by user (InLine node). - Python function of InLine node can be edited in Supervision Graph edit mode. -

-

2.2.2 Loop node

-

Loop node is a kind of Control nodes. In fact two nodes represent Loop: -start loop and end loop nodes. Nodes of such type are always InLine nodes. -User have to supply this type of node by service, which will check conditions of end of loop.

- -

With that kind of nodes may be defined all kinds of loops:

- -“for( initial condition(s) ; end condition(s) ; end loop code )” or

- -“while( end condition )”

- -etcÂ…

-

Here you can see a simple example of Python functions set in a Loop node:

-

-def Init(Index,Min,Max,Incr) :  
-
-    if Min <= Max :  
-
-        Index = Min  
-
-    else :  
-
-        Index = Max  
-
-    return Index,Min,Max,Incr  
-
- 
-
-def More(Index,Min,Max,Incr) :  
-
-    if Index < Max :  
-
-        DoLoop = 1  
-
-    else :  
-
-        DoLoop = 0  
-
-    return DoLoop,Index,Min,Max,Incr  
-
- 
-
-def Next(Index,Min,Max,Incr) :  
-
-    Index = Index + Incr  
-
-    return Index,Min,Max,Incr
-
- -

2.2.3 Switch node

-

Switch node is a kind of Control node. In fact two nodes present Switch: start Switch and end Switch. - Nodes of such type are always InLine nodes. You have to supply this type of node by service, which will perform switching. That's why nodes of such type can have at least two or more switch ports (Boolean), but only one switch port can have "True" value at a definite moment of graph execution.

- -

With that kind of node you can define all kinds of tests or switches :

- -

“if( condition ) ; else if( condition ) … ; else” or

- -“switch( variable ) ; case value …; default”.

- -EtcÂ…

-

The associated Python function will have all input ports of the Switch node - as input arguments. And that function must return a value for all output ports. - A simple example of this Python function:

-

-  
-def Switch(x):    
-
-	i1=0    
-
-	i2=0    
-
-	i3=0    
-
-	if x>13:    
-
-		i1=1    
-
-	elif x==13:    
-
-		i2=1    
-
-	else:    
-
-		i3=1    
-
-	return i1,i2,i3 
- 
-

In this example i1, i2, i3 parameters of the function correspond to Switch - ports of the node. So, depending on the result of execution of the initial condition - (in our case it's a comparison of the input parameter with an integer 13), one - of the switch ports will get the value 1. And this port will transmit further - dataflow to the corresponding node.

-

2.2.4 GOTO node

-

GOTO node represents a simple transmitter of data from one port into another. - This InLine node can be with service or without it. In the first case the data - received by a GOTO node will be processed by this function and only after that - it will be transferred to another node. GOTO nodes may have as many Input and - Output ports as it's necessary.

- Back to the contents -

3. SUPERVISION module features and services

-

The functionality of the SUPERVISION module is provided by a set of classes which are combined into -the SUPERV package. -

The API reference of the SUPERVISION component can be found here.

-

3.1 CNode class

-

This is a base class of the SUPERVISION module. It contains a set of methods allowing:

- -
    -
  • creating a Computation node and setting its parameters (Name, Author, Comments - etc.)
  • -
  • checking the current state of the node in the data flow
  • -
  • node execution follow-up
  • -
  • management of the components, which can be initialized for execution of calculations in the data flow. (For that purpose - CNode class inherits the methods of the Engines:Container class)
  • -
-

The API reference for this class can be found here.

- -

3.2 FNode class

- -

This class is necessary for management of Factory nodes in the data flow. Besides the inherited methods it contains some methods allowing -to define the component from the container, which will be called for execution of the calculation.

-

The API reference for this class can be found here.

- -

3.3 INode class

-

This class is necessary for management of Inline nodes in the data flow. Besides the inherited methods it contains some methods allowing to set -the Python function, which will be executed for performing calculations, as well as input and output parameters for the node.

-

The API reference for this class can be found here.

- -

3.4 GNode class

-

This class is necessary for management of GOTO nodes in the data flow. Besides the inherited methods it contains some methods allowing to define -the couple node, which will be linked to this one.

-

The API reference for this class can be found here.

- -

3.5 LNode class

-

This class is necessary for management of Loop nodes (or Start Loop nodes) in the data flow. Besides the inherited methods it contains some methods allowing to define -the Python function, which will control the loop.

-

The API reference for this class can be found here.

- -

3.6 ELNode class

-

This class is necessary for management of End Loop nodes (or start Loop nodes) in the data flow.

-

The API reference for this class can be found here.

- -

3.7 SNode class

-

This class is necessary for management of Switch nodes (or Start Switch nodes) in the data flow.

-

The API reference for this class can be found here.

- -

3.8 ESNode class

-

This class is necessary for management of End Switch nodes in the data flow.

-

The API reference for this class can be found here.

- -

3.9 Graph class

-

This class is used for management of a data flow. It contains a set of methods, which allows:

-
    -
  • creation of a data flow consisting of one or several different nodes
  • -
  • import/export of an existing data flow
  • -
  • execution of the data flow
  • -
  • follow-up of data flow execution
  • -
  • checking the state of the data flow
  • -
-

The API reference for this class can be found here.

-

3.10 Link class

-

This class contains a set of methods used for representation and management of the links connecting nodes in a data flow.

-

The API reference for this class can be found here.

- -

3.11 Value class

-

This class contains a set of methods used for management of the values which can be set in the ports of nodes.

-

The API reference for this class can be found here.

- -

3.12 Port class

-

This class contains a set of methods used for management of the ports of the nodes in a data flow:

- -
    -
  • setting the attributes of a port
  • -
  • initialization of input ports with initial values
  • -
  • linking ports of different nodes
  • -
-

The API reference for this class can be found here.

- -

3.13 SuperG class

-

The main class of the SUPERVISION ccomponent which is used for construction and initialization of a data flow.

-

The API reference for this class can be found here.

- - -Back to the contents - - diff --git a/doc/html/INPUT/sources/static/page2.html b/doc/html/INPUT/sources/static/page2.html deleted file mode 100755 index 064a2c9..0000000 --- a/doc/html/INPUT/sources/static/page2.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - Main Page - - - -  -
- - - - - - -
-
-
- - - - - - - - diff --git a/doc/html/INPUT/sources/static/tree.js b/doc/html/INPUT/sources/static/tree.js deleted file mode 100755 index 25dc87a..0000000 --- a/doc/html/INPUT/sources/static/tree.js +++ /dev/null @@ -1,71 +0,0 @@ -foldersTree = gFld("SALOME v.2.0.0 ", "", "") - insDoc(foldersTree, gLnk("Main Page", "", "main.html")) - -aux1 = insFld(foldersTree, gFld("TUI Reference Guide", "")) - aux2 = insFld(aux1, gFld("Modules", "")) - aux3 = insFld(aux2, gFld("SALOME SUPERVISION module", "")) - insDoc(aux3, gLnk("Overview", "", "overview_Supervision.html")) - aux4 = insFld(aux3, gFld("Packages", "")) - insDoc(aux4, gLnk("SUPERV", "", "namespaceSUPERV.html")) - insDoc(aux3, gLnk("Examples", "", "examples_SUPERV.html")) - - -/*! Data structures -*/ - insDoc(aux1, gLnk("Data Structures", "", "annotated.html")) - -/*! insDoc(aux1, gLnk("SUPERV::CNode", "", "interfaceSUPERV_1_1CNode.html")) - insDoc(aux1, gLnk("SUPERV::ELNode", "", "interfaceSUPERV_1_1ELNode.html")) - insDoc(aux1, gLnk("SUPERV::ESNode", "", "interfaceSUPERV_1_1ESNode.html")) - insDoc(aux1, gLnk("SUPERV::FNode", "", "interfaceSUPERV_1_1FNode.html")) - insDoc(aux1, gLnk("SUPERV::GNode", "", "interfaceSUPERV_1_1GNode.html")) - insDoc(aux1, gLnk("SUPERV::Graph", "", "interfaceSUPERV_1_1Graph.html")) - insDoc(aux1, gLnk("SUPERV::INode", "", "interfaceSUPERV_1_1INode.html")) - insDoc(aux1, gLnk("SUPERV::Link", "", "interfaceSUPERV_1_1Link.html")) - insDoc(aux1, gLnk("SUPERV::ListOfNodes", "", "structSUPERV_1_1ListOfNodes.html")) - insDoc(aux1, gLnk("SUPERV::LNode", "", "interfaceSUPERV_1_1LNode.html")) - insDoc(aux1, gLnk("SUPERV::Port", "", "interfaceSUPERV_1_1Port.html")) - insDoc(aux1, gLnk("SUPERV::SDate", "", "structSUPERV_1_1SDate.html")) - insDoc(aux1, gLnk("SUPERV::SNode", "", "interfaceSUPERV_1_1SNode.html")) - insDoc(aux1, gLnk("SUPERV::SuperG", "", "interfaceSUPERV_1_1SuperG.html")) -*/ - insDoc(aux1, gLnk("Class Hierarchy", "", "hierarchy.html")) - -/*! - aux3 = insFld(aux2, gFld("SUPERV::CNode", "", "interfaceSUPERV_1_1CNode.html")) - insDoc(aux3, gLnk("SUPERV::FNode", "", "interfaceSUPERV_1_1FNode.html")) - aux4 = insFld(aux3, gFld("SUPERV::INode", "", "interfaceSUPERV_1_1INode.html")) - aux5 = insFld(aux4, gFld("SUPERV::GNode", "", "interfaceSUPERV_1_1GNode.html")) - insDoc(aux5, gLnk("SUPERV::ELNode", "", "interfaceSUPERV_1_1ELNode.html")) - insDoc(aux5, gLnk("SUPERV::ESNode", "", "interfaceSUPERV_1_1ESNode.html")) - insDoc(aux5, gLnk("SUPERV::LNode", "", "interfaceSUPERV_1_1LNode.html")) - insDoc(aux5, gLnk("SUPERV::SNode", "", "interfaceSUPERV_1_1SNode.html")) - insDoc(aux4, gLnk("SUPERV::Graph", "", "interfaceSUPERV_1_1Graph.html")) - insDoc(aux2, gLnk("SUPERV::Link", "", "interfaceSUPERV_1_1Link.html")) - insDoc(aux2, gLnk("SUPERV::SuperG", "", "interfaceSUPERV_1_1SuperG.html")) - aux3 = insFld(aux2, gFld("SUPERV::Value", "", "interfaceSUPERV_1_1Value.html")) - insDoc(aux3, gLnk("SUPERV::Port", "", "interfaceSUPERV_1_1Port.html")) - insDoc(aux2, gLnk("SUPERV::SuperG", "", "interfaceSUPERV_1_1SuperG.html")) - insDoc(aux1, gLnk("SUPERV::ListOfNodes", "", "structSUPERV_1_1ListOfNodes.html")) - insDoc(aux1, gLnk("SUPERV::SDate", "", "structSUPERV_1_1SDate.html")) -*/ - insDoc(aux1, gLnk("Class methods list", "", "functions.html")) -/*! -aux1 = insFld(foldersTree, gFld("Namespace List", "", "namespaces.html")) - insDoc(aux1, gLnk("SUPERV", "", "namespaceSUPERV.html")) -*/ - insDoc(aux1, gLnk("Namespace Members", "", "namespacemembers.html")) - - insDoc(aux1, gLnk("File List", "", "files.html")) - -/*! - - insDoc(aux1, gLnk("SUPERV.idl", "", "SUPERV_8idl.html")) -*/ - - -aux1 = insFld(foldersTree, gFld("IDL/Python mapping", "")) - insDoc(aux1, gLnk("Mapping of SUPERVISION IDL definitions to Python language", "", "page2.html")) - -/*! insDoc(foldersTree, gLnk("Graphical Class Hierarchy", "", "inherits.html")) -*/ diff --git a/doc/html/INPUT/sources/static/treeview.js b/doc/html/INPUT/sources/static/treeview.js deleted file mode 100644 index 55eb43d..0000000 --- a/doc/html/INPUT/sources/static/treeview.js +++ /dev/null @@ -1,505 +0,0 @@ -//**************************************************************** -// You are free to copy the "Folder-Tree" script as long as you -// keep this copyright notice: -// Script found in: http://www.geocities.com/Paris/LeftBank/2178/ -// Author: Marcelino Alves Martins (martins@hks.com) December '97. -//**************************************************************** - -//Log of changes: -// 17 Feb 98 - Fix initialization flashing problem with Netscape -// -// 27 Jan 98 - Root folder starts open; support for USETEXTLINKS; -// make the ftien4 a js file -// -// DvH: Dec 2000 - Made some minor changes to support external -// references - -// Definition of class Folder -// ***************************************************************** - -function Folder(folderDescription, tagName, hreference) //constructor -{ - //constant data - this.desc = folderDescription - this.tagName = tagName - this.hreference = hreference - this.id = -1 - this.navObj = 0 - this.iconImg = 0 - this.nodeImg = 0 - this.isLastNode = 0 - - //dynamic data - this.isOpen = true - this.iconSrc = "ftv2folderopen.png" - this.children = new Array - this.nChildren = 0 - - //methods - this.initialize = initializeFolder - this.setState = setStateFolder - this.addChild = addChild - this.createIndex = createEntryIndex - this.hide = hideFolder - this.display = display - this.renderOb = drawFolder - this.totalHeight = totalHeight - this.subEntries = folderSubEntries - this.outputLink = outputFolderLink -} - -function setStateFolder(isOpen) -{ - var subEntries - var totalHeight - var fIt = 0 - var i=0 - - if (isOpen == this.isOpen) - return - - if (browserVersion == 2) - { - totalHeight = 0 - for (i=0; i < this.nChildren; i++) - totalHeight = totalHeight + this.children[i].navObj.clip.height - subEntries = this.subEntries() - if (this.isOpen) - totalHeight = 0 - totalHeight - for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) - indexOfEntries[fIt].navObj.moveBy(0, totalHeight) - } - this.isOpen = isOpen - propagateChangesInState(this) -} - -function propagateChangesInState(folder) -{ - var i=0 - - if (folder.isOpen) - { - if (folder.nodeImg) - if (folder.isLastNode) - folder.nodeImg.src = "ftv2mlastnode.png" - else - folder.nodeImg.src = "ftv2mnode.png" - folder.iconImg.src = "ftv2folderopen.png" - for (i=0; i 0) - auxEv = "" - else - auxEv = "" - - if (level>0) - if (lastNode) //the last 'brother' in the children array - { - this.renderOb(leftSide + auxEv + "") -// leftSide = leftSide + "" - this.isLastNode = 1 - } - else - { - this.renderOb(leftSide + auxEv + "") - leftSide = leftSide + "" - this.isLastNode = 0 - } - else - this.renderOb("") - - if (nc > 0) - { - level = level + 1 - for (i=0 ; i < this.nChildren; i++) - { - if (i == this.nChildren-1) - this.children[i].initialize(level, 1, leftSide) - else - this.children[i].initialize(level, 0, leftSide) - } - } -} - -function drawFolder(leftSide) -{ - if (browserVersion == 2) { - if (!doc.yPos) - doc.yPos=8 - doc.write("") - } - if (browserVersion == 3) - { - doc.write("
") - } - - doc.write("\n") - doc.write("\n\n") - doc.write("\n
") - doc.write(leftSide) - this.outputLink() - doc.write("") - doc.write("") - if (USETEXTLINKS) - { - this.outputLink() - doc.write(this.desc + "") - } - else - doc.write(this.desc) - -/*! - if (this.tagName!="") - { - doc.write(" [external]") - } -*/ - doc.write("
\n") - - if (browserVersion == 2) { - doc.write("") - } - if (browserVersion == 3) { - doc.write("
") - } - - if (browserVersion == 1) { - this.navObj = doc.all["folder"+this.id] - this.iconImg = doc.all["folderIcon"+this.id] - this.nodeImg = doc.all["nodeIcon"+this.id] - } else if (browserVersion == 2) { - this.navObj = doc.layers["folder"+this.id] - this.iconImg = this.navObj.document.images["folderIcon"+this.id] - this.nodeImg = this.navObj.document.images["nodeIcon"+this.id] - doc.yPos=doc.yPos+this.navObj.clip.height - } else if (browserVersion == 3) { - this.navObj = doc.getElementById("folder"+this.id) - this.iconImg = doc.images.namedItem("folderIcon"+this.id) - this.nodeImg = doc.images.namedItem("nodeIcon"+this.id) - } -} - -function outputFolderLink() -{ - if (this.hreference) - { - doc.write(" 0) - doc.write("onClick='javascript:clickOnFolder("+this.id+")'") - doc.write(">") - } - else - doc.write("") -} - -function addChild(childNode) -{ - this.children[this.nChildren] = childNode - this.nChildren++ - return childNode -} - -function folderSubEntries() -{ - var i = 0 - var se = this.nChildren - - for (i=0; i < this.nChildren; i++){ - if (this.children[i].children) //is a folder - se = se + this.children[i].subEntries() - } - - return se -} - - -// Definition of class Item (a document or link inside a Folder) -// ************************************************************* - -function Item(itemDescription, tagName, itemLink) // Constructor -{ - // constant data - this.desc = itemDescription - this.tagName = tagName - this.link = itemLink - this.id = -1 //initialized in initalize() - this.navObj = 0 //initialized in render() - this.iconImg = 0 //initialized in render() - this.iconSrc = "ftv2doc.png" - - // methods - this.initialize = initializeItem - this.createIndex = createEntryIndex - this.hide = hideItem - this.display = display - this.renderOb = drawItem - this.totalHeight = totalHeight -} - -function hideItem() -{ - if (browserVersion == 1 || browserVersion == 3) { - if (this.navObj.style.display == "none") - return - this.navObj.style.display = "none" - } else { - if (this.navObj.visibility == "hidden") - return - this.navObj.visibility = "hidden" - } -} - -function initializeItem(level, lastNode, leftSide) -{ - this.createIndex() - - if (level>0) - if (lastNode) //the last 'brother' in the children array - { - this.renderOb(leftSide + "") - leftSide = leftSide + "" - } - else - { - this.renderOb(leftSide + "") - leftSide = leftSide + "" - } - else - this.renderOb("") -} - -function drawItem(leftSide) -{ - if (browserVersion == 2) - doc.write("") - if (browserVersion == 3) - doc.write("
") - - doc.write("\n\n") - doc.write("\n
") - doc.write(leftSide) - if (this.link!="") - { - doc.write("") - } - doc.write("") - if (this.link!="") - { - doc.write("") - } - doc.write("") - if (USETEXTLINKS && this.link!="") - doc.write("" + this.desc + "") - else - doc.write(this.desc) -/*! - if (this.tagName!="") - { - doc.write(" [external]"); - } -*/ - doc.write("\n
\n") - - if (browserVersion == 2) - doc.write("") - if (browserVersion == 3) - doc.write("
") - - if (browserVersion == 1) { - this.navObj = doc.all["item"+this.id] - this.iconImg = doc.all["itemIcon"+this.id] - } else if (browserVersion == 2) { - this.navObj = doc.layers["item"+this.id] - this.iconImg = this.navObj.document.images["itemIcon"+this.id] - doc.yPos=doc.yPos+this.navObj.clip.height - } else if (browserVersion == 3) { - this.navObj = doc.getElementById("item"+this.id) - this.iconImg = doc.images.namedItem("itemIcon"+this.id) - } -} - - -// Methods common to both objects (pseudo-inheritance) -// ******************************************************** - -function display() -{ - if (browserVersion == 1 || browserVersion == 3) - this.navObj.style.display = "block" - else - this.navObj.visibility = "show" -} - -function createEntryIndex() -{ - this.id = nEntries - indexOfEntries[nEntries] = this - nEntries++ -} - -// total height of subEntries open -function totalHeight() //used with browserVersion == 2 -{ - var h = this.navObj.clip.height - var i = 0 - - if (this.isOpen) //is a folder and _is_ open - for (i=0 ; i < this.nChildren; i++) - h = h + this.children[i].totalHeight() - - return h -} - - -// Events -// ********************************************************* - -function clickOnFolder(folderId) -{ - var clicked = indexOfEntries[folderId] - - if (!clicked.isOpen) - clickOnNode(folderId) - - return - - if (clicked.isSelected) - return -} - -function clickOnNode(folderId) -{ - var clickedFolder = 0 - var state = 0 - - clickedFolder = indexOfEntries[folderId] - state = clickedFolder.isOpen - - clickedFolder.setState(!state) //open<->close -} - -function initializeDocument() -{ - doc = document; - if (doc.all) - browserVersion = 1 //IE4 - else - if (doc.layers) - browserVersion = 2 //NS4 - else if(navigator.userAgent.toLowerCase().indexOf('gecko') != -1) - browserVersion = 3 //mozilla - else - browserVersion = 0 //other - - foldersTree.initialize(0, 1, "") - foldersTree.display() - - if (browserVersion > 0) - { - if(browserVersion != 3) - doc.write(" ") - - // close the whole tree - clickOnNode(0) - // open the root folder - clickOnNode(0) - } -} - -// Auxiliary Functions for Folder-Treee backward compatibility -// ********************************************************* - -function gFld(description, tagName, hreference) -{ - folder = new Folder(description, tagName, hreference) - return folder -} - -function gLnk(description, tagName, linkData) -{ - fullLink = "" - - if (linkData!="") - { - fullLink = "'"+linkData+"' target=\"basefrm\"" - } - - linkItem = new Item(description, tagName, fullLink) - return linkItem -} - -function insFld(parentFolder, childFolder) -{ - return parentFolder.addChild(childFolder) -} - -function insDoc(parentFolder, document) -{ - parentFolder.addChild(document) -} - -// Global variables -// **************** - -USETEXTLINKS = 1 -indexOfEntries = new Array -nEntries = 0 -doc = document -browserVersion = 0 -selectedFolder=0 diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in deleted file mode 100644 index 9c52485..0000000 --- a/doc/html/Makefile.in +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2003 CEA/DEN, EDF R&D -# -# -# -# File : Makefile.in -# Author : Vasily Rusyaev (Open Cascade NN) -# Module : doc -# $Header: - -top_srcdir=@top_srcdir@ -root_srcdir=@ROOT_SRCDIR@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@ -doxygen=@DOXYGEN@ - -@COMMENCE@ - -doc: - cp -fr $(srcdir)/INPUT ./; \ - cd INPUT; \ - sed 's|../../../share/salome|$(root_srcdir)|' doxyfile > doxyfile1; \ - mv -f doxyfile1 doxyfile; \ - $(doxygen) ./doxyfile; \ - cd ..; \ - cp -fr $(srcdir)/INPUT/sources/static/*.* ./html/ - cp -fr $(srcdir)/INPUT/sources/ html/ - cp -fr $(srcdir)/INPUT/HTML/ html/ - -clean: - rm -rf html - -distclean: clean - rm -rf INPUT - -install: - $(INSTALL) -d $(docdir); \ - cp -rf html $(docdir) - -uninstall: - rm -rf $(docdir)/html diff --git a/src/AddComponent/AddComponent_Impl.cxx b/src/AddComponent/AddComponent_Impl.cxx deleted file mode 100644 index 491e79b..0000000 --- a/src/AddComponent/AddComponent_Impl.cxx +++ /dev/null @@ -1,227 +0,0 @@ -// SuperVisionTest AddComponent : example of component that adds two numbers -// -// 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 : AddComponent_Impl.cxx -// Author : Jean Rahuel, CEA -// Module : SuperVisionTest - -using namespace std; -#include -#include -#include -#include -#include - -//#include "utilities.h" - -#include "AddComponent_Impl.hxx" -#include "Adder_Impl.hxx" - -AddComponent_Impl::AddComponent_Impl( CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) { - MESSAGE("AddComponent_Impl::AddComponent_Impl this " << hex << this << dec - << "activate object instanceName(" - << instanceName << ") interfaceName(" << interfaceName << ")" ) - _thisObj = this ; - _id = _poa->activate_object(_thisObj); - LastAddition = 0 ; -} - -AddComponent_Impl::AddComponent_Impl() { - LastAddition = 0 ; -} - -AddComponent_Impl::~AddComponent_Impl() { -} - -SuperVisionTest::Adder_ptr AddComponent_Impl::Addition() { - beginService( "AddComponent_Impl::Addition" ); - sendMessage(NOTIF_STEP, "AddComponent_Impl creates Adder_Impl"); - Adder_Impl * myAdder ; - myAdder = new Adder_Impl( _orb , _poa, _contId, - instanceName() , interfaceName() , - graphName() , nodeName() ) ; - SuperVisionTest::Adder_var iobject ; - PortableServer::ObjectId * id = myAdder->getId() ; - CORBA::Object_var obj = _poa->id_to_reference(*id); - iobject = SuperVisionTest::Adder::_narrow(obj) ; - endService( "AddComponent_Impl::Addition" ); - return SuperVisionTest::Adder::_duplicate(iobject) ; -} - -double AddComponent_Impl::Add( double x , double y , double & z ) { - beginService( " AddComponent_Impl::Add" ); - z = x + y ; - int S; - - sendMessage(NOTIF_STEP, "AddComponent_Impl::Add is Computing"); - S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(S); - MESSAGE( "AddComponent_Impl::Add( " << x << " , " << y << " , " << z - << " ) returns " << (x - y) << " after " << S << " seconds" ) - LastAddition = z ; - endService( " AddComponent_Impl::Add" ); - return (x - y) ; -} - -long AddComponent_Impl::Sigma( long n ) { - long sigma = 0 ; - int i , j ; - beginService( " AddComponent_Impl::Sigma" ); - for ( j = 0 ; j < 1000000 ; j++ ) { - sigma = 0 ; - for ( i = 1 ; i <= n ; i++ ) { - sigma = sigma + i ; - } - } - endService( " AddComponent_Impl::Sigma" ); - return sigma ; -} - -double AddComponent_Impl::LastResult() { - beginService( " AddComponent_Impl::LastResult" ); - sendMessage(NOTIF_STEP, "AddComponent_Impl::LastResult is Computing"); - int S; - S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(S); - endService( " AddComponent_Impl::LastResult" ); - return LastAddition ; -} - -extern "C" -{ - PortableServer::ObjectId * AddComponentEngine_factory - (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) - { - MESSAGE("AddComponentEngine_factory AddComponentEngine (" - << instanceName << "," << interfaceName << "," << getpid() << ")"); - AddComponent_Impl * myAddComponent - = new AddComponent_Impl(orb, poa, contId, instanceName, interfaceName); - return myAddComponent->getId() ; - } -} - -Adder_Impl::Adder_Impl( CORBA::ORB_ptr orb , - PortableServer::POA_ptr poa , - PortableServer::ObjectId * contId , - const char * instanceName , - const char * interfaceName , - const char * graphName , - const char * nodeName ) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) { - Names( graphName , nodeName ) ; - MESSAGE("Adder_Impl::Adder_Impl activate object instanceName(" - << instanceName << ") interfaceName(" << interfaceName << ") --> " - << hex << (void *) this << dec ) - beginService( "Adder_Impl::Adder_Impl" ); - _thisObj = this ; - _id = _poa->activate_object(_thisObj); - LastAddition = 0 ; - sendMessage(NOTIF_STEP, "Adder_Impl is Created"); - endService( "Adder_Impl::Adder_Impl" ); -} - -Adder_Impl::Adder_Impl() { - LastAddition = 0 ; -} - -Adder_Impl::~Adder_Impl() { - beginService( "Adder_Impl::~Adder_Impl" ); - endService( "Adder_Impl::~Adder_Impl" ); -} - -double Adder_Impl::Add( double x , double y , double & z ) { - beginService( " Adder_Impl::Add" ); - z = x + y ; - int S; - - sendMessage(NOTIF_STEP, "Adder_Impl::Add is Computing"); - S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(S); - MESSAGE( "Adder_Impl::Add( " << x << " , " << y << " , " << z - << " ) returns " << -(x - y) << " after " << S << " seconds" ) - LastAddition = z ; - endService( " Adder_Impl::Add" ); - return -(x - y) ; -} - -double Adder_Impl::AddAndCompare( const double x , const double y , - const SuperVisionTest::Adder_ptr anOtherAdder , - double & z ) { - beginService( " Adder_Impl::AddAndCompare" ); - z = x + y ; - int S; - - sendMessage(NOTIF_STEP, "Adder_Impl::AddAndCompare is Computing"); - S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(S); - MESSAGE( "Adder_Impl::AddAndCompare( " << x << " , " << y << " , " << z - << " ) returns " << -(x - y) << " after " << S << " seconds" ) - LastAddition = z ; - double ValFunc ; - sendMessage(NOTIF_TRACE, "Adder_Impl::AddAndCompare will call anOtherAdder->LastValue()"); - double RetVal ; - anOtherAdder->LastResult( RetVal ) ; - if ( RetVal > 0 ) { - ValFunc = (x - y) ; - } - else { - ValFunc = -(x - y) ; - } - sendMessage(NOTIF_TRACE, "Adder_Impl::AddAndCompare has called anOtherAdder->LastValue()"); - sendMessage(NOTIF_STEP, "Adder_Impl::AddAndCompare is Finished"); - endService( " Adder_Impl::AddAndCompare" ); - return ValFunc ; -} - -void Adder_Impl::SetLastResult( double z ) { - beginService( " Adder_Impl::SetLastResult" ); - sendMessage(NOTIF_STEP, "Adder_Impl::SetLastResult is Computing"); - int S; - S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(S); - LastAddition = z ; - endService( " Adder_Impl::SetLastResult" ); - return ; -} - -void Adder_Impl::LastResult( double & z ) { - beginService( " Adder_Impl::LastResult" ); - sendMessage(NOTIF_STEP, "Adder_Impl::LastResult is Computing"); - int S; - S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(S); - z = LastAddition ; - endService( " Adder_Impl::LastResult" ); - return ; -} - - diff --git a/src/GraphEditor/DataFlowEditor_DataFlow.hxx b/src/GraphEditor/DataFlowEditor_DataFlow.hxx index c405e0b..5a96b2a 100644 --- a/src/GraphEditor/DataFlowEditor_DataFlow.hxx +++ b/src/GraphEditor/DataFlowEditor_DataFlow.hxx @@ -72,7 +72,8 @@ namespace GraphEditor { char * NodeInfo( const char * aNodeName ) ; bool LoadDataFlow( const GraphBase::SGraph * aDataFlow ) ; - bool LoadXml( const char * myFileName ) ; +// bool LoadXml( const char * myFileName ) ; + bool LoadXml( const char * myFileName , GraphBase::ListOfSGraphs & aListOfDataFlows ) ; bool LoadInfo( const GraphBase::SNode &aDataFlowInfo ) ; bool SaveXml(const char * myFileName ) ; @@ -81,12 +82,12 @@ namespace GraphEditor { // void DateModification() ; - GraphBase::SGraph * GetDataFlow() ; + GraphBase::ListOfSGraphs * GetDataFlows() ; GraphBase::SNode * GetInfo() const ; - GraphBase::ListOfNodes * GetNodes() const ; - GraphBase::ListOfLinks * GetLinks() const ; - GraphBase::ListOfGraphs * GetGraphs() const ; - GraphBase::ListOfLinks * GetDatas() const ; + GraphBase::ListOfSNodes * GetNodes() const ; + GraphBase::ListOfSLinks * GetLinks() const ; + GraphBase::ListOfSGraphs * GetGraphs() const ; + GraphBase::ListOfSLinks * GetDatas() const ; const SALOME_ModuleCatalog::Service * GetService() ; GraphEditor::InNode * AddService ( @@ -132,18 +133,17 @@ namespace GraphEditor { bool HasInput(const char * ToServiceParameterName ) ; - bool AddLinkValue( const char * FromNodeName , - const char * FromServiceParameterName , - const char * ToNodeName , - const char * ToServiceParameterName , - const CORBA::Any aValue ) { - return AddLink( FromNodeName, FromServiceParameterName , ToNodeName , - ToServiceParameterName , aValue ) ; } ; +// bool AddLinkValue( const char * FromNodeName , +// const char * FromServiceParameterName , +// const char * ToNodeName , +// const char * ToServiceParameterName , +// const CORBA::Any aValue ) { +// return AddLinkValue( FromNodeName, FromServiceParameterName , ToNodeName , +// ToServiceParameterName , aValue ) ; } ; bool AddLink( const char * FromNodeName , const char * FromServiceParameterName , const char * ToNodeName , - const char * ToServiceParameterName , - const CORBA::Any aValue = CORBA::Any() ) ; + const char * ToServiceParameterName ) ; bool RemoveLink( const char * FromNodeName , const char * FromServiceParameterName , @@ -201,10 +201,6 @@ namespace GraphEditor { bool AddInputData( const char * ToNodeName , const char * ToParameterName , const CORBA::Any aValue = CORBA::Any() ) ; - bool AddInputSharedData( const char * ToNodeName1 , - const char * ToParameterName1 , - const char * ToNodeName2 , - const char * ToParameterName2 ) ; const CORBA::Any * GetInData( const char * ToNodeName , const char * ToParameterName ) ; @@ -214,7 +210,9 @@ namespace GraphEditor { bool IsValid() ; bool IsExecutable() ; + void Executing() ; bool IsExecuting() ; + void Editing() ; bool IsEditing() ; void EditedAfterExecution(bool EditedAfterExecution ) ; bool EditedAfterExecution() ; diff --git a/src/GraphEditor/DataFlowEditor_DataFlow.lxx b/src/GraphEditor/DataFlowEditor_DataFlow.lxx index 699c7a1..1f82bf0 100644 --- a/src/GraphEditor/DataFlowEditor_DataFlow.lxx +++ b/src/GraphEditor/DataFlowEditor_DataFlow.lxx @@ -57,18 +57,19 @@ inline char * GraphEditor::DataFlow::NodeInfo( const char * aNodeName ) { return CORBA::string_dup( s.str().c_str() ); } -inline bool GraphEditor::DataFlow::LoadDataFlow( const GraphBase::SGraph *aDataFlow ) { +inline bool GraphEditor::DataFlow::LoadDataFlow( const GraphBase::SGraph * aDataFlow ) { if ( _ReadOnly ) return false ; _EditedAfterExecution = true ; return GraphEditor::OutNode::LoadDataFlow( aDataFlow ) ; } ; -inline bool GraphEditor::DataFlow::LoadXml( const char* myFileName ) { +inline bool GraphEditor::DataFlow::LoadXml( const char* myFileName , + GraphBase::ListOfSGraphs & aListOfDataFlows ) { if ( _ReadOnly ) return false ; _EditedAfterExecution = true ; - return GraphEditor::OutNode::LoadXml( myFileName ) ; + return GraphEditor::OutNode::LoadXml( myFileName , aListOfDataFlows ) ; } ; inline bool GraphEditor::DataFlow::LoadInfo( const GraphBase::SNode &aDataFlowInfo ) { @@ -87,8 +88,9 @@ inline bool GraphEditor::DataFlow::SavePy(const char* myFileName ) { } ; // get all DataFlow informations (for a .XML file) : -inline GraphBase::SGraph * GraphEditor::DataFlow::GetDataFlow() { - return GraphEditor::OutNode::GetDataFlow() ; +inline GraphBase::ListOfSGraphs * GraphEditor::DataFlow::GetDataFlows() { + GraphBase::ListOfSGraphs * aListOfDataFlows = new GraphBase::ListOfSGraphs; + return GraphEditor::OutNode::GetDataFlows( aListOfDataFlows ) ; } ; // void DateModification() ; @@ -97,19 +99,19 @@ inline GraphBase::SGraph * GraphEditor::DataFlow::GetDataFlow() { // return GraphEditor::OutNode::GetInfo() ; //} ; -inline GraphBase::ListOfNodes * GraphEditor::DataFlow::GetNodes() const { +inline GraphBase::ListOfSNodes * GraphEditor::DataFlow::GetNodes() const { return Graph()->GetNodes() ; } ; -inline GraphBase::ListOfLinks * GraphEditor::DataFlow::GetLinks() const { +inline GraphBase::ListOfSLinks * GraphEditor::DataFlow::GetLinks() const { return Graph()->GetLinks() ; } ; -inline GraphBase::ListOfGraphs * GraphEditor::DataFlow::GetGraphs() const { +inline GraphBase::ListOfSGraphs * GraphEditor::DataFlow::GetGraphs() const { return Graph()->GetGraphs() ; } ; -inline GraphBase::ListOfLinks * GraphEditor::DataFlow::GetDatas() const { +inline GraphBase::ListOfSLinks * GraphEditor::DataFlow::GetDatas() const { return Graph()->GetDatas() ; } ; @@ -161,7 +163,14 @@ inline GraphEditor::InNode * GraphEditor::DataFlow::AddNode( NodeComment , NodeX , NodeY ) ; // MESSAGE( "<-- GraphEditor::DataFlow::AddNode( " << aNode->Name() << " )" ) ; // cout << "<-- GraphEditor::DataFlow::AddNode( " << aNode->Name() << " )" << endl ; - cdebug_out << "GraphEditor::DataFlow::AddNode( " << aNode->Name() << " )" << endl ; + cdebug_out << "GraphEditor::DataFlow::AddNode( " ; + if ( aNode ) { + cdebug << aNode->Name() << " )" ; + } + else { + cdebug << "NULL ) Node not created" ; + } + cdebug << endl ; return aNode ; } ; @@ -240,21 +249,21 @@ inline bool GraphEditor::DataFlow::HasInput(const char * ToServiceParameterName inline bool GraphEditor::DataFlow::AddLink( const char* FromNodeName , const char* FromServiceParameterName , const char* ToNodeName , - const char* ToServiceParameterName , - const CORBA::Any aValue ) { + const char* ToServiceParameterName ) { +// , const CORBA::Any aValue ) { if ( !_ReadOnly ) { GraphEditor::InNode * aFromNode = GetNode( FromNodeName ) ; if ( aFromNode ) { - GraphBase::OutPort * anOutPort = aFromNode->GetChangeOutPort( FromServiceParameterName ) ; - if ( anOutPort ) { - CORBA::Any const * theValue = anOutPort->Value() ; // Keep the type ! +// GraphBase::OutPort * anOutPort = aFromNode->GetChangeOutPort( FromServiceParameterName ) ; +// if ( anOutPort ) { +// CORBA::Any const * theValue = anOutPort->Value() ; // Keep the type ! _EditedAfterExecution = true ; return GraphEditor::OutNode::AddLink( FromNodeName , FromServiceParameterName , ToNodeName , - ToServiceParameterName , - *theValue ) ; - } + ToServiceParameterName ) ; +// , *theValue ) ; +// } } } return false ; @@ -392,43 +401,12 @@ inline bool GraphEditor::DataFlow::RemoveLink( inline bool GraphEditor::DataFlow::AddInputData( const char* ToNodeName , const char* ToParameterName , const CORBA::Any aValue ) { -#if 0 - GraphBase::Node *toNode ; - GraphBase::InPort *toPort ; - char *aNode ; - char *aPort ; - NodePort( ToNodeName , ToParameterName , &aNode , &aPort ) ; - toNode = GetChangeGraphNode( aNode ) ; - if ( toNode ) { - toPort = toNode->GetChangeInPort( aPort ) ; - if ( toPort && ( toPort->IsConnected() || - toPort->IsDataConnected() ) ) { - RemoveLink( toNode->Name() , toPort->PortName() ) ; - } - } - else { - toPort = NULL ; - } - delete aNode ; - delete aPort ; -#endif if ( !IsValid() ) { return false ; } return Graph()->AddInputData( ToNodeName , ToParameterName , aValue ) ; } ; -inline bool GraphEditor::DataFlow::AddInputSharedData(const char* ToNodeName1 , - const char* ToParameterName1 , - const char* ToNodeName2 , - const char* ToParameterName2 ) { - if ( !IsValid() ) { - return false ; - } - return GraphEditor::OutNode::AddInputData( ToNodeName1 , ToParameterName1 , - ToNodeName2 , ToParameterName2 ) ; -} ; - inline const CORBA::Any *GraphEditor::DataFlow::GetInData( const char * ToNodeName , const char * ToParameterName ) { @@ -450,7 +428,14 @@ inline bool GraphEditor::DataFlow::IsExecutable() { return GraphEditor::OutNode::IsExecutable() ; } +inline void GraphEditor::DataFlow::Executing() { + cdebug << "Executing _Executing = true " << endl ; + _Executing = true ; +} + inline bool GraphEditor::DataFlow::IsExecuting() { +#if 0 + //cout << " +++++> Old!" << endl; if ( _DataFlowExecutor ) { if ( _DataFlowExecutor->IsDone() ) { _Executing = false ; @@ -462,9 +447,26 @@ inline bool GraphEditor::DataFlow::IsExecuting() { else { _Executing = false ; } +#endif +// cdebug << "GraphEditor::DataFlow::IsExecuting _Executing " << _Executing << " DataFlowExecutor " << _DataFlowExecutor ; + if ( _DataFlowExecutor ) { + cdebug << " IsDone " << _DataFlowExecutor->IsDone() << " State " << _DataFlowExecutor->State() ; + } + cdebug << endl ; +// cout << "+++++++++++++> _Executing = " << _Executing << " _DataFlowExecutor = " << _DataFlowExecutor << endl; + if ( _Executing && _DataFlowExecutor ) { + if ( _DataFlowExecutor->IsDone() ) { + _Executing = false ; + } + } return _Executing ; } +inline void GraphEditor::DataFlow::Editing() { + cdebug << "Editing _Executing = false " << endl ; + _Executing = false ; +} + inline bool GraphEditor::DataFlow::IsEditing() { return !IsExecuting() ; } @@ -518,7 +520,7 @@ inline long GraphEditor::DataFlow::SubStreamGraphsNumber() { inline void GraphEditor::DataFlow::Executor( GraphExecutor::DataFlow * DataFlowExecutor ) { - _Executing = true ; +// _Executing = true ; _DataFlowExecutor = DataFlowExecutor ; } diff --git a/src/GraphEditor/DataFlowEditor_InNode.cxx b/src/GraphEditor/DataFlowEditor_InNode.cxx index 4dee936..ff472c4 100644 --- a/src/GraphEditor/DataFlowEditor_InNode.cxx +++ b/src/GraphEditor/DataFlowEditor_InNode.cxx @@ -34,6 +34,13 @@ using namespace std; GraphEditor::InNode::InNode() { } +#if 0 +GraphEditor::InNode::InNode(GraphBase::GOTONode * aGOTONode ) { + _ComputingNode = aGOTONode ; + _GOTONode = aGOTONode ; +} +#endif + //ostream * fdebug = NULL ; GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, SALOME_NamingService * ptrNamingService , @@ -51,8 +58,8 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, const char * NodeComputer , const char * NodeComment , const bool GeneratedName , - const int X , - const int Y , + const int NodeX , + const int NodeY , int * Graph_prof_debug, ofstream * Graph_fdebug) { SetDebug( ORB , Graph_prof_debug , Graph_fdebug ) ; @@ -80,7 +87,7 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, NodeLastModification , NodeEditorRelease , NodeAuthor , NodeComment , GeneratedName , - X , Y , + NodeX , NodeY , Graph_prof_debug , Graph_fdebug ) ; break ; } @@ -94,7 +101,7 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, NodeLastModification , NodeEditorRelease , NodeAuthor , NodeComputer , NodeComment , - GeneratedName , X , Y , + GeneratedName , NodeX , NodeY , Graph_prof_debug , Graph_fdebug ) ; // cout << "GraphEditor::InNode::InNode SUPERV::FactoryNode : " << NodeName << endl ; _ComputingNode = (GraphBase::ComputingNode *) _FactoryNode ; @@ -108,11 +115,28 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, NodeFirstCreation , NodeLastModification , NodeEditorRelease , NodeAuthor , NodeComment , GeneratedName , - X , Y , + NodeX , NodeY , Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _InLineNode ; break ; } + case SUPERV::MacroNode : { + cdebug << "GraphEditor::InNode::InNode SUPERV::MacroNode : " << NodeName << endl ; + _GraphMacroNode = new GraphBase::Graph( ORB , ptrNamingService , +// aFuncName[0].c_str() , *aPythonFunction[0] , + NodeName , + akind , +// NodeFirstCreation , NodeLastModification , +// NodeEditorRelease , NodeAuthor , +// NodeComment , GeneratedName , +// NodeX , NodeY , + Graph_prof_debug , Graph_fdebug ) ; + _ComputingNode = (GraphBase::ComputingNode *) _GraphMacroNode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; + _GOTONode = (GraphBase::GOTONode *) _InLineNode ; + _GraphMacroNode->Coordinates( NodeX , NodeY ) ; + break ; + } case SUPERV::GOTONode : { cdebug << "GraphEditor::InNode::InNode SUPERV::GOTONode : " << NodeName << endl ; _GOTONode = new GraphBase::GOTONode( ORB , ptrNamingService , @@ -121,7 +145,7 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, NodeFirstCreation , NodeLastModification , NodeEditorRelease , NodeAuthor , NodeComment , GeneratedName , - X , Y , + NodeX , NodeY , Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _GOTONode ; _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; @@ -137,7 +161,7 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, NodeFirstCreation , NodeLastModification , NodeEditorRelease , NodeAuthor , NodeComment , GeneratedName , - X , Y , + NodeX , NodeY , Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _LoopNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; @@ -153,7 +177,7 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, NodeFirstCreation , NodeLastModification , NodeEditorRelease , NodeAuthor , NodeComment , GeneratedName , - X , Y , + NodeX , NodeY , Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _EndOfLoopNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; @@ -168,7 +192,7 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, NodeFirstCreation , NodeLastModification , NodeEditorRelease , NodeAuthor , NodeComment , GeneratedName , - X , Y , + NodeX , NodeY , Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _SwitchNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; @@ -184,7 +208,7 @@ GraphEditor::InNode::InNode( CORBA::ORB_ptr ORB, NodeFirstCreation , NodeLastModification , NodeEditorRelease , NodeAuthor , NodeComment , GeneratedName , - X , Y , + NodeX , NodeY , Graph_prof_debug , Graph_fdebug ) ; _ComputingNode = (GraphBase::ComputingNode *) _EndOfSwitchNode ; _GOTONode = (GraphBase::GOTONode *) _ComputingNode ; diff --git a/src/GraphEditor/DataFlowEditor_InNode.hxx b/src/GraphEditor/DataFlowEditor_InNode.hxx index 9352544..c8d282f 100644 --- a/src/GraphEditor/DataFlowEditor_InNode.hxx +++ b/src/GraphEditor/DataFlowEditor_InNode.hxx @@ -27,6 +27,7 @@ #ifndef _DATAFLOWEDITOR_INNODE_HXX #define _DATAFLOWEDITOR_INNODE_HXX +#include "DataFlowBase_Graph.hxx" #include "DataFlowBase_FactoryNode.hxx" #include "DataFlowBase_GOTONode.hxx" #include "DataFlowBase_LoopNode.hxx" @@ -48,10 +49,12 @@ namespace GraphEditor { GraphBase::EndOfLoopNode * _EndOfLoopNode ; GraphBase::SwitchNode * _SwitchNode ; GraphBase::EndOfSwitchNode * _EndOfSwitchNode ; + GraphBase::Graph * _GraphMacroNode ; public: InNode() ; +// InNode(GraphBase::GOTONode * aGOTONode ) ; InNode( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService , GraphBase::ListOfFuncName aFuncName , @@ -90,6 +93,8 @@ namespace GraphEditor { return _ComputingNode->IsOneOfInLineNodes() ; } ; const bool IsOneOfGOTONodes() const { return _ComputingNode->IsOneOfGOTONodes() ; } ; + const bool IsMacroNode() const { + return _ComputingNode->IsMacroNode() ; } ; const bool IsDataFlowNode() const { return _ComputingNode->IsDataFlowNode() ; } ; const bool IsDataStreamNode() const { @@ -156,11 +161,17 @@ namespace GraphEditor { return _SwitchNode ; } ; GraphBase::EndOfSwitchNode * EndOfSwitchNode() { return _EndOfSwitchNode ; } ; + GraphBase::Graph * GraphMacroNode() { + return _GraphMacroNode ; } ; SUPERV::CNode_var ObjRef() const { return _ComputingNode->ObjRef() ; } ; void SetObjRef(SUPERV::CNode_var aNode) { _ComputingNode->SetObjRef( aNode ) ; } ; + Graph_Impl * ObjImpl() const { return _GraphMacroNode->ObjImpl() ; } ; + void SetObjImpl( Graph_Impl * aGraph ) { + _GraphMacroNode->SetObjImpl( aGraph ) ; } ; + const SALOME_ModuleCatalog::Service * GetService() const { return _ComputingNode->GetService() ; } ; diff --git a/src/GraphEditor/DataFlowEditor_OutNode.cxx b/src/GraphEditor/DataFlowEditor_OutNode.cxx index 202b157..71d4984 100644 --- a/src/GraphEditor/DataFlowEditor_OutNode.cxx +++ b/src/GraphEditor/DataFlowEditor_OutNode.cxx @@ -27,16 +27,21 @@ using namespace std; #include #include +#include "DataFlowEditor_DataFlow.hxx" #include "DataFlowEditor_OutNode.hxx" #include "DataFlowBase_EndOfLoopNode.hxx" #include "DataFlowBase_EndOfSwitchNode.hxx" +#include "DataFlowExecutor_DataFlow.hxx" +extern GraphExecutor::FiniteStateMachine * theAutomaton ; + // Implementation de la classe GraphEditor::Graph GraphEditor::OutNode::OutNode() { // Graph() { cdebug_in << "GraphEditor::OutNode::OutNode()" << endl; + _Graph = NULL ; _Imported = false ; _Valid = false ; _Executable = false ; @@ -50,6 +55,7 @@ GraphEditor::OutNode::OutNode( CORBA::ORB_ptr ORB , const char * DebugFileName , const SUPERV::KindOfNode aKindOfNode ) { // Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) { + _Graph = NULL ; Set_prof_debug( ORB , DebugFileName ) ; cdebug_in << "GraphEditor::OutNode::OutNode(" ; if ( DataFlowName ) { @@ -60,15 +66,18 @@ GraphEditor::OutNode::OutNode( CORBA::ORB_ptr ORB , if ( aKindOfNode == SUPERV::DataFlowGraph ) { _StreamGraph = NULL ; // _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ; - _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , + _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , aKindOfNode , _prof_debug , _fdebug ) ; } else if ( aKindOfNode == SUPERV::DataStreamGraph ) { // _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ;; - _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , + _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , aKindOfNode , _prof_debug , _fdebug ) ; _Graph = _StreamGraph ; } +// if ( aKindOfNode == SUPERV::DataFlowGraph || aKindOfNode == SUPERV::DataStreamGraph ) { +// theAutomaton->MapGraph( _Graph , _Graph->Name() ) ; +// } _Orb = CORBA::ORB::_duplicate( ORB ) ; _Imported = false ; _Valid = false ; @@ -97,6 +106,7 @@ GraphEditor::OutNode::OutNode( // DataFlowFirstCreation , DataFlowLastModification , // DataFlowEditorRelease , DataFlowAuthor , // DataFlowComputer , DataFlowComment , DebugFileName ) { + _Graph = NULL ; Set_prof_debug( ORB , DebugFileName ) ; if ( DataFlowkind == SUPERV::DataFlowGraph ) { @@ -119,6 +129,9 @@ GraphEditor::OutNode::OutNode( // DataFlowComputer , DataFlowComment , DebugFileName ) ; _Graph = _StreamGraph ; } +// if ( DataFlowkind == SUPERV::DataFlowGraph || DataFlowkind == SUPERV::DataStreamGraph ) { +// theAutomaton->MapGraph( _Graph , _Graph->Name() ) ; +// } _Orb = CORBA::ORB::_duplicate( ORB ) ; _Imported = false ; _Valid = false ; @@ -127,11 +140,25 @@ GraphEditor::OutNode::OutNode( } ; GraphEditor::OutNode::~OutNode() { +// theAutomaton->EraseGraph( Graph->Name() ) ; // delete _DataFlowNode ; // delete _DataFlowDatas ; // delete _GT ; } +bool GraphEditor::OutNode::Name( const char * aName ) { + bool RetVal = false ; + if ( !theAutomaton->GraphName( aName ) ) { + char * aGraphName = Graph()->Name() ; + RetVal = Graph()->Name( aName ) ; + if ( RetVal ) { + theAutomaton->EraseGraph( aGraphName ) ; + theAutomaton->MapGraph( Graph() , aName ) ; + } + } + return RetVal ; +} + void GraphEditor::OutNode::Set_prof_debug( CORBA::ORB_ptr ORB , const char * DebugFileName ) { _Graph_prof_debug = 0 ; @@ -143,15 +170,15 @@ void GraphEditor::OutNode::Set_prof_debug( CORBA::ORB_ptr ORB , } } -bool GraphEditor::OutNode::LoadDataFlow( const GraphBase::SGraph *aDataFlow ) { +bool GraphEditor::OutNode::LoadDataFlow( const GraphBase::SGraph * aDataFlow ) { bool RetVal = false ; - cdebug_in << "GraphEditor::OutNode::LoadDataFlow() " << aDataFlow->Info.theName.c_str() + cdebug_in << "GraphEditor::OutNode::LoadDataFlow() " << (*aDataFlow).Info.theName.c_str() << " GraphNodesSize " << Graph()->GraphNodesSize() << endl; if ( !_Imported ) { - RetVal = LoadInfo( aDataFlow->Info ) ; + RetVal = LoadInfo( (*aDataFlow).Info ) ; _Imported = true ; } - else if ( Graph()->IsDataStreamNode() || aDataFlow->Info.theKind == SUPERV::DataFlowGraph ) { + else if ( Graph()->IsDataStreamNode() || (*aDataFlow).Info.theKind == SUPERV::DataFlowGraph ) { RetVal = true ; } cdebug << "GraphEditor::OutNode::LoadDataFlow() _Imported " << _Imported << " RetVal " << RetVal << endl; @@ -159,49 +186,74 @@ bool GraphEditor::OutNode::LoadDataFlow( const GraphBase::SGraph *aDataFlow ) { map< string , int > aMapOfNodes ; if ( RetVal ) { cdebug << "GraphEditor::OutNode::LoadDataFlow() LoadNodes GraphNodesSize " << Graph()->GraphNodesSize() << endl; - RetVal = LoadNodes( aMapOfNodes , aDataFlow->Nodes ) ; + RetVal = LoadNodes( aMapOfNodes , (*aDataFlow).Nodes ) ; } if ( RetVal ) { cdebug << "GraphEditor::OutNode::LoadDataFlow() LoadLinks GraphNodesSize " << Graph()->GraphNodesSize() << endl; - RetVal = LoadLinks( aMapOfNodes , aDataFlow->Links ) ; + RetVal = LoadLinks( aMapOfNodes , (*aDataFlow).Links ) ; } if ( RetVal ) { Valid() ; cdebug << "GraphEditor::OutNode::LoadDataFlow() LoadDatas GraphNodesSize " << Graph()->GraphNodesSize() << endl; - RetVal = LoadDatas( aMapOfNodes , aDataFlow->Datas ) ; + RetVal = LoadDatas( aMapOfNodes , (*aDataFlow).Datas ) ; } cdebug_out << "GraphEditor::OutNode::LoadDataFlow done GraphNodesSize " << Graph()->GraphNodesSize() << endl; return RetVal ; } +bool GraphEditor::OutNode::LoadXml( const char* myFileName , GraphBase::ListOfSGraphs & aListOfDataFlows ) { + bool RetVal = false ; +// GraphBase::ListOfSGraphs aListOfDataFlows ; + if ( myFileName == NULL ) { + cdebug << "GraphEditor::OutNode::LoadXml() No file" << endl; + _Imported = true ; + char * aDataFlowName = Graph()->Name() ; + Name( theAutomaton->GraphInstanceName( Graph()->Name() ).c_str() ) ; + theAutomaton->MapGraph( Graph() , Graph()->Name() ) ; + cdebug << "GraphEditor::OutNode::LoadXml() " << aDataFlowName << " --> " << Graph()->Name() << endl; + RetVal = true ; + } + else { + cdebug_in << "GraphEditor::OutNode::LoadXml() " << myFileName << endl; + RetVal = Graph()->LoadXml( _Orb , myFileName , aListOfDataFlows ) ; +// RetVal = LoadDataFlows( &aListOfDataFlows ) ; + cdebug_out << "GraphEditor::OutNode::LoadXml " << RetVal << " " << aListOfDataFlows.size() + << " Graphs" << endl; + } + return RetVal ; +} + +#if 0 bool GraphEditor::OutNode::LoadXml( const char* myFileName ) { bool RetVal = false ; - GraphBase::SGraph aDataFlow ; + GraphBase::ListOfSGraphs aListOfDataFlows ; if ( myFileName == NULL ) { cdebug << "GraphEditor::OutNode::LoadXml() No file" << endl; _Imported = true ; RetVal = true ; } - else if ( Graph()->LoadXml( _Orb , myFileName , aDataFlow ) ) { + else if ( Graph()->LoadXml( _Orb , myFileName , aListOfDataFlows ) ) { cdebug_in << "GraphEditor::OutNode::LoadXml() " << myFileName << endl; - RetVal = LoadDataFlow( &aDataFlow ) ; + RetVal = LoadDataFlows( &aListOfDataFlows ) ; cdebug_out << "GraphEditor::OutNode::LoadXml " << RetVal << endl; } return RetVal ; -} +} +#endif bool GraphEditor::OutNode::LoadInfo(const GraphBase::SNode &aDataFlowInfo ) { bool RetVal = false ; cdebug_in << "GraphEditor::OutNode::LoadInfo " << aDataFlowInfo.theName.c_str() << endl ; -// MESSAGE( "GraphEditor::OutNode::LoadDataFlow" ); +// MESSAGE( "GraphEditor::OutNode::LoadInfo" ); // ComponentName( aDataFlowInfo.theComponentName.c_str() ) ; // InterfaceName( aDataFlowInfo.theInterfaceName.c_str() ) ; if ( Graph()->IsDataStreamNode() || aDataFlowInfo.theKind == SUPERV::DataFlowGraph ) { - Graph()->Name( aDataFlowInfo.theName.c_str() ) ; -// Graph()->Kind( aDataFlowInfo.theKind ) ; - cdebug << "GraphEditor::OutNode::LoadInfo aDataFlowInfo.Kind " << aDataFlowInfo.theKind - << " Kind() " << Graph()->Kind() << endl ; + char * aDataFlowName = Graph()->Name() ; + Graph()->Name( theAutomaton->GraphInstanceName( aDataFlowInfo.theName.c_str() ).c_str() ) ; + theAutomaton->MapGraph( Graph() , Graph()->Name() ) ; + cdebug << "GraphEditor::OutNode::LoadInfo " << aDataFlowName << " --> " << Graph()->Name() + << " aDataFlowInfo.Kind " << aDataFlowInfo.theKind << " Kind() " << Graph()->Kind() << endl ; if ( Graph()->IsDataStreamNode() ) { Graph()->Kind( SUPERV::DataStreamGraph ) ; StreamGraph()->SetStreamParams( aDataFlowInfo.theTimeout , aDataFlowInfo.theDataStreamTrace , aDataFlowInfo.theDeltaTime ) ; @@ -230,18 +282,22 @@ bool GraphEditor::OutNode::LoadInfo(const GraphBase::SNode &aDataFlowInfo ) { } bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes , - const GraphBase::ListOfNodes &aListOfNodes ) { + const GraphBase::ListOfSNodes &aListOfNodes ) { GraphEditor::InNode * anInNode ; cdebug_in << "GraphEditor::OutNode::LoadNodes " << endl ; int i ; for ( i = 0 ; i < (int ) aListOfNodes.size() ; i++ ) { GraphBase::SNode aNode = aListOfNodes[ i ] ; const char * aNodeName = aNode.theName.c_str() ; - cout << "GraphEditor::OutNode::LoadNodes " << aNodeName << " " - << aNode.theListOfInDataStreams.size() << " InDataStreams " - << aNode.theListOfOutDataStreams.size() << " OutDataStreams " - << " _prof_debug " << _prof_debug << endl ; +// cout << "GraphEditor::OutNode::LoadNodes " << aNodeName << " " +// << aNode.theService.ServiceinParameter.length() << " InParameters " +// << aNode.theService.ServiceoutParameter.length() << " OutParameters " +// << aNode.theListOfInDataStreams.size() << " InDataStreams " +// << aNode.theListOfOutDataStreams.size() << " OutDataStreams " +// << " _prof_debug " << _prof_debug << endl ; cdebug << "GraphEditor::OutNode::LoadNodes " << aNodeName << " " + << aNode.theService.ServiceinParameter.length() << " InParameters " + << aNode.theService.ServiceoutParameter.length() << " OutParameters " << aNode.theListOfInDataStreams.size() << " InDataStreams " << aNode.theListOfOutDataStreams.size() << " OutDataStreams " << endl ; @@ -282,7 +338,7 @@ bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes , aNode.theCoords.theX , aNode.theCoords.theY ) ; string * aNodetheName = new string( aNode.theName ) ; aMapOfNodes[ *aNodetheName ] = Graph()->GetGraphNodeIndex( anInNode->Name() ) ; - if ( anInNode->IsOneOfInLineNodes() ) { + if ( anInNode->IsOneOfInLineNodes() || anInNode->IsMacroNode() ) { anInNode->GraphEditor::InNode::InLineNode()->DefPortsOfNode( _Orb , aNode.theService , anInNode->NamePtr() , anInNode->Kind() , @@ -298,7 +354,7 @@ bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes , aLNode->SetNextPythonFunction( aNode.theListOfFuncName[ 2 ].c_str() , *aNode.theListOfPythonFunctions[ 2 ] ) ; } - else if ( aINode->IsInLineNode() || aINode->IsGOTONode() || + else if ( aINode->IsMacroNode() || aINode->IsInLineNode() || aINode->IsGOTONode() || aINode->IsSwitchNode() || aINode->IsEndSwitchNode() ) { aINode->SetPythonFunction( aNode.theListOfFuncName[ 0 ].c_str() , *aNode.theListOfPythonFunctions[ 0 ] ) ; @@ -346,7 +402,14 @@ bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes , if ( anInNode->IsOneOfGOTONodes() && strlen( aNode.theCoupledNode.c_str() ) ) { GraphBase::GOTONode * aCoupledNode ; aCoupledNode = (GraphBase::GOTONode * ) Graph()->GetGraphNode( aNode.theName.c_str() ) ; - aCoupledNode->CoupledNode( (GraphBase::GOTONode * ) Graph()->GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ) ; + GraphBase::GOTONode * aCoupledCoupledNode ; + aCoupledCoupledNode = (GraphBase::GOTONode * ) Graph()->GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ; + if ( aCoupledCoupledNode != NULL ) { + aCoupledNode->CoupledNode( aCoupledCoupledNode ) ; + } + else { + aCoupledNode->CoupledNodeName( aNode.theCoupledNode.c_str() ) ; + } } } cdebug_out << "GraphEditor::OutNode::LoadNodes" << endl ; @@ -354,7 +417,7 @@ bool GraphEditor::OutNode::LoadNodes(map< string , int > & aMapOfNodes , } bool GraphEditor::OutNode::LoadLinks(map< string , int > & aMapOfNodes , - const GraphBase::ListOfLinks &aListOfLinks ) { + const GraphBase::ListOfSLinks &aListOfLinks ) { bool RetVal = true ; cdebug_in << "GraphEditor::OutNode::LoadLinks" << endl ; // MESSAGE( "GraphEditor::OutNode::LoadLinks" ); @@ -369,13 +432,13 @@ bool GraphEditor::OutNode::LoadLinks(map< string , int > & aMapOfNodes , << aLink.ToServiceParameterName.c_str() << " )" << endl ; if ( Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ) && Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] ) ) { - GraphBase::ComputingNode * aFromNode = (GraphBase::ComputingNode * ) Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ) ; - const GraphBase::OutPort * anOutPort = aFromNode->GetOutPort( aLink.FromServiceParameterName.c_str() ) ; +// GraphBase::ComputingNode * aFromNode = (GraphBase::ComputingNode * ) Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] ) ; +// const GraphBase::OutPort * anOutPort = aFromNode->GetOutPort( aLink.FromServiceParameterName.c_str() ) ; RetVal = AddLink( Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() , - aLink.FromServiceParameterName.c_str() , - Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() , - aLink.ToServiceParameterName.c_str() , - *anOutPort->Value() ) ; + aLink.FromServiceParameterName.c_str() , + Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() , + aLink.ToServiceParameterName.c_str() ) ; +// , *anOutPort->Value() ) ; } else { RetVal = false ; @@ -404,19 +467,16 @@ bool GraphEditor::OutNode::LoadLinks(map< string , int > & aMapOfNodes , } bool GraphEditor::OutNode::LoadDatas(map< string , int > & aMapOfNodes , - const GraphBase::ListOfLinks &aListOfDatas ) { + const GraphBase::ListOfSLinks &aListOfDatas ) { bool RetVal = true ; cdebug_in << "GraphEditor::OutNode::LoadDatas" << endl ; // MESSAGE( "GraphEditor::OutNode::LoadDatas" ); int i ; for ( i = 0 ; i < (int ) aListOfDatas.size() ; i++ ) { GraphBase::SLink aLink = aListOfDatas[ i ] ; - if ( !strcmp( aLink.FromNodeName.c_str() , Graph()->Name() ) ) { - cdebug << "GraphEditor::OutNode::LoadDatas Warning " - << aLink.FromNodeName.c_str() - << " and " << aLink.ToNodeName.c_str() << " differents from " << Graph()->Name() - << endl ; - } + cdebug << "OutNode::LoadDatas " << i << aLink.FromNodeName.c_str() << "(" << aLink.FromServiceParameterName + << ") --> " << aLink.ToNodeName.c_str() << "(" << aLink.ToServiceParameterName << ") CORBA::tk_xxx " + << aLink.aLinkValue.type()->kind() << endl ; string * aLinkFromNodeName = new string( aLink.FromNodeName.c_str() ) ; string * aLinkToNodeName = new string( aLink.ToNodeName.c_str() ) ; // cout << "LoadDatas " << aLink.FromNodeName.c_str() << " " @@ -440,14 +500,20 @@ bool GraphEditor::OutNode::SaveXml(const char* filename) { cdebug_in << "GraphEditor::OutNode::SaveXml(" << filename << ")" << endl; ofstream f(filename); IsValid() ; -// test = SaveXML( f ); - QDomDocument Graph ; - test = SaveXML( Graph ); - if ( test ) { - QString xml = Graph.toString() ; + QDomDocument DomGraph ; + QDomElement Domsupergraph ; + cdebug << "OutNode::SaveXML("<< filename << ") ---> OutNode::SaveXML( ostream & f , QDomDocument & , true " + << " , QDomElement & ) " << Graph()->Name() << endl ; + test = SaveXML( f , DomGraph , true , Domsupergraph ); + QString xml = DomGraph.toString() ; + f << xml << endl ; + + cdebug << "OutNode::SaveXML("<< filename << ") done" << endl ; +// if ( test ) { +// QString xml = Graph.toString() ; // cout << "GraphEditor::OutNode::SaveXML " << xml << endl ; - f << xml << endl ; - } +// f << xml << endl ; +// } cdebug_out << "GraphEditor::OutNode::SaveXml" << endl; return test; } @@ -458,26 +524,37 @@ bool GraphEditor::OutNode::SavePy( const char* filename ) { cdebug_in << "GraphEditor::OutNode::SavePy(" << filename << ")" << endl; ofstream f( filename ) ; IsValid() ; - test = SavePY( f ); + test = SavePY( f , true ); + f << endl << Graph()->Name() << " = Def" << Graph()->Name() << "()" << endl ; cdebug_out << "GraphEditor::OutNode::SavePy" << endl; return test; } -GraphBase::SGraph * GraphEditor::OutNode::GetDataFlow() { - GraphBase::SGraph * aDataFlow = new GraphBase::SGraph; +GraphBase::ListOfSGraphs * GraphEditor::OutNode::GetDataFlows( GraphBase::ListOfSGraphs * aListOfDataFlows ) { +// GraphBase::ListOfSGraphs * aListOfDataFlows = new GraphBase::ListOfSGraphs; + int index = aListOfDataFlows->size() ; + aListOfDataFlows->resize( index + 1 ) ; if ( Graph()->IsDataFlowNode() ) { - aDataFlow->Info = *Graph()->GetInfo() ; - aDataFlow->Nodes = *Graph()->GetNodes() ; - aDataFlow->Links = *Graph()->GetLinks( true ) ; - aDataFlow->Datas = *Graph()->GetDatas() ; + (*aListOfDataFlows)[ index ].Info = *Graph()->GetInfo() ; + (*aListOfDataFlows)[ index ].Nodes = *Graph()->GetNodes() ; + (*aListOfDataFlows)[ index ].Links = *Graph()->GetLinks( true ) ; + (*aListOfDataFlows)[ index ].Datas = *Graph()->GetDatas() ; } else { - aDataFlow->Info = *StreamGraph()->GetInfo() ; - aDataFlow->Nodes = *StreamGraph()->GetNodes() ; - aDataFlow->Links = *StreamGraph()->GetLinks( true ) ; - aDataFlow->Datas = *StreamGraph()->GetDatas() ; + (*aListOfDataFlows)[ index ].Info = *StreamGraph()->GetInfo() ; + (*aListOfDataFlows)[ index ].Nodes = *StreamGraph()->GetNodes() ; + (*aListOfDataFlows)[ index ].Links = *StreamGraph()->GetLinks( true ) ; + (*aListOfDataFlows)[ index ].Datas = *StreamGraph()->GetDatas() ; + } + int i ; + for ( i = 0 ; i < (int ) (*aListOfDataFlows)[ index ].Nodes.size() ; i++ ) { + if ( Graph()->GetGraphNode( (*aListOfDataFlows)[ index ].Nodes[i].theName.c_str() )->IsMacroNode() ) { + string aCoupledNode = (*aListOfDataFlows)[ index ].Nodes[i].theCoupledNode ; + GraphBase::Graph * aGraph = theAutomaton->MapGraph( aCoupledNode.c_str() ) ; + aGraph->GraphEditor()->GraphEditor::OutNode::GetDataFlows( aListOfDataFlows ) ; + } } - return aDataFlow ; + return aListOfDataFlows ; } void GraphEditor::OutNode::DateModification() { @@ -543,7 +620,7 @@ GraphEditor::InNode * GraphEditor::OutNode::AddNode( cdebug << " " << NodeKindOfNode << endl ; char * RetVal = NULLSTRING ; GraphEditor::InNode *Nd = NULL ; - char * aNodeName = NULL ; + char * aNodeName = NULLSTRING ; bool GeneratedName = false ; if ( NodeKindOfNode == SUPERV::InLineNode || NodeKindOfNode == SUPERV::LoopNode || @@ -576,7 +653,7 @@ GraphEditor::InNode * GraphEditor::OutNode::AddNode( } theNodeName = NULLSTRING ; } - if ( theNodeName == NULLSTRING || strlen( theNodeName ) == 0 ) { + if ( theNodeName == NULLSTRING || strlen( theNodeName ) == 0 || Graph()->GetGraphNode( theNodeName ) ) { aNodeName = new char[ strlen( NodeService.ServiceName )+1 ] ; strcpy( aNodeName , NodeService.ServiceName ) ; if ( Graph()->GetGraphNode( NodeService.ServiceName ) ) { @@ -603,6 +680,9 @@ GraphEditor::InNode * GraphEditor::OutNode::AddNode( aNodeName = new char[ strlen( theNodeName )+1 ] ; strcpy( aNodeName , theNodeName ) ; } + else { + aNodeName = NULLSTRING ; + } } if ( aNodeName != NULLSTRING ) { Nd = new GraphEditor::InNode( _Orb , Graph()->NamingService() , @@ -811,17 +891,13 @@ bool GraphEditor::OutNode::GetLinkCoord( const char* FromNodeName , return false ; } -bool GraphEditor::OutNode::AddInputData( const char* ToNodeName1 , - const char* ToParameterName1 , - const char* ToNodeName2 , - const char* ToParameterName2 ) { - cdebug_in << "GraphEditor::OutNode::AddInputData" << endl; - bool RetVal = Graph()->AddInputData( ToNodeName1 , - ToParameterName1 , - ToNodeName2 , - ToParameterName2 ) ; - cdebug_out << "GraphEditor::OutNode::AddInputData" << endl; +bool GraphEditor::OutNode::UnValid() { + bool RetVal = _Valid ; _Valid = false ; + if ( Graph()->GraphMacroLevel() != 0 ) { + cdebug << "GraphEditor::OutNode::UnValid() GraphMacroLevel " << Graph()->GraphMacroLevel() << endl ; + RetVal = Valid() ; + } return RetVal ; } @@ -832,11 +908,29 @@ bool GraphEditor::OutNode::Valid() { cdebug_in << "GraphEditor::OutNode::Valid" << endl; _Executable = false ; - Graph()->CreateService() ; + if ( !Graph()->CreateService() ) { + cdebug_out << "GraphEditor::OutNode::Valid " << _Valid << endl; + return false ; + } + if ( Graph()->GraphMacroLevel() != 0 ) { + cdebug << "CoupledNode " << Graph()->CoupledNode() << endl ; + cdebug << "GraphEditor " << Graph()->CoupledNode()->GraphEditor() << endl ; + cdebug << "Graph " << Graph()->CoupledNode()->GraphEditor()->Graph() << endl ; + cdebug << "Name " << Graph()->CoupledNode()->GraphEditor()->Graph()->Name() << endl ; + cdebug << "Valid --> UpdateMacroPorts of " << Graph()->CoupledNodeName() << " of " + << Graph()->CoupledNode()->GraphEditor()->Graph()->Name() << endl ; + cdebug << Graph()->CoupledNode() << endl ; + Graph()->CoupledNode()->UpdateMacroPorts( Graph() ) ; + cdebug << Graph()->CoupledNode()->Name() << " Valid --> UnValid of graph " + << Graph()->CoupledNode()->GraphEditor()->Graph()->Name() + << " GraphMacroLevel " << Graph()->CoupledNode()->GraphEditor()->Graph()->GraphMacroLevel() << endl ; + Graph()->CoupledNode()->GraphEditor()->UnValid() ; + } + int SubStreamGraphsNumber = 0 ; if ( !Graph()->Sort( SubStreamGraphsNumber ) ) { - cdebug << "This DataFlow is not valid." << endl ; + cdebug_out << "This DataFlow is not valid." << endl ; return false ; } if ( Graph()->IsDataStreamNode() ) { @@ -851,7 +945,7 @@ bool GraphEditor::OutNode::Valid() { _Valid = true ; - cdebug_out << "GraphEditor::OutNode::Valid" << endl; + cdebug_out << "GraphEditor::OutNode::Valid " << _Valid << endl; return _Valid ; } @@ -1078,7 +1172,7 @@ bool GraphEditor::OutNode::LinkSavePY( ostream &f , const char * aGraphName , // << aLink.FromServiceParameterName.c_str() // << "' )" << endl ; // } - f << "L" << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str() + f << " " << "L" << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str() << aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() ; if ( ((GraphBase::Graph *) Graph())->GetChangeGraphNode( aLink.FromNodeName.c_str() )->GetChangeOutPort( aLink.FromServiceParameterName.c_str() )->IsDataStream() ) { f << " = " << aGraphName << ".StreamLink( " ; @@ -1096,7 +1190,7 @@ bool GraphEditor::OutNode::LinkSavePY( ostream &f , const char * aGraphName , f << aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() << " )" << endl ; } else { - f << "I"<< aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() + f << " " << "I"<< aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() // << " = " << aLink.ToNodeName.c_str() << ".Input( '" // << aLink.ToServiceParameterName.c_str() << "' , " ; << ".Input( " ; @@ -1137,7 +1231,7 @@ bool GraphEditor::OutNode::LinkSavePY( ostream &f , const char * aGraphName , } int i ; for ( i = 0 ; i < (int ) aLink.aListOfCoords.size() ; i++ ) { - f << "L" << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str() + f << " " << "L" << aLink.FromNodeName.c_str() << aLink.FromServiceParameterName.c_str() << aLink.ToNodeName.c_str() << aLink.ToServiceParameterName.c_str() << ".AddCoord( " << i+1 << " , " << aLink.aListOfCoords[ i ].theX << " , " << aLink.aListOfCoords[ i ].theY << " )" << endl ; @@ -1146,30 +1240,36 @@ bool GraphEditor::OutNode::LinkSavePY( ostream &f , const char * aGraphName , } //bool GraphEditor::OutNode::SaveXML(ostream & f ) { -bool GraphEditor::OutNode::SaveXML(QDomDocument & GraphQDom ) { +bool GraphEditor::OutNode::SaveXML( ostream & f , QDomDocument & GraphQDom , + bool aSuperGraph , QDomElement & supergraph ) { + cdebug_in << "OutNode::SaveXML( ostream & f , QDomDocument & , " << aSuperGraph << " , QDomElement & ) " + << Graph()->Name() << endl ; int i ; -// f << "" << endl << endl ; -// f << "" << endl << endl ; -// f << "" << endl ; - QString Dataflow("Dataflow") ; - GraphQDom = QDomDocument(Dataflow) ; -// f << "" << endl ; - QDomElement dataflow = GraphQDom.createElement( "dataflow" ) ; - GraphQDom.appendChild( dataflow ) ; -// f << " " << endl ; - QDomElement info = GraphQDom.createElement( "info-list" ) ; - dataflow.appendChild( info ) ; -// f << " " << endl ; + QDomElement dataflow ; + if ( aSuperGraph ) { + QString SuperGraph("SuperGraph") ; + GraphQDom = QDomDocument(SuperGraph) ; -// GraphBase::DataNode::SaveXML( f , " " , 0 , 0 ) ; - Graph()->SaveXML( GraphQDom , info , 0 , 0 ) ; + supergraph = GraphQDom.createElement( "supergraph" ) ; + GraphQDom.appendChild( supergraph ) ; + + dataflow = GraphQDom.createElement( "dataflow" ) ; + supergraph.appendChild( dataflow ) ; + } + else { +// QString Dataflow("Dataflow") ; +// GraphQDom = QDomDocument(Dataflow) ; + + dataflow = GraphQDom.createElement( "dataflow" ) ; + supergraph.appendChild( dataflow ) ; + } -// f << " " << endl ; + QDomElement info = GraphQDom.createElement( "info-list" ) ; + dataflow.appendChild( info ) ; -// f << " " << endl << endl ; + Graph()->SaveXML( GraphQDom , info , 0 , 0 ) ; -// f << " " << endl ; QDomElement nodelist = GraphQDom.createElement( "node-list" ) ; dataflow.appendChild( nodelist ) ; for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { @@ -1188,13 +1288,20 @@ bool GraphEditor::OutNode::SaveXML(QDomDocument & GraphQDom ) { Graph()->GraphNodes( i )->XCoordinate() , Graph()->GraphNodes( i )->YCoordinate() ) ; } - else if ( Graph()->GraphNodes( i )->IsInLineNode() ) { + else if ( Graph()->GraphNodes( i )->IsInLineNode() ) { // ((GraphBase::InLineNode * ) GraphNodes( i ))->SaveXML( f , // " " , ((GraphBase::InLineNode * ) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist , Graph()->GraphNodes( i )->XCoordinate() , Graph()->GraphNodes( i )->YCoordinate() ) ; } + else if ( Graph()->GraphNodes( i )->IsMacroNode() ) { +// ((GraphBase::InLineNode * ) GraphNodes( i ))->SaveXML( f , +// " " , + ((GraphBase::GOTONode * ) Graph()->GraphNodes( i ))->SaveXML( GraphQDom , nodelist , + Graph()->GraphNodes( i )->XCoordinate() , + Graph()->GraphNodes( i )->YCoordinate() ) ; + } else if ( Graph()->GraphNodes( i )->IsGOTONode() ) { // ((GraphBase::GOTONode * ) GraphNodes( i ))->SaveXML( f , // " " , @@ -1238,7 +1345,7 @@ bool GraphEditor::OutNode::SaveXML(QDomDocument & GraphQDom ) { // f << " " << endl ; QDomElement linklist = GraphQDom.createElement( "link-list" ) ; dataflow.appendChild( linklist ) ; - const GraphBase::ListOfLinks * Links = Graph()->GetLinks( true ) ; + const GraphBase::ListOfSLinks * Links = Graph()->GetLinks( true ) ; for ( i = 0 ; i < (int ) Links->size() ; i++ ) { // f << " " << endl ; QDomElement link = GraphQDom.createElement( "link" ) ; @@ -1252,63 +1359,57 @@ bool GraphEditor::OutNode::SaveXML(QDomDocument & GraphQDom ) { // f << " " << endl ; QDomElement datalist = GraphQDom.createElement( "data-list" ) ; dataflow.appendChild( datalist ) ; - const GraphBase::ListOfLinks * Datas = Graph()->GetDatas() ; - for ( i = 0 ; i < (int ) Datas->size() ; i++ ) { + if ( Graph()->GraphMacroLevel() == 0 ) { + const GraphBase::ListOfSLinks * Datas = Graph()->GetDatas() ; + for ( i = 0 ; i < (int ) Datas->size() ; i++ ) { // f << " " << endl ; - QDomElement data = GraphQDom.createElement( "data" ) ; - datalist.appendChild( data ) ; + QDomElement data = GraphQDom.createElement( "data" ) ; + datalist.appendChild( data ) ; // LinkSaveXML( f , " " , (*Datas)[ i ] , true ) ; - LinkSaveXML( GraphQDom , data , (*Datas)[ i ] , true ) ; + LinkSaveXML( GraphQDom , data , (*Datas)[ i ] , true ) ; // f << " " << endl ; + } } -//#if 0 -// const GraphEditor::OutNode * aDataNode = (GraphEditor::OutNode *) this ; -// if ( aDataNode ) { -// int i ; -// for ( i = 0 ; i < aDataNode->GetNodeOutPortsSize() ; i++ ) { -// const GraphBase::InPort *aLink = aDataNode->GetNodeOutPort(i)->GetLink() ; -// if ( aLink ) { -// f << " " << endl ; -// aLink->SaveXML( f , " " ) ; -// f << " " << endl ; -// } -// } -// for ( i = 0 ; i < aDataNode->GetNodeInPortsSize() ; i++ ) { -// const GraphBase::InPort *aLink = aDataNode->GetNodeInPort(i)->GetLink() ; -// if ( aLink ) { -// f << " " << endl ; -// aLink->SaveXML( f , " " ) ; -// f << " " << endl ; -// } -// } -// } -//#endif -#if 0 - f << " " << endl << endl ; - f << "" << endl ; -#endif + for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { + if ( Graph()->GraphNodes( i )->IsMacroNode() ) { + GraphBase::GOTONode * aMacroNode = (GraphBase::GOTONode * ) Graph()->GraphNodes( i ) ; + GraphBase::Graph * aMacroGraph = (GraphBase::Graph * ) aMacroNode->CoupledNode() ; + cdebug << "OutNode::SaveXML ---> OutNode::SaveXML( ostream & f , QDomDocument & , false " + << " , QDomElement & ) MacroGraph " << aMacroGraph->Name() << endl ; + if ( !aMacroGraph->GraphEditor()->SaveXML( f , GraphQDom , false , supergraph ) ) { + return false ; + cdebug << "OutNode::SaveXML MacroGraph "<< aMacroGraph->Name() << " done" << endl ; + } + } + } + + cdebug_out << "OutNode::SaveXML( ostream & f , QDomDocument & , " << aSuperGraph << " , QDomElement & ) " + << Graph()->Name() << endl ; return true ; } -bool GraphEditor::OutNode::SavePY( ostream & f ) { +bool GraphEditor::OutNode::SavePY( ostream & f , bool importSuperV ) { int i ; int j ; - f << endl << "# Generated python file of Graph " << Graph()->Name() << endl << endl ; + if ( importSuperV ) { + f << endl << "# Generated python file of Graph " << Graph()->Name() << endl << endl ; - f << "from SuperV import *" << endl ; + f << "from SuperV import *" << endl << endl ; + } - f << "# Graph creation " << endl ; + f << "# Graph creation of " << Graph()->Name() << endl ; + f << "def Def" << Graph()->Name() << "() :" << endl ; Graph()->SavePY( f , Graph()->Name() , 0 , 0 ) ; - f << endl << "# Creation of Factory Nodes" << endl ; + f << " " << endl << " " << "# Creation of Factory Nodes" << endl ; for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { if ( Graph()->GraphNodes( i )->IsFactoryNode() ) { - f << endl ; + f << " " << endl ; ((GraphBase::FactoryNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() , - Graph()->GraphNodes( i )->XCoordinate() , - Graph()->GraphNodes( i )->YCoordinate() ) ; + Graph()->GraphNodes( i )->XCoordinate() , + Graph()->GraphNodes( i )->YCoordinate() ) ; } } @@ -1316,15 +1417,15 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { if ( Graph()->GraphNodes( i )->IsComputingNode() ) { if ( first ) { - f << endl << "# Creation of Computing Nodes" << endl ; + f << " " << endl << " " << "# Creation of Computing Nodes" << endl ; first = false ; } else { - f << endl ; + f << " " << endl ; } ((GraphBase::ComputingNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() , - Graph()->GraphNodes( i )->XCoordinate() , - Graph()->GraphNodes( i )->YCoordinate() ) ; + Graph()->GraphNodes( i )->XCoordinate() , + Graph()->GraphNodes( i )->YCoordinate() ) ; } } @@ -1332,15 +1433,15 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { if ( Graph()->GraphNodes( i )->IsInLineNode() ) { if ( first ) { - f << endl << "# Creation of InLine Nodes" << endl ; + f << " " << endl << " " << "# Creation of InLine Nodes" << endl ; first = false ; } else { - f << endl ; + f << " " << endl ; } ((GraphBase::InLineNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() , - Graph()->GraphNodes( i )->XCoordinate() , - Graph()->GraphNodes( i )->YCoordinate() ) ; + Graph()->GraphNodes( i )->XCoordinate() , + Graph()->GraphNodes( i )->YCoordinate() ) ; } } @@ -1348,15 +1449,15 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { if ( Graph()->GraphNodes( i )->IsLoopNode() ) { if ( first ) { - f << endl << "# Creation of Loop Nodes" << endl ; + f << " " << endl << " " << "# Creation of Loop Nodes" << endl ; first = false ; } else { - f << endl ; + f << " " << endl ; } ((GraphBase::LoopNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() , - Graph()->GraphNodes( i )->XCoordinate() , - Graph()->GraphNodes( i )->YCoordinate() ) ; + Graph()->GraphNodes( i )->XCoordinate() , + Graph()->GraphNodes( i )->YCoordinate() ) ; } } @@ -1364,15 +1465,15 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { if ( Graph()->GraphNodes( i )->IsSwitchNode() ) { if ( first ) { - f << endl << "# Creation of Switch Nodes" << endl ; + f << " " << endl << " " << "# Creation of Switch Nodes" << endl ; first = false ; } else { - f << endl ; + f << " " << endl ; } ((GraphBase::SwitchNode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() , - Graph()->GraphNodes( i )->XCoordinate() , - Graph()->GraphNodes( i )->YCoordinate() ) ; + Graph()->GraphNodes( i )->XCoordinate() , + Graph()->GraphNodes( i )->YCoordinate() ) ; } } @@ -1380,19 +1481,35 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { if ( Graph()->GraphNodes( i )->IsGOTONode() ) { if ( first ) { - f << endl << "# Creation of GOTO Nodes" << endl ; + f << " " << endl << " " << "# Creation of GOTO Nodes" << endl ; + first = false ; + } + else { + f << " " << endl ; + } + ((GraphBase::GOTONode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() , + Graph()->GraphNodes( i )->XCoordinate() , + Graph()->GraphNodes( i )->YCoordinate() ) ; + } + } + + first = true ; + for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { + if ( Graph()->GraphNodes( i )->IsMacroNode() ) { + if ( first ) { + f << " " << endl << " " << "# Creation of Macro Nodes" << endl ; first = false ; } else { - f << endl ; + f << " " << endl ; } ((GraphBase::GOTONode * ) Graph()->GraphNodes( i ))->SavePY( f , Graph()->Name() , - Graph()->GraphNodes( i )->XCoordinate() , - Graph()->GraphNodes( i )->YCoordinate() ) ; + Graph()->GraphNodes( i )->XCoordinate() , + Graph()->GraphNodes( i )->YCoordinate() ) ; } } - const GraphBase::ListOfLinks * Links = Graph()->GetLinks() ; + const GraphBase::ListOfSLinks * Links = Graph()->GetLinks() ; // bool intervar ; // map< string , int > aMapOfOutPorts ; first = true ; @@ -1400,13 +1517,13 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { for ( j = 0 ; j < (int ) Links->size() ; j++ ) { if ( !strcmp( Graph()->GraphNodes( i )->Name() , (*Links)[ j ].FromNodeName.c_str() ) ) { if ( first ) { - f << endl - << "# Creation of Links" + f << " " << endl + << " " << "# Creation of Links" << endl ; first = false ; } else { - f << endl ; + f << " " << endl ; } // char * NodePort = new char [ strlen( (*Links)[ j ].FromNodeName.c_str() ) + // strlen( (*Links)[ j ].FromServiceParameterName.c_str() ) + 1 ] ; @@ -1433,16 +1550,18 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { } } - const GraphBase::ListOfLinks * Datas = Graph()->GetDatas() ; - first = true ; - for ( i = 0 ; i < (int ) Datas->size() ; i++ ) { - if ( first ) { - f << endl << "# Input datas" << endl ; - first = false ; + if ( Graph()->GraphMacroLevel() == 0 ) { + const GraphBase::ListOfSLinks * Datas = Graph()->GetDatas() ; + first = true ; + for ( i = 0 ; i < (int ) Datas->size() ; i++ ) { + if ( first ) { + f << " " << endl << " " << "# Input datas" << endl ; + first = false ; + } + bool fromparam = true ; + bool toparam = true ; + LinkSavePY( f , Graph()->Name() , (*Datas)[ i ] , fromparam , toparam , true ) ; } - bool fromparam = true ; - bool toparam = true ; - LinkSavePY( f , Graph()->Name() , (*Datas)[ i ] , fromparam , toparam , true ) ; } first = true ; @@ -1454,29 +1573,30 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { char * aPortName ; int j ; for ( j = 0 ; j < (int ) strlen( aParam ) ; j++ ) { - if ( aParam[ j ] == '\\' ) { +// if ( aParam[ j ] == '\\' ) { + if ( aParam[ j ] == '_' && aParam[ j+1 ] == '_' ) { aNodeName = new char[ j+1 ] ; strncpy( aNodeName , aParam , j ) ; aNodeName[ j ] = '\0' ; - aPortName = new char[ strlen( aParam ) - j ] ; - strncpy( aPortName , &aParam[ j+1 ] , strlen( aParam ) - j ) ; + aPortName = new char[ strlen( aParam ) - j-1 ] ; + strncpy( aPortName , &aParam[ j+2 ] , strlen( aParam ) - j-1 ) ; break ; } } const GraphBase::InPort * anInPort = Graph()->GetChangeGraphNode( aNodeName )->GetInPort( aPortName ) ; if ( !anInPort->IsDataConnected() ) { if ( first ) { - f << endl << "# Input Ports of the graph" << endl ; + f << " " << endl << " " << "# Input Ports of the graph" << endl ; first = false ; } - f << "#I" << aNodeName << aPortName << " = " << aNodeName << ".GetInPort( '" + f << " " << "#I" << aNodeName << aPortName << " = " << aNodeName << ".GetInPort( '" << aPortName << "' )" << endl ; } delete [] aNodeName ; delete [] aPortName ; } - f << endl << "# Output Ports of the graph" << endl ; + f << " " << endl << " # Output Ports of the graph" << endl ; const SALOME_ModuleCatalog::ListOfServicesParameter ListOfOutParam = Graph()->ServiceOutParameter() ; for ( i = 0 ; i < (int ) ListOfOutParam.length() ; i++ ) { string _aParam = CORBA::string_dup(ListOfOutParam[ i ].Parametername) ; @@ -1485,20 +1605,41 @@ bool GraphEditor::OutNode::SavePY( ostream & f ) { char * aPortName ; int j ; for ( j = 0 ; j < (int ) strlen( aParam ) ; j++ ) { - if ( aParam[ j ] == '\\' ) { +// if ( aParam[ j ] == '\\' ) { + if ( aParam[ j ] == '_' && aParam[ j+1 ] == '_' ) { aNodeName = new char[ j+1 ] ; strncpy( aNodeName , aParam , j ) ; aNodeName[ j ] = '\0' ; - aPortName = new char[ strlen( aParam ) - j ] ; - strncpy( aPortName , &aParam[ j+1 ] , strlen( aParam ) - j ) ; + aPortName = new char[ strlen( aParam ) - j-1 ] ; + strncpy( aPortName , &aParam[ j+2 ] , strlen( aParam ) - j-1 ) ; break ; } } - f << "#O" << aNodeName << aPortName << " = " << aNodeName << ".GetOutPort( '" + f << " " << "#O" << aNodeName << aPortName << " = " << aNodeName << ".GetOutPort( '" << aPortName << "' )" << endl ; delete [] aNodeName ; delete [] aPortName ; } + + f << " " << "return " << Graph()->Name() << endl << endl ; + +// RECURSIVE CREATION OF GRAPHS OF MACRONODES + for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { + if ( Graph()->GraphNodes( i )->IsMacroNode() ) { + GraphBase::GOTONode * aMacroNode = (GraphBase::GOTONode * ) Graph()->GraphNodes( i ) ; + GraphBase::Graph * aMacroGraph = (GraphBase::Graph * ) aMacroNode->CoupledNode() ; + cdebug << "OutNode::SavePY ---> OutNode::SavePY( ostream & f ) MacroGraph " << aMacroGraph->Name() << endl ; + GraphEditor::DataFlow * aDataFlow = aMacroGraph->GraphEditor() ; + cdebug << "SavePY of the Graph " << aDataFlow->Graph() << " of the MacroNode " + << aMacroGraph->Name() << endl ; + if ( !aDataFlow->SavePY( f , false ) ) { + return false ; + } + } + } + +// f << Graph()->Name() << " = " << Graph()->Name() << "()" << endl ; + return true ; } diff --git a/src/GraphEditor/DataFlowEditor_OutNode.hxx b/src/GraphEditor/DataFlowEditor_OutNode.hxx index 351707d..4c14b83 100644 --- a/src/GraphEditor/DataFlowEditor_OutNode.hxx +++ b/src/GraphEditor/DataFlowEditor_OutNode.hxx @@ -55,18 +55,19 @@ namespace GraphEditor { bool Executable() ; bool LoadNodes( map< string , int > & aMapOfNodes , - const GraphBase::ListOfNodes &aNodes ) ; + const GraphBase::ListOfSNodes &aNodes ) ; bool LoadLinks( map< string , int > & aMapOfNodes , - const GraphBase::ListOfLinks &aLinks ) ; + const GraphBase::ListOfSLinks &aLinks ) ; bool LoadDatas( map< string , int > & aMapOfNodes , - const GraphBase::ListOfLinks &aDatas ) ; + const GraphBase::ListOfSLinks &aDatas ) ; // bool GraphEditor::OutNode::LinkSaveXML( ostream &f , char *Tabs , bool GraphEditor::OutNode::LinkSaveXML( QDomDocument & Graph , QDomElement & link , GraphBase::SLink aLink , bool wdata ) const ; // bool SaveXML(ostream &f ) ;QDomDocument & Graph - bool SaveXML(QDomDocument & Graph ) ; + bool SaveXML( ostream & f , QDomDocument & Graph , + bool aSuperGraph , QDomElement & supergraph ) ; bool GraphEditor::OutNode::LinkSavePY( ostream &f , const char *aGraphName , @@ -74,7 +75,7 @@ namespace GraphEditor { bool fromparam , bool toparam , bool wdata ) const; - bool SavePY(ostream &f ) ; + bool SavePY(ostream &f , bool importSuperV ) ; void DateModification() ; @@ -102,6 +103,10 @@ namespace GraphEditor { const char * DebugFileName ) ; virtual ~OutNode(); + GraphExecutor::FiniteStateMachine * Automaton() { return theAutomaton ; } ; + + bool Name( const char * aName ) ; + void Set_prof_debug( CORBA::ORB_ptr ORB , const char * DebugFileName ) ; GraphBase::StreamGraph * StreamGraph() { return _StreamGraph ; } ; @@ -113,7 +118,8 @@ namespace GraphEditor { return _Graph ; } ; bool LoadDataFlow( const GraphBase::SGraph *aDataFlow ) ; - bool LoadXml( const char* myFileName ) ; + bool LoadXml( const char* myFileName , GraphBase::ListOfSGraphs & aListOfDataFlows ) ; +// bool LoadXml( const char* myFileName ) ; bool LoadInfo( const GraphBase::SNode &aDataFlowInfo ) ; bool SaveXml(const char* myFileName ) ; @@ -121,7 +127,7 @@ namespace GraphEditor { bool SavePy(const char* myFileName ) ; // get all DataFlow informations (for a .XML file) : - GraphBase::SGraph * GetDataFlow() ; + GraphBase::ListOfSGraphs * GetDataFlows( GraphBase::ListOfSGraphs * aListOfDataFlows ) ; // void DateModification() ; @@ -185,13 +191,13 @@ namespace GraphEditor { bool AddLink( const char* FromNodeName , const char* FromServiceParameterName , const char* ToNodeName , - const char* ToServiceParameterName , - const CORBA::Any aValue ) { + const char* ToServiceParameterName ) { +// , const CORBA::Any aValue ) { DateModification() ; _Valid = false ; return _Graph->AddLink( FromNodeName , FromServiceParameterName , - ToNodeName , ToServiceParameterName , - aValue ) ; } ; + ToNodeName , ToServiceParameterName ) ; } ; +// , aValue ) ; } ; bool RemoveLink( const char* FromNodeName , const char* FromServiceParameterName , @@ -256,10 +262,6 @@ namespace GraphEditor { const char* ToServiceParameterName , const int index , long &X , long &Y ) ; - bool AddInputData( const char* ToNodeName1 , - const char* ToParameterName1 , - const char* ToNodeName2 , - const char* ToParameterName2 ) ; bool IsValid() { if ( !_Valid ) @@ -267,10 +269,7 @@ namespace GraphEditor { return _Valid ; } ; bool IsNotValid() const { return !_Valid ; } ; - bool UnValid() { - bool RetVal = _Valid ; - _Valid = false ; - return RetVal ; } ; + bool UnValid() ; bool IsExecutable() { if ( !_Valid ) diff --git a/src/GraphEditor/Makefile.in b/src/GraphEditor/Makefile.in index 6bd73f7..056901b 100644 --- a/src/GraphEditor/Makefile.in +++ b/src/GraphEditor/Makefile.in @@ -60,7 +60,7 @@ BIN_SERVER_IDL = CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) \ -I${KERNEL_ROOT_DIR}/include/salome -CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \ +CXXFLAGS+= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \ -I${KERNEL_ROOT_DIR}/include/salome LDFLAGS+= -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lSalomeSuperVisionExecutor -lOpUtil -lSALOMELocalTrace \ -lc $(QT_MT_LIBS) $(OGL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome diff --git a/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx b/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx index 36d198c..10d4cdb 100644 --- a/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx +++ b/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx @@ -55,21 +55,20 @@ GraphExecutor::DataFlow::DataFlow( CORBA::ORB_ptr ORB, cdebug_out << "GraphExecutor::DataFlow::DataFlow" << endl; } -GraphExecutor::DataFlow::DataFlow( - CORBA::ORB_ptr ORB, - SALOME_NamingService* ptrNamingService , - const SALOME_ModuleCatalog::Service& DataFlowService , - const char *DataFlowComponentName , - const char *DataFlowInterfaceName , - const char *DataFlowName , - const SUPERV::KindOfNode DataFlowkind , - const SUPERV::SDate DataFlowFirstCreation , - const SUPERV::SDate DataFlowLastModification , - const char * DataFlowExecutorRelease , - const char * DataFlowAuthor , - const char * DataFlowComputer , - const char * DataFlowComment , - const char * DebugFileName ) : +GraphExecutor::DataFlow::DataFlow( CORBA::ORB_ptr ORB, + SALOME_NamingService* ptrNamingService , + const SALOME_ModuleCatalog::Service& DataFlowService , + const char *DataFlowComponentName , + const char *DataFlowInterfaceName , + const char *DataFlowName , + const SUPERV::KindOfNode DataFlowkind , + const SUPERV::SDate DataFlowFirstCreation , + const SUPERV::SDate DataFlowLastModification , + const char * DataFlowExecutorRelease , + const char * DataFlowAuthor , + const char * DataFlowComputer , + const char * DataFlowComment , + const char * DebugFileName ) : OutNode( ORB, ptrNamingService , DataFlowService , DataFlowComponentName , DataFlowInterfaceName , DataFlowName , DataFlowkind , DataFlowFirstCreation , DataFlowLastModification , @@ -115,6 +114,91 @@ bool GraphExecutor::DataFlow::ContainerKill( const char *aNodeName ) { return RetVal ; } +bool GraphExecutor::DataFlow::InputOfAny( const char * ToServiceParameterName , + const CORBA::Any & aValue ) { + cdebug_in "GraphExecutor::DataFlow::InputOfAny" << endl ; + bool RetVal = false ; + cdebug << pthread_self() << "GraphExecutor::DataFlow::::InputOfAny " << Graph()->Name() << "(" + << ToServiceParameterName << ")" << endl ; + if ( Graph()->GraphMacroLevel() ) { + GraphBase::OutPort * anOutPort ; + anOutPort = Graph()->GetChangeInDataNodePort( ToServiceParameterName ) ; + cdebug << pthread_self() << "GraphExecutor::DataFlow::InputOfAny " << Graph()->Name() + << " " << ToServiceParameterName << " " << anOutPort->State() << " Done " << anOutPort->Done() + << endl ; + RetVal = AddInputData( Graph()->Name() , ToServiceParameterName , aValue ) ; + anOutPort->State( SUPERV::ReadyState ) ; + anOutPort->Done( true ) ; + GraphExecutor::InNode * anInNode = (GraphExecutor::InNode * ) Graph()->GetChangeGraphNode( anOutPort->InPorts( 0 )->NodeName() )->GetInNode() ; + cdebug << pthread_self() << "GraphExecutor::DataFlow::InputOfAny : " << anInNode->Name() + << "->SendSomeDataReady( " << Graph()->Name() << " ) " << endl ; + anInNode->SendSomeDataReady( Graph()->Name() ) ; + if ( anInNode->IsReady() ) { + cdebug << pthread_self() << "GraphExecutor::DataFlow::InputOfAny : " << anInNode->Name() + << "->SendEvent( GraphExecutor::ExecuteEvent ) " + << " " << anInNode->Name() << "->IsReady() " << anInNode->IsReady() << " State " + << anInNode->State() << endl ; + if ( anInNode->IsLockedDataWait() ) { + cdebug << pthread_self() << "GraphExecutor::DataFlow::InputOfAny : " << anInNode->Name() + << " IsLockedDataWait() ==> UnLockDataWait" << endl ; + anInNode->UnLockDataWait() ; + } + anInNode->CreateNewThread( true ) ; + anInNode->SendEvent( GraphExecutor::ExecuteEvent ) ; + State( GraphExecutor::ExecutingState ) ; + } + } + cdebug_out << "GraphExecutor::DataFlow::InputOfAny " << RetVal << endl ; + return RetVal ; +} + +bool GraphExecutor::DataFlow::OutputOfAny( const char * aNodeName , + const char * ToServiceParameterName , + const CORBA::Any & aValue ) { + cdebug_in << "GraphExecutor::DataFlow::OutputOfAny" << endl ; + bool RetVal = false ; + GraphBase::Graph * aMacroGraph = (GraphBase::Graph * ) Graph()->GetChangeGraphNode( aNodeName ) ; +// GraphExecutor::InNode * anInNode = (GraphExecutor::InNode * ) aMacroGraph->GetInNode() ; + RetVal = Graph()->AddOutputData( aNodeName , ToServiceParameterName , aValue ) ; + GraphBase::OutPort * anOutPort = aMacroGraph->GetChangeOutPort( ToServiceParameterName ) ; + int i ; + for ( i = 0 ; i < anOutPort->InPortsSize() ; i++ ) { + if ( strcmp( anOutPort->ChangeInPorts( i )->NodeName() , Graph()->Name() ) ) { + cdebug << "GraphExecutor::DataFlow::OutputOfAny toNodeName " << anOutPort->ChangeInPorts( i )->NodeName() + << "(" << anOutPort->ChangeInPorts( i )->PortName() << ")" << endl ; + GraphExecutor::InNode * aLinkedNode = (GraphExecutor::InNode * ) Graph()->GetChangeGraphNode( anOutPort->ChangeInPorts( i )->NodeName() )->GetInNode() ; + int sts ; + if ( aLinkedNode->IsLockedDataWait() ) { + cdebug << "GraphExecutor::DataFlow::OutputOfAny " << aLinkedNode->Name() + << " IsLockedDataWait --> UnLockDataWait" << endl ; + } + sts = aLinkedNode->SendSomeDataReady( (char * ) aNodeName ) ; + cdebug << "GraphExecutor::DataFlow::OutputOfAny " << aLinkedNode->Name() + << "->SendSomeDataReady( " << aNodeName << " ) sts " << sts << endl ; + if ( sts ) { + if ( aLinkedNode->State() == GraphExecutor::DataReadyState ) { + aLinkedNode->CreateNewThreadIf( true ) ; + aLinkedNode->UnLockDataWait() ; + int res = aLinkedNode->DataUndef_AllDataReadyAction() ; + } + } + } + else if ( Graph()->GraphMacroLevel() != 0 ) { + cdebug << "GraphExecutor::DataFlow::OutputOfAny to MacroGraph " << anOutPort->ChangeInPorts( i )->NodeName() + << "(" << anOutPort->ChangeInPorts( i )->PortName() << ") " << Graph()->CoupledNodeName () << endl ; + Graph()->CoupledNode()->GraphExecutor()->OutputOfAny( Graph()->CoupledNodeName() , + anOutPort->ChangeInPorts( i )->PortName() , + *anOutPort->Value() ) ; + } + else { + cdebug << "GraphExecutor::DataFlow::OutputOfAny to Graph " << anOutPort->ChangeInPorts( i )->NodeName() + << "(" << anOutPort->ChangeInPorts( i )->PortName() << ") ignored" << endl ; + } + } + cdebug_out << "GraphExecutor::DataFlow::OutputOfAny " << RetVal << endl ; + return RetVal ; +} + bool GraphExecutor::DataFlow::Kill() { cdebug_in << "GraphExecutor::DataFlow::Kill()" << endl; bool RetVal = GraphExecutor::OutNode::Kill() ; diff --git a/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx b/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx index b5774e7..3c348af 100644 --- a/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx +++ b/src/GraphExecutor/DataFlowExecutor_DataFlow.hxx @@ -59,18 +59,23 @@ namespace GraphExecutor { const char * DebugFileName = NULLSTRING ) ; virtual ~DataFlow(); - bool LoadDataFlow( const GraphBase::SGraph &aDataFlow ) ; - bool LoadXml( const char* myFileName ) ; + bool LoadDataFlow( const GraphBase::SGraph * aDataFlow ) ; +// bool LoadXml( const char* myFileName ) ; const SALOME_ModuleCatalog::Service * NodeService( const char * NodeName ) ; - bool ChangeInputData( const char* ToNodeName , - const char* ToParameterName , + bool AddInputData( const char * ToNodeName , + const char * ToParameterName , + const CORBA::Any aValue = CORBA::Any() ) ; + bool ChangeInputData( const char * ToNodeName , + const char * ToParameterName , const CORBA::Any aValue = CORBA::Any() ) ; - bool AddInputSharedData( const char* ToNodeName1 , - const char* ToParameterName1 , - const char* ToNodeName2 , - const char* ToParameterName2 ) ; + bool InputOfAny( const char * ToServiceParameterName , + const CORBA::Any & aValue ) ; + + bool OutputOfAny( const char * aNodeName , + const char * ToServiceParameterName , + const CORBA::Any & aValue ) ; bool IsValid() ; bool IsExecutable() ; @@ -81,6 +86,7 @@ namespace GraphExecutor { long LastLevelDone() ; + void State(GraphExecutor::AutomatonState aState ) ; SUPERV::GraphState State() ; SUPERV::GraphState State(const char * aNodeName ) ; SUPERV::GraphState State( const char * aNodeName , @@ -89,8 +95,8 @@ namespace GraphExecutor { long Thread() ; long Thread(const char * aNodeName ) ; - SUPERV::AutomatonState AutomatonState() ; - SUPERV::AutomatonState AutomatonState(const char * aNodeName ) ; + GraphExecutor::AutomatonState AutomatonState() ; + GraphExecutor::AutomatonState AutomatonState(const char * aNodeName ) ; SUPERV::ControlState ControlState() ; SUPERV::ControlState ControlState(const char * aNodeName ) ; diff --git a/src/GraphExecutor/DataFlowExecutor_DataFlow.lxx b/src/GraphExecutor/DataFlowExecutor_DataFlow.lxx index 2cf8cf4..8e9390f 100644 --- a/src/GraphExecutor/DataFlowExecutor_DataFlow.lxx +++ b/src/GraphExecutor/DataFlowExecutor_DataFlow.lxx @@ -29,41 +29,34 @@ #include "DataFlowExecutor_OutNode.hxx" -inline bool GraphExecutor::DataFlow::LoadDataFlow( - const GraphBase::SGraph &aDataFlow ) { +inline bool GraphExecutor::DataFlow::LoadDataFlow( const GraphBase::SGraph * aDataFlow ) { return GraphExecutor::OutNode::LoadDataFlow( aDataFlow ) ; } -inline bool GraphExecutor::DataFlow::LoadXml( const char* myFileName ) { - return GraphExecutor::OutNode::LoadXml( myFileName ) ; -} +//inline bool GraphExecutor::DataFlow::LoadXml( const char* myFileName ) { +// return GraphExecutor::OutNode::LoadXml( myFileName ) ; +//} -inline const SALOME_ModuleCatalog::Service * GraphExecutor::DataFlow::NodeService( - const char * aNodeName ) { +inline const SALOME_ModuleCatalog::Service * GraphExecutor::DataFlow::NodeService( const char * aNodeName ) { if ( Graph()->GetGraphNode( aNodeName ) ) return Graph()->GetGraphNode( aNodeName )->GetService() ; return NULL ; } -inline bool GraphExecutor::DataFlow::ChangeInputData( const char* ToNodeName , - const char* ToParameterName , - const CORBA::Any aValue ) { +inline bool GraphExecutor::DataFlow::AddInputData( const char* ToNodeName , + const char* ToParameterName , + const CORBA::Any aValue ) { if ( !IsValid() ) return false ; - return Graph()->ChangeInputData( ToNodeName , ToParameterName , aValue ) ; + return Graph()->AddInputData( ToNodeName , ToParameterName , aValue ) ; } ; -inline bool GraphExecutor::DataFlow::AddInputSharedData(const char* ToNodeName1 , - const char* ToParameterName1 , - const char* ToNodeName2 , - const char* ToParameterName2 ) { +inline bool GraphExecutor::DataFlow::ChangeInputData( const char* ToNodeName , + const char* ToParameterName , + const CORBA::Any aValue ) { if ( !IsValid() ) return false ; - return GraphExecutor::OutNode::AddInputData( ToNodeName1 , - ToParameterName1 , - ToNodeName2 , - ToParameterName2 ) ; -// aKindOfPortValue ) ; + return Graph()->ChangeInputData( ToNodeName , ToParameterName , aValue ) ; } ; inline bool GraphExecutor::DataFlow::IsValid() { @@ -106,6 +99,10 @@ inline long GraphExecutor::DataFlow::EventQSize() { return GraphExecutor::OutNode::EventQSize() ; } +inline void GraphExecutor::DataFlow::State(GraphExecutor::AutomatonState aState ) { + GraphExecutor::OutNode::State( aState ) ; +} + inline SUPERV::GraphState GraphExecutor::DataFlow::State() { return GraphExecutor::OutNode::State() ; } @@ -129,11 +126,11 @@ inline long GraphExecutor::DataFlow::Thread( const char * aNodeName ) { return GraphExecutor::OutNode::Thread( aNodeName ) ; } -inline SUPERV::AutomatonState GraphExecutor::DataFlow::AutomatonState() { +inline GraphExecutor::AutomatonState GraphExecutor::DataFlow::AutomatonState() { return GraphExecutor::OutNode::AutomatonState() ; } -inline SUPERV::AutomatonState GraphExecutor::DataFlow::AutomatonState( +inline GraphExecutor::AutomatonState GraphExecutor::DataFlow::AutomatonState( const char * aNodeName ) { return GraphExecutor::OutNode::AutomatonState( aNodeName ) ; } diff --git a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx index 448ad16..9916c77 100644 --- a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx +++ b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx @@ -45,41 +45,43 @@ void * start_function( void *p ) ; #define ToKillDoneState SUPERV::ToKillDoneState #define ToStopState SUPERV::ToStopState +#if 0 // States : -#define UnKnownState SUPERV::UnKnownState -#define DataUndefState SUPERV::DataUndefState -#define DataWaitingState SUPERV::DataWaitingState -#define DataReadyState SUPERV::DataReadyState -#define SuspendedReadyState SUPERV::SuspendedReadyState -#define SuspendedReadyToResumeState SUPERV::SuspendedReadyToResumeState -#define ResumedReadyState SUPERV::ResumedReadyState -#define KilledReadyState SUPERV::KilledReadyState -#define StoppedReadyState SUPERV::StoppedReadyState -#define ExecutingState SUPERV::ExecutingState -#define SuspendedExecutingState SUPERV::SuspendedExecutingState -#define ResumedExecutingState SUPERV::ResumedExecutingState -#define KilledExecutingState SUPERV::KilledExecutingState -#define StoppedExecutingState SUPERV::StoppedExecutingState -#define SuccessedExecutingState SUPERV::SuccessedExecutingState -#define ErroredExecutingState SUPERV::ErroredExecutingState -#define SuspendedSuccessedState SUPERV::SuspendedSuccessedState -#define SuspendedErroredState SUPERV::SuspendedErroredState -#define SuspendedSuccessedToReStartState SUPERV::SuspendedSuccessedToReStartState -#define SuspendedErroredToReStartState SUPERV::SuspendedErroredToReStartState -#define ResumedSuccessedState SUPERV::ResumedSuccessedState -#define ResumedErroredState SUPERV::ResumedErroredState -#define KilledSuccessedState SUPERV::KilledSuccessedState -#define KilledErroredState SUPERV::KilledErroredState -#define StoppedSuccessedState SUPERV::StoppedSuccessedState -#define StoppedErroredState SUPERV::StoppedErroredState -#define SuccessedState SUPERV::SuccessedState -#define ErroredState SUPERV::ErroredState -#define SuspendedState SUPERV::SuspendedState -#define KilledState SUPERV::KilledState -#define StoppedState SUPERV::StoppedState -#define ReRunnedState SUPERV::ReRunnedState -#define ReStartedState SUPERV::ReStartedState -#define NumberOfAutomatonStates SUPERV::NumberOfAutomatonStates +#define UnKnownState GraphExecutor::UnKnownState +#define DataUndefState GraphExecutor::DataUndefState +#define DataWaitingState GraphExecutor::DataWaitingState +#define DataReadyState GraphExecutor::DataReadyState +#define SuspendedReadyState GraphExecutor::SuspendedReadyState +#define SuspendedReadyToResumeState GraphExecutor::SuspendedReadyToResumeState +#define ResumedReadyState GraphExecutor::ResumedReadyState +#define KilledReadyState GraphExecutor::KilledReadyState +#define StoppedReadyState GraphExecutor::StoppedReadyState +#define ExecutingState GraphExecutor::ExecutingState +#define SuspendedExecutingState GraphExecutor::SuspendedExecutingState +#define ResumedExecutingState GraphExecutor::ResumedExecutingState +#define KilledExecutingState GraphExecutor::KilledExecutingState +#define StoppedExecutingState GraphExecutor::StoppedExecutingState +#define SuccessedExecutingState GraphExecutor::SuccessedExecutingState +#define ErroredExecutingState GraphExecutor::ErroredExecutingState +#define SuspendedSuccessedState GraphExecutor::SuspendedSuccessedState +#define SuspendedErroredState GraphExecutor::SuspendedErroredState +#define SuspendedSuccessedToReStartState GraphExecutor::SuspendedSuccessedToReStartState +#define SuspendedErroredToReStartState GraphExecutor::SuspendedErroredToReStartState +#define ResumedSuccessedState GraphExecutor::ResumedSuccessedState +#define ResumedErroredState GraphExecutor::ResumedErroredState +#define KilledSuccessedState GraphExecutor::KilledSuccessedState +#define KilledErroredState GraphExecutor::KilledErroredState +#define StoppedSuccessedState GraphExecutor::StoppedSuccessedState +#define StoppedErroredState GraphExecutor::StoppedErroredState +#define SuccessedState GraphExecutor::SuccessedState +#define ErroredState GraphExecutor::ErroredState +#define SuspendedState GraphExecutor::SuspendedState +#define KilledState GraphExecutor::KilledState +#define StoppedState GraphExecutor::StoppedState +#define ReRunnedState GraphExecutor::ReRunnedState +#define ReStartedState GraphExecutor::ReStartedState +#define NumberOfAutomatonStates GraphExecutor::NumberOfAutomatonStates +#endif // Events : #define UndefinedEvent GraphExecutor::UndefinedEvent @@ -268,7 +270,7 @@ GraphExecutor::FiniteStateMachine::FiniteStateMachine() { for ( i = 0 ; i < NumberOfAutomatonStates ; i++ ) { for ( j = 0 ; j < NumberOfEvents ; j++ ) { // id est = SameState and VoidAction - _TransitionTable[ i ][ j ] = (SUPERV::AutomatonState ) i ; + _TransitionTable[ i ][ j ] = (GraphExecutor::AutomatonState ) i ; _ActionTable[ i ][ j ] = GraphExecutor::ErrorAction ; } } @@ -283,6 +285,8 @@ GraphExecutor::FiniteStateMachine::FiniteStateMachine() { // SomeDataReadyEvent : _TransitionTable[ DataWaitingState ][ SomeDataReadyEvent ] = DataUndefState ; _ActionTable[ DataUndefState ][ SomeDataReadyEvent ] = DataWaiting_SomeDataReadyAction; + _TransitionTable[ DataReadyState ][ SomeDataReadyEvent ] = DataUndefState ; + _ActionTable[ DataUndefState ][ SomeDataReadyEvent ] = DataWaiting_SomeDataReadyAction; // NotAllDataReadyEvent : _TransitionTable[ DataUndefState ][ NotAllDataReadyEvent ] = DataWaitingState ; _ActionTable[ DataWaitingState ][ NotAllDataReadyEvent ] = DataUndef_NotAllDataReadyAction; @@ -455,7 +459,7 @@ GraphExecutor::FiniteStateMachine::FiniteStateMachine() { _ExecNumber = 0 ; _GraphExecutingNumber = 0 ; _PyInitModule = false ; - + _DbgFileNumber = 0 ; // cdebug_out << "FiniteStateMachine::FiniteStateMachine _TransitionTable " // << endl; } @@ -585,6 +589,50 @@ bool GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncName , P return RetVal ; } +GraphBase::Graph * GraphExecutor::FiniteStateMachine::MapGraph( const char * aGraphName ) { + GraphBase::Graph * aGraph = _MapOfGraphs[ aGraphName ] ; + //cout << "MapGraph " << aGraphName << " --> " << aGraph << endl ; + return aGraph ; +} + +bool GraphExecutor::FiniteStateMachine::MapGraph( GraphBase::Graph * aGraph , const char * aGraphName ) { + if ( MapGraph( aGraphName ) ) { + return false ; + } + _MapOfGraphs[ aGraphName ] = aGraph ; + return true ; +} + +void GraphExecutor::FiniteStateMachine::EraseGraph( const char * aGraphName ) { + _MapOfGraphs.erase( aGraphName ) ; +} + +bool GraphExecutor::FiniteStateMachine::GraphName( const char * aGraphName ) { + return _MapOfGraphNames[ aGraphName ] ; +} + +string GraphExecutor::FiniteStateMachine::GraphInstanceName( const char * aGraphName ) { + int GraphInstanceNumber = _MapOfGraphNames[ aGraphName ] ; + if ( GraphInstanceNumber ) { + _MapOfGraphNames[ aGraphName ] = GraphInstanceNumber + 1 ; + } + else { + GraphInstanceNumber = 0 ; + _MapOfGraphNames[ aGraphName ] = GraphInstanceNumber + 1 ; + } + string theGraphInstanceName = string( aGraphName ) ; + if ( GraphInstanceNumber ) { + theGraphInstanceName += "_" ; + ostringstream astr ; +// astr << GraphInstanceNumber << ends ; + astr << GraphInstanceNumber ; + theGraphInstanceName += astr.str() ; + } + //cout << "GraphExecutor::FiniteStateMachine::GraphInstanceName( " << aGraphName << " ) --> " + // << theGraphInstanceName << endl ; + return theGraphInstanceName ; +} + void GraphExecutor::FiniteStateMachine::JoinThread() { if ( pthread_mutex_lock( &_MutexJoinWait ) ) { perror("Join pthread_mutex_lock ") ; @@ -632,3 +680,112 @@ void GraphExecutor::FiniteStateMachine::JoinThread( pthread_t aThread ) { } } +ostream & operator<< (ostream &f ,const GraphExecutor::AutomatonState & aState ) { + switch (aState) { + case GraphExecutor::UnKnownState : + f << "UnKnownState"; + break; + case GraphExecutor::DataUndefState : + f << "DataUndefState"; + break; + case GraphExecutor::DataWaitingState : + f << "DataWaitingState"; + break; + case GraphExecutor::DataReadyState : + f << "DataReadyState"; + break; + case GraphExecutor::SuspendedReadyState : + f << "SuspendedReadyState"; + break; + case GraphExecutor::SuspendedReadyToResumeState : + f << "SuspendedReadyToResumeState"; + break; + case GraphExecutor::ResumedReadyState : + f << "ResumedReadyState"; + break; + case GraphExecutor::KilledReadyState : + f << "KilledReadyState"; + break; + case GraphExecutor::StoppedReadyState : + f << "StoppedReadyState"; + break; + case GraphExecutor::ExecutingState : + f << "ExecutingState"; + break; + case GraphExecutor::SuspendedExecutingState : + f << "SuspendedExecutingState"; + break; + case GraphExecutor::ResumedExecutingState : + f << "ResumedExecutingState"; + break; + case GraphExecutor::KilledExecutingState : + f << "KilledExecutingState"; + break; + case GraphExecutor::StoppedExecutingState : + f << "StoppedExecutingState"; + break; + case GraphExecutor::SuccessedExecutingState : + f << "SuccessedExecutingState"; + break; + case GraphExecutor::ErroredExecutingState : + f << "ErroredExecutingState"; + break; + case GraphExecutor::SuspendedSuccessedState : + f << "SuspendedSuccessedState"; + break; + case GraphExecutor::SuspendedErroredState : + f << "SuspendedErroredState"; + break; + case GraphExecutor::ResumedSuccessedState : + f << "ResumedSuccessedState"; + break; + case GraphExecutor::ResumedErroredState : + f << "ResumedErroredState"; + break; + case GraphExecutor::KilledSuccessedState : + f << "KilledSuccessedState"; + break; + case GraphExecutor::KilledErroredState : + f << "KilledErroredState"; + break; + case GraphExecutor::StoppedSuccessedState : + f << "StoppedSuccessedState"; + break; + case GraphExecutor::StoppedErroredState : + f << "StoppedErroredState"; + break; + case GraphExecutor::SuccessedState : + f << "SuccessedState"; + break; + case GraphExecutor::ErroredState : + f << "ErroredState"; + break; + case GraphExecutor::SuspendedState : + f << "SuspendedState"; + break; + case GraphExecutor::KilledState : + f << "KilledState"; + break; + case GraphExecutor::StoppedState : + f << "StoppedState"; + break; + case GraphExecutor::SuspendedSuccessedToReStartState : + f << "SuspendedSuccessedToReStartState"; + break; + case GraphExecutor::SuspendedErroredToReStartState : + f << "SuspendedErroredToReStartState"; + break; + case GraphExecutor::ReRunnedState : + f << "ReRunnedState"; + break; + case GraphExecutor::ReStartedState : + f << "ReStartedState"; + break; + default : + f << "GraphExecutor::AutomatonState_?"; + break; + } + + return f; +} + diff --git a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.hxx b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.hxx index 2ce5d9d..4389c4a 100644 --- a/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.hxx +++ b/src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.hxx @@ -45,8 +45,48 @@ //#include CORBA_SERVER_HEADER(SUPERV) #include +namespace GraphBase { + class Graph ; +} + namespace GraphExecutor { +//The AutomatonState is an internal state of the automaton of the Executor + enum AutomatonState { UnKnownState , + DataUndefState , + DataWaitingState , + DataReadyState , + SuspendedReadyState, + SuspendedReadyToResumeState , + ResumedReadyState , + KilledReadyState , + StoppedReadyState , + ExecutingState , + SuspendedExecutingState , + ResumedExecutingState , + KilledExecutingState , + StoppedExecutingState , + SuccessedExecutingState , + ErroredExecutingState , + SuspendedSuccessedState , + SuspendedErroredState, + ResumedSuccessedState , + ResumedErroredState , + KilledSuccessedState , + KilledErroredState , + StoppedSuccessedState , + StoppedErroredState , + SuccessedState , + ErroredState , + SuspendedState , + KilledState , + StoppedState , + SuspendedSuccessedToReStartState , + SuspendedErroredToReStartState , + ReRunnedState , + ReStartedState , + NumberOfAutomatonStates } ; + enum NodeEvent { UndefinedEvent , NewThreadEvent , SuspendEvent , ToResumeEvent , ResumeEvent , KillEvent , StopEvent , @@ -106,13 +146,13 @@ namespace GraphExecutor { private : char * _ControlStateName[ SUPERV::NumberOfControlStates ] ; - char * _StateName[ SUPERV::NumberOfAutomatonStates ] ; + char * _StateName[ GraphExecutor::NumberOfAutomatonStates ] ; char * _GraphStateName[ SUPERV::NumberOfGraphStates ] ; char * _EventName[ GraphExecutor::NumberOfEvents ] ; char * _ActionName[ NumberOfActions ] ; - SUPERV::AutomatonState _TransitionTable[ SUPERV::NumberOfAutomatonStates ] - [ GraphExecutor::NumberOfEvents ] ; - GraphExecutor::StateEventAction _ActionTable[ SUPERV::NumberOfAutomatonStates ] + GraphExecutor::AutomatonState _TransitionTable[ GraphExecutor::NumberOfAutomatonStates ] + [ GraphExecutor::NumberOfEvents ] ; + GraphExecutor::StateEventAction _ActionTable[ GraphExecutor::NumberOfAutomatonStates ] [ GraphExecutor::NumberOfEvents ] ; pthread_mutex_t _MutexPythonWait ; @@ -121,6 +161,10 @@ namespace GraphExecutor { int _ExecNumber ; int _GraphExecutingNumber ; + int _DbgFileNumber ; + map< string , GraphBase::Graph * > _MapOfGraphs ; + map< string , int > _MapOfGraphNames ; + bool _JoinThread ; pthread_t _JoinThreadNo ; pthread_mutex_t _MutexJoinWait ; @@ -140,12 +184,23 @@ namespace GraphExecutor { bool PyFunction( const char * aPyFuncName , PyObject * aPyFunction ) ; PyObject * PyFunction( const char * aPyFuncName ) ; + string DbgFileNumber() { + _DbgFileNumber += 1 ; + ostringstream astr ; + astr << _DbgFileNumber ; + return astr.str() ; } ; + GraphBase::Graph * MapGraph( const char * aGraphName ) ; + bool MapGraph( GraphBase::Graph * aGraph , const char * aGraphName ) ; + void EraseGraph( const char * aGraphName ) ; + bool GraphName( const char * aGraphName ) ; + string GraphInstanceName( const char * aGraphName ) ; + void JoinThread() ; void JoinThread( pthread_t aThread ) ; const char * ControlStateName( const SUPERV::ControlState & aState ) const { return _ControlStateName[ aState ] ; } ; - const char * StateName( const SUPERV::AutomatonState & aState ) const { + const char * StateName( const GraphExecutor::AutomatonState & aState ) const { return _StateName[ aState ] ; } ; const char * StateName( const SUPERV::GraphState & aState ) const { return _GraphStateName[ aState ] ; } ; @@ -154,15 +209,17 @@ namespace GraphExecutor { const char * ActionName( const GraphExecutor::StateEventAction & anAction ) const { return _ActionName[ anAction ] ; } ; - const SUPERV::AutomatonState NextState( const SUPERV::AutomatonState & aState , - const GraphExecutor::NodeEvent & anEvent ) const { + const GraphExecutor::AutomatonState NextState( const GraphExecutor::AutomatonState & aState , + const GraphExecutor::NodeEvent & anEvent ) const { return _TransitionTable[ aState ][ anEvent ] ; } ; - const GraphExecutor::StateEventAction NextAction( const SUPERV::AutomatonState & aState , + const GraphExecutor::StateEventAction NextAction( const GraphExecutor::AutomatonState & aState , const GraphExecutor::NodeEvent & anEvent ) const { return _ActionTable[ aState ][ anEvent ] ; } ; }; }; +ostream & operator<< (ostream &f ,const GraphExecutor::AutomatonState & aState ) ; + #endif diff --git a/src/GraphExecutor/DataFlowExecutor_InNode.cxx b/src/GraphExecutor/DataFlowExecutor_InNode.cxx index 76ff07f..213e0ff 100644 --- a/src/GraphExecutor/DataFlowExecutor_InNode.cxx +++ b/src/GraphExecutor/DataFlowExecutor_InNode.cxx @@ -51,7 +51,7 @@ using namespace std; static void InitInNode( int &_RewindStack , SUPERV::ControlState &_ControlState , - SUPERV::AutomatonState &_currentState , + GraphExecutor::AutomatonState &_currentState , GraphExecutor::InNode ** _aReStartNode , bool & _PyFuncRunned , PyObject ** _MyPyRunMethod , @@ -77,7 +77,7 @@ static void InitInNode( int &_RewindStack , CORBA::ORB_ptr ORB ) { _RewindStack = 0 ; _ControlState = SUPERV::VoidState ; - _currentState = SUPERV::UnKnownState ; + _currentState = GraphExecutor::UnKnownState ; *_aReStartNode = NULL ; _PyFuncRunned = false ; *_MyPyRunMethod = NULL ; @@ -267,6 +267,22 @@ GraphExecutor::InNode::InNode( CORBA::ORB_ptr ORB, _ComputingNode = (GraphBase::ComputingNode *) _InLineNode ; break ; } + case SUPERV::MacroNode : { + cdebug << "GraphExecutor::InNode::InNode SUPERV::MacroNode : " << NodeName << endl ; + _GraphMacroNode = new GraphBase::Graph( ORB , ptrNamingService , +// aFuncName[0].c_str() , *aPythonFunction[0] , + NodeName , akind , +// NodeFirstCreation , NodeLastModification , +// NodeEditorRelease , NodeAuthor , +// NodeComment , GeneratedName , +// NodeX , NodeY , + Graph_prof_debug , Graph_fdebug ) ; + _ComputingNode = (GraphBase::ComputingNode *) _GraphMacroNode ; + _InLineNode = (GraphBase::InLineNode *) _ComputingNode ; + _GOTONode = (GraphBase::GOTONode *) _InLineNode ; + _GraphMacroNode->Coordinates( NodeX , NodeY ) ; + break ; + } case SUPERV::GOTONode : { cdebug << "GraphEditor::InNode::InNode SUPERV::GOTONode : " << NodeName ; _GOTONode = new GraphBase::GOTONode( ORB , ptrNamingService , @@ -410,14 +426,14 @@ bool GraphExecutor::InNode::Ping() { if ( IsFactoryNode() ) { RetVal = !CORBA::is_nil( _FactoryNode->Component() ) ; if ( RetVal ) { - if ( State() != SUPERV::SuspendedExecutingState ) { + if ( State() != GraphExecutor::SuspendedExecutingState ) { try { _FactoryNode->Component()->ping() ; } catch( ... ) { cdebug << "InNode::Ping() catched" << endl ; - State( SUPERV::ErroredState ) ; - _OutNode->State( SUPERV::ErroredState ) ; + State( GraphExecutor::ErroredState ) ; + _OutNode->State( GraphExecutor::ErroredState ) ; RetVal = false ; } } @@ -464,8 +480,8 @@ bool GraphExecutor::InNode::Suspend() { } catch( ... ) { cdebug << "InNode::Suspend() catched" << endl ; - State( SUPERV::ErroredState ) ; - _OutNode->State( SUPERV::ErroredState ) ; + State( GraphExecutor::ErroredState ) ; + _OutNode->State( GraphExecutor::ErroredState ) ; RetVal = false ; } if ( RetVal ) { @@ -546,8 +562,8 @@ bool GraphExecutor::InNode::Kill() { } catch( ... ) { cdebug << "InNode::Suspend() catched" << endl ; - State( SUPERV::ErroredState ) ; - _OutNode->State( SUPERV::ErroredState ) ; + State( GraphExecutor::ErroredState ) ; + _OutNode->State( GraphExecutor::ErroredState ) ; RetVal = false ; } cdebug << "Component()->Kill_impl() returns status " << RetVal << endl ; @@ -651,8 +667,8 @@ bool GraphExecutor::InNode::Stop() { } catch( ... ) { cdebug << "InNode::Stop() catched" << endl ; - State( SUPERV::ErroredState ) ; - _OutNode->State( SUPERV::ErroredState ) ; + State( GraphExecutor::ErroredState ) ; + _OutNode->State( GraphExecutor::ErroredState ) ; RetVal = false ; } if ( RetVal ) { @@ -722,28 +738,28 @@ bool GraphExecutor::InNode::Resume() { << Automaton()->StateName( State() ) << endl; bool RetVal = false ; if ( IsSuspended() ) { - if ( State() == SUPERV::SuspendedReadyState ) { + if ( State() == GraphExecutor::SuspendedReadyState ) { ResumeAction( GraphExecutor::ToResumeEvent ) ; RetVal = true ; } - else if ( State() == SUPERV::SuspendedExecutingState ) { + else if ( State() == GraphExecutor::SuspendedExecutingState ) { if ( IsFactoryNode() || IsComputingNode() ) { try { RetVal = Component()->Resume_impl() ; } catch( ... ) { cdebug << "InNode::Resume() catched" << endl ; - State( SUPERV::ErroredState ) ; - _OutNode->State( SUPERV::ErroredState ) ; + State( GraphExecutor::ErroredState ) ; + _OutNode->State( GraphExecutor::ErroredState ) ; RetVal = false ; } } } - else if ( State() == SUPERV::SuspendedSuccessedState ) { + else if ( State() == GraphExecutor::SuspendedSuccessedState ) { ResumeAction( GraphExecutor::ResumeEvent ) ; RetVal = true ; } - else if ( State() == SUPERV::SuspendedErroredState ) { + else if ( State() == GraphExecutor::SuspendedErroredState ) { ResumeAction( GraphExecutor::ResumeEvent ) ; RetVal = true ; } @@ -765,13 +781,13 @@ bool GraphExecutor::InNode::Resume() { #if 0 if ( ControlState() == SUPERV::ToSuspendRunState || ( ControlState() == SUPERV::ToSuspendState && - State() == SUPERV::SuspendedReadyState) ) { + State() == GraphExecutor::SuspendedReadyState) ) { if ( IsSuspended() ) { - if ( State() == SUPERV::SuspendedReadyState ) { + if ( State() == GraphExecutor::SuspendedReadyState ) { ResumeAction() ; RetVal = true ; } - else if ( State() == SUPERV::SuspendedExecutingState ) { + else if ( State() == GraphExecutor::SuspendedExecutingState ) { ResumeAction() ; RetVal = Component()->Resume_impl() ; } @@ -797,13 +813,13 @@ bool GraphExecutor::InNode::Resume() { } else if ( ControlState() == SUPERV::ToSuspendDoneState || ( ControlState() == SUPERV::ToSuspendState && - State() == SUPERV::SuspendedSuccessedState) ) { + State() == GraphExecutor::SuspendedSuccessedState) ) { if ( IsSuspended() ) { - if ( State() == SUPERV::SuspendedSuccessedState ) { + if ( State() == GraphExecutor::SuspendedSuccessedState ) { ResumeAction() ; RetVal = true ; } - else if ( State() == SUPERV::SuspendedErroredState ) { + else if ( State() == GraphExecutor::SuspendedErroredState ) { ResumeAction() ; RetVal = true ; } @@ -849,7 +865,7 @@ bool GraphExecutor::InNode::ReStart( const char * AtNodeName , } else if ( IsSuspended() ) { if ( strcmp( AtNodeName , Name() ) ) { - aRestartNode->State( SUPERV::SuspendedSuccessedState ) ; + aRestartNode->State( GraphExecutor::SuspendedSuccessedState ) ; } if ( AndSuspend ) { ReStartAction( aRestartNode , GraphExecutor::ReStartAndSuspendEvent ) ; @@ -866,14 +882,14 @@ bool GraphExecutor::InNode::ReStart( const char * AtNodeName , bool GraphExecutor::InNode::IsWaiting() { bool aret = false ; // cdebug_in << "GraphExecutor::InNode::IsWaiting " << Name() << endl; - SUPERV::AutomatonState aState = State() ; - if ( aState == SUPERV::DataUndefState || - aState == SUPERV::DataWaitingState || - aState == SUPERV::SuspendedReadyState ) -// aState == SUPERV::SuspendedExecutingState || -// aState == SUPERV::SuspendedSuccessedState || -// aState == SUPERV::SuspendedErroredState || -// aState == SUPERV::SuspendedState + GraphExecutor::AutomatonState aState = State() ; + if ( aState == GraphExecutor::DataUndefState || + aState == GraphExecutor::DataWaitingState || + aState == GraphExecutor::SuspendedReadyState ) +// aState == GraphExecutor::SuspendedExecutingState || +// aState == GraphExecutor::SuspendedSuccessedState || +// aState == GraphExecutor::SuspendedErroredState || +// aState == GraphExecutor::SuspendedState aret = true ; // cdebug_out << "GraphExecutor::InNode::IsWaiting" << endl ; return aret ; @@ -882,11 +898,11 @@ bool GraphExecutor::InNode::IsWaiting() { bool GraphExecutor::InNode::IsReady() { bool aret = false ; // cdebug_in << "GraphExecutor::InNode::IsReady " << Name() << endl; - SUPERV::AutomatonState aState = State() ; - if ( aState == SUPERV::DataUndefState || - aState == SUPERV::DataWaitingState || - aState == SUPERV::DataReadyState || - aState == SUPERV::ResumedReadyState ) + GraphExecutor::AutomatonState aState = State() ; +// if ( aState == GraphExecutor::DataUndefState || +// aState == GraphExecutor::DataWaitingState || + if ( aState == GraphExecutor::DataReadyState || + aState == GraphExecutor::ResumedReadyState ) aret = true ; // cdebug_out << "GraphExecutor::InNode::IsReady" << endl ; return aret ; @@ -895,9 +911,9 @@ bool GraphExecutor::InNode::IsReady() { bool GraphExecutor::InNode::IsRunning() { bool aret = false ; // cdebug_in << "GraphExecutor::InNode::IsRunning " << Name() << endl; - SUPERV::AutomatonState aState = State() ; - if ( aState == SUPERV::ExecutingState || - aState == SUPERV::ResumedExecutingState ) + GraphExecutor::AutomatonState aState = State() ; + if ( aState == GraphExecutor::ExecutingState || + aState == GraphExecutor::ResumedExecutingState ) aret = true ; // cdebug_out << "GraphExecutor::InNode::IsRunning" << endl ; return aret ; @@ -906,21 +922,21 @@ bool GraphExecutor::InNode::IsRunning() { bool GraphExecutor::InNode::IsDone() { bool aret = false ; // cdebug_in << "GraphExecutor::InNode::IsDone " << Name() << endl; - SUPERV::AutomatonState aState = State() ; - if ( aState == SUPERV::KilledReadyState || - aState == SUPERV::StoppedReadyState || - aState == SUPERV::KilledExecutingState || - aState == SUPERV::StoppedExecutingState || - aState == SUPERV::SuspendedSuccessedState || - aState == SUPERV::SuspendedErroredState || -// aState == SUPERV::SuccessedExecutingState || -// aState == SUPERV::ErroredExecutingState || - aState == SUPERV::SuccessedState || - aState == SUPERV::ErroredState || - aState == SUPERV::ResumedSuccessedState || - aState == SUPERV::ResumedErroredState || - aState == SUPERV::KilledSuccessedState || - aState == SUPERV::StoppedSuccessedState ) + GraphExecutor::AutomatonState aState = State() ; + if ( aState == GraphExecutor::KilledReadyState || + aState == GraphExecutor::StoppedReadyState || + aState == GraphExecutor::KilledExecutingState || + aState == GraphExecutor::StoppedExecutingState || + aState == GraphExecutor::SuspendedSuccessedState || + aState == GraphExecutor::SuspendedErroredState || +// aState == GraphExecutor::SuccessedExecutingState || +// aState == GraphExecutor::ErroredExecutingState || + aState == GraphExecutor::SuccessedState || + aState == GraphExecutor::ErroredState || + aState == GraphExecutor::ResumedSuccessedState || + aState == GraphExecutor::ResumedErroredState || + aState == GraphExecutor::KilledSuccessedState || + aState == GraphExecutor::StoppedSuccessedState ) aret = true ; // cdebug_out << "GraphExecutor::InNode::IsDone" << endl ; return aret ; @@ -929,11 +945,11 @@ bool GraphExecutor::InNode::IsDone() { bool GraphExecutor::InNode::IsSuspended() { bool aret = false ; // cdebug_in << "GraphExecutor::InNode::IsSuspended " << Name() << endl; - SUPERV::AutomatonState aState = State() ; - if ( aState == SUPERV::SuspendedReadyState || - aState == SUPERV::SuspendedExecutingState || - aState == SUPERV::SuspendedSuccessedState || - aState == SUPERV::SuspendedErroredState ) + GraphExecutor::AutomatonState aState = State() ; + if ( aState == GraphExecutor::SuspendedReadyState || + aState == GraphExecutor::SuspendedExecutingState || + aState == GraphExecutor::SuspendedSuccessedState || + aState == GraphExecutor::SuspendedErroredState ) aret = true ; // cdebug_out << "GraphExecutor::InNode::IsSuspended" << endl ; return aret ; @@ -941,12 +957,12 @@ bool GraphExecutor::InNode::IsSuspended() { bool GraphExecutor::InNode::IsKilled() { bool aret = false ; // cdebug_in << "GraphExecutor::InNode::IsKilled " << Name() << endl; - SUPERV::AutomatonState aState = State() ; - if ( aState == SUPERV::KilledReadyState || - aState == SUPERV::KilledExecutingState || - aState == SUPERV::KilledSuccessedState || - aState == SUPERV::KilledErroredState || - aState == SUPERV::KilledState ) + GraphExecutor::AutomatonState aState = State() ; + if ( aState == GraphExecutor::KilledReadyState || + aState == GraphExecutor::KilledExecutingState || + aState == GraphExecutor::KilledSuccessedState || + aState == GraphExecutor::KilledErroredState || + aState == GraphExecutor::KilledState ) aret = true ; // cdebug_out << "GraphExecutor::InNode::IsKilled" << endl ; return aret ; @@ -954,12 +970,12 @@ bool GraphExecutor::InNode::IsKilled() { bool GraphExecutor::InNode::IsStopped() { bool aret = false ; // cdebug_in << "GraphExecutor::InNode::IsStopped " << Name() << endl; - SUPERV::AutomatonState aState = State() ; - if ( aState == SUPERV::StoppedReadyState || - aState == SUPERV::StoppedExecutingState || - aState == SUPERV::StoppedSuccessedState || - aState == SUPERV::StoppedErroredState || - aState == SUPERV::StoppedState ) + GraphExecutor::AutomatonState aState = State() ; + if ( aState == GraphExecutor::StoppedReadyState || + aState == GraphExecutor::StoppedExecutingState || + aState == GraphExecutor::StoppedSuccessedState || + aState == GraphExecutor::StoppedErroredState || + aState == GraphExecutor::StoppedState ) aret = true ; // cdebug_out << "GraphExecutor::InNode::IsStopped" << endl ; return aret ; @@ -1045,7 +1061,7 @@ bool GraphExecutor::InNode::StateWait( SUPERV::GraphState aState ) { break ; } default : { - cdebug << " GraphExecutor::OutNode::StateWait Error Undefined State : " + cdebug << " SUPERV::OutNode::StateWait Error Undefined State : " << aState << endl ; } } @@ -1158,12 +1174,17 @@ void GraphExecutor::InNode::InitialState( GraphExecutor::OutNode * theOutNode ) << " with state " << theAutomaton->StateName( anOutPort->State() ) << endl ; GetChangeNodeInPort(i)->State( anOutPort->State() ) ; } - else { + else if ( anOutPort->IsDataConnected() ) { cdebug << "InPort" << i << " state change : " << anInPort->PortName() << " from OutPort " << anOutPort->PortName() << " from Node " << anOutPort->NodeName() << " with state ReadyState" << endl ; GetChangeNodeInPort(i)->State( SUPERV::ReadyState ) ; } + else { + cdebug << "InPort" << i << " state NOT changed : " << anInPort->PortName() << " from OutPort " + << anOutPort->PortName() << " " << anOutPort->PortStatus() << " from Node " << anOutPort->NodeName() + << " with state " << anOutPort->State() << endl ; + } } if ( anOutPort ) { cdebug << "InPort" << i << " : " << anInPort->PortName() << " from OutPort " @@ -1184,8 +1205,8 @@ void GraphExecutor::InNode::InitialState( GraphExecutor::OutNode * theOutNode ) } } - _currentState = Pc > 0 ? SUPERV::DataWaitingState - : SUPERV::DataReadyState ; + _currentState = Pc > 0 ? GraphExecutor::DataWaitingState + : GraphExecutor::DataReadyState ; if ( Pc == GetNodeInPortsSize() ) { _OutNode->PushEvent( this , GraphExecutor::NoDataReadyEvent , _currentState ) ; @@ -1304,8 +1325,8 @@ const long GraphExecutor::InNode::CpuUsed( bool tot ) { } catch ( ... ) { cdebug << "CpuUsed " << Name() << " --> Component()->CpuUsed_impl() ERROR catched " << endl ; - State( SUPERV::ErroredState ) ; - _OutNode->State( SUPERV::ErroredState ) ; + State( GraphExecutor::ErroredState ) ; + _OutNode->State( GraphExecutor::ErroredState ) ; cpu = 0 ; } } diff --git a/src/GraphExecutor/DataFlowExecutor_InNode.hxx b/src/GraphExecutor/DataFlowExecutor_InNode.hxx index 9eb952c..ca7ec68 100644 --- a/src/GraphExecutor/DataFlowExecutor_InNode.hxx +++ b/src/GraphExecutor/DataFlowExecutor_InNode.hxx @@ -33,6 +33,7 @@ #include +#include "DataFlowBase_Graph.hxx" #include "DataFlowBase_FactoryNode.hxx" #include "DataFlowBase_GOTONode.hxx" #include "DataFlowBase_LoopNode.hxx" @@ -72,17 +73,18 @@ namespace GraphExecutor { GraphBase::EndOfLoopNode * _EndOfLoopNode ; GraphBase::SwitchNode * _SwitchNode ; GraphBase::EndOfSwitchNode * _EndOfSwitchNode ; + GraphBase::Graph * _GraphMacroNode ; PyObject * _MyPyRunMethod ; bool _createNewThread ; bool _createNewThreadIf ; int _RewindStack ; - SUPERV::AutomatonState _OldState ; - SUPERV::AutomatonState _currentState ; + GraphExecutor::AutomatonState _OldState ; + GraphExecutor::AutomatonState _currentState ; GraphExecutor::NodeEvent _CurrentEvent ; SUPERV::ControlState _ControlState ; - SUPERV::AutomatonState _NextState ; + GraphExecutor::AutomatonState _NextState ; GraphExecutor::StateEventAction _NextAction ; bool _PyFuncRunned ; @@ -168,8 +170,12 @@ namespace GraphExecutor { return _ComputingNode->IsOneOfInLineNodes() ; } ; const bool IsOneOfGOTONodes() const { return _ComputingNode->IsOneOfGOTONodes() ; } ; + const bool IsMacroNode() const { + return _ComputingNode->IsMacroNode() ; } ; const bool IsDataFlowNode() const { return _ComputingNode->IsDataFlowNode() ; } ; + const bool IsDataStreamNode() const { + return _ComputingNode->IsDataStreamNode() ; } ; const bool IsLoopNode() const { return _ComputingNode->IsLoopNode() ; } ; const bool IsEndLoopNode() const { @@ -207,6 +213,16 @@ namespace GraphExecutor { } ; GraphBase::LoopNode * LoopNode() { return _LoopNode ; } ; + GraphBase::Graph * GraphMacroNode() { + return _GraphMacroNode ; } ; + + SUPERV::CNode_var ObjRef() const { return _ComputingNode->ObjRef() ; } ; + void SetObjRef( SUPERV::CNode_var aNode ) { + _ComputingNode->SetObjRef( aNode ) ; } ; + + Graph_Impl * ObjImpl() const { return _GraphMacroNode->ObjImpl() ; } ; + void SetObjImpl( Graph_Impl * aGraph ) { + _GraphMacroNode->SetObjImpl( aGraph ) ; } ; Engines::Component_var Component() const ; Engines::Container_var Container() const ; @@ -328,9 +344,9 @@ namespace GraphExecutor { void RewindStack( int aRewindStack ) { _RewindStack = aRewindStack ; } ; int RewindStack() const { return _RewindStack ; } ; - SUPERV::AutomatonState State() const { + GraphExecutor::AutomatonState State() const { return _currentState; }; - void State(SUPERV::AutomatonState aState ) { + void State(GraphExecutor::AutomatonState aState ) { // cdebug << "GraphExecutor::InNode::State( " // << Automaton()->StateName( _currentState ) << " --> " // << Automaton()->StateName( aState ) << " )" << endl ; diff --git a/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx b/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx index b8a9eda..835c0e1 100644 --- a/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx +++ b/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx @@ -33,6 +33,19 @@ using namespace std; #include #include +#if defined __GNUC__ + #if __GNUC__ == 2 + #define __GNUC_2__ + #endif +#endif + +#if defined __GNUC_2__ +// _CS_gbo_040604 include explicite pour l'utilisation de +// std::transform dans UpperCase +#include // for toupper +#include // for transform +#endif + #include "Python.h" #include "OpUtil.hxx" @@ -43,12 +56,20 @@ using namespace std; //#include "StreamGraph_Impl.hxx" -#include "DataFlowExecutor_OutNode.hxx" +//#include "DataFlowExecutor_OutNode.hxx" +#include "DataFlowExecutor_DataFlow.hxx" static void UpperCase(std::string& rstr) { - std::transform(rstr.begin(), rstr.end(), rstr.begin(), towupper); +#if defined __GNUC_2__ + // _CS_gbo_040604 towupper n'existe pas. Utilisation de toupper. Par + // ailleurs, include explicite de cctype et algorithm pour toupper + // et transform respectivement. + std::transform(rstr.begin(), rstr.end(), rstr.begin(),toupper); +#else + std::transform(rstr.begin(), rstr.end(), rstr.begin(),towupper); +#endif } @@ -74,8 +95,8 @@ int GraphExecutor::InNode::SendEvent( const GraphExecutor::NodeEvent anEvent ) { } // State( _NextState ) ; -// if ( _OldState == SUPERV::SuccessedExecutingState || -// _OldState == SUPERV::ErroredExecutingState ) { +// if ( _OldState == GraphExecutor::SuccessedExecutingState || +// _OldState == GraphExecutor::ErroredExecutingState ) { // DoneAction() ; // } @@ -90,7 +111,7 @@ int GraphExecutor::InNode::SendEvent( const GraphExecutor::NodeEvent anEvent ) { << " _RewindStack " << _RewindStack << endl ; #if 0 - cout << pthread_self() << "/" << ThreadNo() << " SendedEvent Node " << Name() + //cout << pthread_self() << "/" << ThreadNo() << " SendedEvent Node " << Name() << endl << " ControlState : " << Automaton()->ControlStateName( ControlState() ) << endl << " OldState : " << Automaton()->StateName( _OldState ) << endl @@ -512,7 +533,7 @@ int GraphExecutor::InNode::executeAction() { pthread_t T; int pthread_sts = 1 ; // _OutNode->PushEvent( NULL , GraphExecutor::NewThreadEvent , -// SUPERV::ExecutingState ) ; +// GraphExecutor::ExecutingState ) ; while ( (pthread_sts = pthread_create(&T, NULL, run_function, this )) ) { char * msg = "Cannot pthread_create " ; perror( msg ) ; @@ -543,7 +564,7 @@ int GraphExecutor::InNode::executeAction() { << Automaton()->StateName( State() ) << " " << Automaton()->ActionName( _NextAction ) << "(" << Name() << ") ReStartAction ==>" << endl; - State( SUPERV::SuspendedSuccessedState ) ; + State( GraphExecutor::SuspendedSuccessedState ) ; if ( !ReStartAction( this , GraphExecutor::ReStartEvent ) ) { cdebug << pthread_self() << "/" << ThreadNo() << " executeAction STATE & CALLED " @@ -790,6 +811,7 @@ int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() { cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " " << anInPort->PortName() << " ControlPort inactive." << endl ; } +// That InPort get its value from an other node else if ( strcmp( DataFromNode() , anOutPort->NodeName() ) ) { if ( anInPort->State() == SUPERV::ReadyState ) { InReady += 1 ; @@ -855,6 +877,7 @@ int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() { << LoopBeginning << endl ; } } +// That InPort get its value from the sending node else if ( anInPort->IsGate() ) { const CORBA::Any * theValue = anOutPort->Value() ; long GateOpened ; @@ -899,21 +922,34 @@ int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() { cdebug << endl ; } } - else { + else if ( anOutPort->Done() ) { InReady += 1 ; anInPort->State( SUPERV::ReadyState ) ; cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " " - << anInPort->PortName() << " is Done from " - << anOutPort->NodeName() << " " << anOutPort->PortName() << " " ; + << anInPort->PortName() << " " << anInPort->PortStatus() << " is Done from " + << anOutPort->NodeName() << " " << anOutPort->PortName() << " " << anOutPort->PortStatus() << " " ; #ifdef _DEBUG_ - if ( GraphBase::Base::_prof_debug ) { - anOutPort->StringValue( *GraphBase::Base::_fdebug ) ; - } + if ( GraphBase::Base::_prof_debug ) { + anOutPort->StringValue( *GraphBase::Base::_fdebug ) ; + } #endif - cdebug << endl ; + cdebug << endl ; +// MacroNode : give immediately the value to the corresponding graph + if ( IsMacroNode() ) { + GraphExecutor::DataFlow * aMacroGraph = GraphMacroNode()->CoupledNode()->GraphExecutor() ; + cdebug << "SomeDataReadyAction MacroNode " << aMacroGraph->Graph()->Name() << " --> InputOfAny " + << InReady << "/" << GetNodeInPortsSize() << " InPorts are Ready" << endl ; +// GraphMacroNode()->MacroObject()->InputOfAny( anInPort->PortName() , *anOutPort->Value() ) ; + aMacroGraph->InputOfAny( anInPort->PortName() , *anOutPort->Value() ) ; + } + } + else { + cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " " + << anInPort->PortName() << " " << anInPort->PortStatus() << " is NOT Done from " + << anOutPort->NodeName() << " " << anOutPort->PortName() << " " << anOutPort->PortStatus() << " " ; } } - + if ( InReady == GetNodeInPortsSize() ) { // All Flags != 0 : res = SendEvent( GraphExecutor::AllDataReadyEvent ); // ==> Ready to execute } @@ -940,7 +976,7 @@ int GraphExecutor::InNode::DataUndef_AllDataReadyAction() { // << " CreateNewThreadIf " << CreateNewThreadIf() << " IsLockedDataWait " // << IsLockedDataWait() ; if ( IsLockedDataWait() ) { -// cdebug << " WOULD DEAD-LOCK" << endl ; + cdebug << "DataUndef_AllDataReadyAction() WOULD DEAD-LOCK" << endl ; return 0 ; // ==> DataUndef_AllDataReadyAction() after UnLockDataWait() } // cdebug << endl ; @@ -950,7 +986,7 @@ int GraphExecutor::InNode::DataUndef_AllDataReadyAction() { ThreadNo( pthread_self() ) ; } _OutNode->PushEvent( this , GraphExecutor::AllDataReadyEvent , - SUPERV::DataReadyState ) ; + GraphExecutor::DataReadyState ) ; ReadyAction() ; SUPERV::ControlState aControl = ControlState() ; switch ( aControl ) { @@ -1000,7 +1036,7 @@ int GraphExecutor::InNode::DataReady_SuspendAction() { << " Threads " << _OutNode->Threads() << " SuspendedThreads " << _OutNode->SuspendedThreads() << endl; _OutNode->PushEvent( this , GraphExecutor::SuspendedReadyEvent , - SUPERV::SuspendedReadyState ) ; + GraphExecutor::SuspendedReadyState ) ; GraphExecutor::InNode * aReStartNode = SuspendAction() ; cdebug << pthread_self() << "/" << ThreadNo() << "DataReady_SuspendAction Resumed " << Name() << endl; @@ -1019,13 +1055,13 @@ int GraphExecutor::InNode::SuspendedReady_ResumeAction() { << Name() << endl; // ResumeAction() ; _OutNode->PushEvent( this , GraphExecutor::ResumedReadyEvent , - SUPERV::ResumedReadyState ) ; + GraphExecutor::ResumedReadyState ) ; return 1 ; } int GraphExecutor::InNode::DataReady_KillAction() { _OutNode->PushEvent( this , GraphExecutor::KilledReadyEvent , - SUPERV::KilledReadyState ) ; + GraphExecutor::KilledReadyState ) ; KillAction() ; cdebug << pthread_self() << "/" << ThreadNo() << "DataReady_KillAction " << Name() << " will pthread_exit()" << endl; @@ -1034,7 +1070,7 @@ int GraphExecutor::InNode::DataReady_KillAction() { int GraphExecutor::InNode::DataReady_StopAction() { _OutNode->PushEvent( this , GraphExecutor::StoppedReadyEvent , - SUPERV::StoppedReadyState ) ; + GraphExecutor::StoppedReadyState ) ; StopAction() ; cdebug << pthread_self() << "/" << ThreadNo() << "DataReady_StopAction " << Name() << " will pthread_exit()" << endl; @@ -1049,63 +1085,71 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { // cdebug << pthread_self() << "/" << ThreadNo() << " --> DataReady_ExecuteAction " // << Name() << endl; _OutNode->PushEvent( this , GraphExecutor::ExecuteEvent , - SUPERV::ExecutingState ) ; + GraphExecutor::ExecutingState ) ; RunningAction() ; + + bool Err = false ; + SUPERV::GraphState PortState = SUPERV::ReadyState ; - SUPERV::AutomatonState NewState = SUPERV::DataUndefState ; + GraphExecutor::AutomatonState NewState = GraphExecutor::DataUndefState ; GraphExecutor::NodeEvent NewEvent = GraphExecutor::UndefinedEvent ; - bool Err = false ; + int nInParams ; + ServicesAnyData * InParametersList ; + int nOutParams ; + ServicesAnyData * OutParametersList ; - int nInParams = GetNodeInPortsSize() ; - ServicesAnyData * InParametersList = new ServicesAnyData[nInParams]; + nInParams = GetNodeInPortsSize() ; + InParametersList = new ServicesAnyData[nInParams]; InParametersSet( Err , nInParams , InParametersList ) ; - Engines::Container_var myContainer ; - Engines::Component_var myObjComponent ; - if ( !IsFactoryNode() ) { -// cdebug << ThreadNo() << "No Component : NO StartComponent & No Ping" << endl ; - if ( IsComputingNode() ) { - ObjInterface( true ) ; - CORBA::Object_ptr obj ; - InParametersList[0].Value >>= obj ; - CORBA::Object_var objvar = CORBA::Object_var( obj ) ; - myObjComponent = Engines::Component::_narrow( objvar ) ; - } - else { + nOutParams = GetNodeOutPortsSize() ; + OutParametersList = new ServicesAnyData[nOutParams]; + InOutParametersSet( nOutParams , OutParametersList ) ; + + if ( !IsMacroNode() ) { + + Engines::Container_var myContainer ; + Engines::Component_var myObjComponent ; + if ( !IsFactoryNode() ) { +// cdebug << ThreadNo() << "No Component : NO StartComponent & No Ping" << endl ; + if ( IsComputingNode() ) { + ObjInterface( true ) ; + CORBA::Object_ptr obj ; + InParametersList[0].Value >>= obj ; + CORBA::Object_var objvar = CORBA::Object_var( obj ) ; + myObjComponent = Engines::Component::_narrow( objvar ) ; + } + else { + } } - } - else if ( CORBA::is_nil( Component() ) ) { - ostringstream astr ; - astr << "Graph " << _OutNode->Graph()->Name() << " Node " << Name() - << " : load of component " << ComponentName() << " in container " - << Computer() ; -// _OutNode->Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ; - Err = !_OutNode->Graph()->StartComponent( ThreadNo() , Computer() , - my_strdup( ComponentName() ) , - myContainer , myObjComponent ) ; - ObjInterface( false ) ; - SetContainer( myContainer ) ; - SetComponent( myObjComponent ) ; - } - else { - myContainer = Container() ; - myObjComponent = Component() ; -// cdebug << ThreadNo() << "Component known : NO StartComponent & Ping" -// << endl ; - try { - myObjComponent->ping() ; + else if ( CORBA::is_nil( Component() ) ) { +// ostringstream astr ; +// astr << "Graph " << _OutNode->Graph()->Name() << " Node " << Name() +// << " : load of component " << ComponentName() << " in container " +// << Computer() ; +// _OutNode->Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ; + Err = !_OutNode->Graph()->StartComponent( ThreadNo() , Computer() , + my_strdup( ComponentName() ) , + myContainer , myObjComponent ) ; + ObjInterface( false ) ; + SetContainer( myContainer ) ; + SetComponent( myObjComponent ) ; } - catch( ... ) { - cdebug << "ping() catched" << endl ; - Err = true ; + else { + myContainer = Container() ; + myObjComponent = Component() ; +// cdebug << ThreadNo() << "Component known : NO StartComponent & Ping" +// << endl ; + try { + myObjComponent->ping() ; + } + catch( ... ) { + cdebug << "ping() catched" << endl ; + Err = true ; + } } - } - - int nOutParams = GetNodeOutPortsSize() ; - ServicesAnyData * OutParametersList = new ServicesAnyData[nOutParams]; - InOutParametersSet( nOutParams , OutParametersList ) ; if ( Err || ControlState() == SUPERV::ToKillState || ControlState() == SUPERV::ToKillDoneState || @@ -1115,8 +1159,8 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { } else { if ( !Err ) { - ostringstream astr ; - astr << "Graph " << _OutNode->Graph()->Name() << " Run of Node " << Name() ; +// ostringstream astr ; +// astr << "Graph " << _OutNode->Graph()->Name() << " Run of Node " << Name() ; // _OutNode->Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ; cdebug << ThreadNo() << " Run( '" << ServiceName() << "'" ; for ( i = 0 ; i < (int ) ServiceInParameter().length() ; i++ ) { @@ -1432,46 +1476,81 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { } } } -// } + } // else { // sleep( 1 ) ; // } - ostringstream astr ; - astr << "Graph " << _OutNode->Graph()->Name() << " Node " << Name() << " is done : " - << Automaton()->StateName( State() ) ; +// ostringstream astr ; +// astr << "Graph " << _OutNode->Graph()->Name() << " Node " << Name() << " is done : " +// << Automaton()->StateName( State() ) ; // _OutNode->Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ; if ( Err ) { if ( ControlState() == SUPERV::ToKillState || ControlState() == SUPERV::ToKillDoneState || ControlState() == SUPERV::ToStopState ) { PortState = SUPERV::ErrorState ; - NewState = SUPERV::KilledState ; + NewState = GraphExecutor::KilledState ; NewEvent = GraphExecutor::KillEvent ; } else { PortState = SUPERV::ErrorState ; - NewState = SUPERV::ErroredState ; + NewState = GraphExecutor::ErroredState ; NewEvent = GraphExecutor::ErrorEvent ; } } else { PortState = SUPERV::ReadyState ; - NewState = SUPERV::DataReadyState ; + NewState = GraphExecutor::DataReadyState ; NewEvent = GraphExecutor::SuccessEvent ; } - bool ErrOut = OutParametersSet( Err , PortState , nOutParams , OutParametersList ) ; - - if ( !ErrOut ) { - NewEvent = GraphExecutor::ErrorEvent ; + if ( !IsMacroNode() ) { + bool ErrOut = OutParametersSet( Err , PortState , nOutParams , OutParametersList ) ; + if ( !ErrOut ) { + NewEvent = GraphExecutor::ErrorEvent ; + } + delete [] InParametersList ; + delete [] OutParametersList ; } - delete [] InParametersList ; - delete [] OutParametersList ; - - - SendEvent( NewEvent ); + if ( !IsMacroNode() ) { + SendEvent( NewEvent ) ; + } + else { + GraphExecutor::DataFlow * aMacroGraph = GraphMacroNode()->CoupledNode()->GraphExecutor() ; + cdebug << ThreadNo() << " DataReady_ExecuteAction " << aMacroGraph->Graph()->Name() << " ->DoneWait()" + << " State " << aMacroGraph->State() << endl; + aMacroGraph->DoneWait() ; + cdebug << ThreadNo() << " DataReady_ExecuteAction " << Name() << " State " << aMacroGraph->State() << endl; + if ( aMacroGraph->State() == SUPERV::DoneState ) { + PortState = SUPERV::ReadyState ; + NewState = GraphExecutor::DataReadyState ; + NewEvent = GraphExecutor::SuccessEvent ; + } + else { + Err = true ; + if ( ControlState() == SUPERV::ToKillState || + ControlState() == SUPERV::ToKillDoneState || + ControlState() == SUPERV::ToStopState ) { + PortState = SUPERV::ErrorState ; + NewState = GraphExecutor::KilledState ; + NewEvent = GraphExecutor::KillEvent ; + } + else { + PortState = SUPERV::ErrorState ; + NewState = GraphExecutor::ErroredState ; + NewEvent = GraphExecutor::ErrorEvent ; + } + } + bool ErrOut = OutParametersSet( Err , PortState , nOutParams , OutParametersList ) ; + if ( !ErrOut ) { + NewEvent = GraphExecutor::ErrorEvent ; + } + delete [] InParametersList ; + delete [] OutParametersList ; + SendEvent( NewEvent ) ; + } // cdebug << ThreadNo() << " <-- DataReady_ExecuteAction " << Name() << endl; return 1 ; @@ -1479,14 +1558,14 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { int GraphExecutor::InNode::Executing_SuspendAction() { _OutNode->PushEvent( this , GraphExecutor::SuspendedExecutingEvent , - SUPERV::SuspendedExecutingState ) ; + GraphExecutor::SuspendedExecutingState ) ; cdebug << ThreadNo() << " Executing_SuspendAction " << Name() << endl; return 1 ; } int GraphExecutor::InNode::SuspendedExecuting_ResumeAction() { cdebug << ThreadNo() << " SuspendedExecuting_ResumeAction " << Name() << endl; - SUPERV::AutomatonState next_state ; + GraphExecutor::AutomatonState next_state ; next_state = Automaton()->NextState( State() , GraphExecutor::ExecutingEvent ) ; _OutNode->NewThread() ; // Only for Threads count _OutNode->PushEvent( this , GraphExecutor::ResumedExecutingEvent , @@ -1502,7 +1581,7 @@ int GraphExecutor::InNode::Executing_KillAction() { cdebug << "Executing_KillAction would pthread_canceled itself" << endl ; KillAction() ; _OutNode->PushEvent( this , GraphExecutor::KilledExecutingEvent , - SUPERV::KilledExecutingState ) ; + GraphExecutor::KilledExecutingState ) ; RetVal = 1 ; } else if ( pthread_cancel( ThreadNo() ) ) { @@ -1514,7 +1593,7 @@ int GraphExecutor::InNode::Executing_KillAction() { KillAction() ; _OutNode->ExitThread() ; _OutNode->PushEvent( this , GraphExecutor::KilledExecutingEvent , - SUPERV::KilledExecutingState ) ; + GraphExecutor::KilledExecutingState ) ; } return RetVal ; } @@ -1531,7 +1610,7 @@ int GraphExecutor::InNode::Executing_StopAction() { StopAction() ; _OutNode->ExitThread() ; _OutNode->PushEvent( this , GraphExecutor::StoppedExecutingEvent , - SUPERV::StoppedExecutingState ) ; + GraphExecutor::StoppedExecutingState ) ; } return RetVal ; } @@ -1539,7 +1618,7 @@ int GraphExecutor::InNode::Executing_StopAction() { int GraphExecutor::InNode::Executing_SuccessAction() { // cdebug << ThreadNo() << " --> Executing_SuccessAction " << Name() << endl; _OutNode->PushEvent( this , GraphExecutor::SuccessedExecutingEvent , - SUPERV::SuccessedState ) ; + GraphExecutor::SuccessedState ) ; SUPERV::ControlState aControl = ControlState() ; switch ( aControl ) { case SUPERV::VoidState : { @@ -1580,7 +1659,7 @@ int GraphExecutor::InNode::Executing_SuccessAction() { int GraphExecutor::InNode::Executing_ErrorAction() { cdebug << ThreadNo() << " --> Executing_ErrorAction " << Name() << endl; _OutNode->PushEvent( this , GraphExecutor::ErroredExecutingEvent , - SUPERV::ErroredState ) ; + GraphExecutor::ErroredState ) ; SUPERV::ControlState aControl = ControlState() ; switch ( aControl ) { @@ -1624,7 +1703,7 @@ void GraphExecutor::InNode::SetWaitingStates(GraphExecutor::InNode * EndNode ) { int i ; int j ; bool docdebug = false ; - State( SUPERV::DataWaitingState ) ; + State( GraphExecutor::DataWaitingState ) ; for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) { GraphBase::InPort * anInPort = GetChangeNodeInPort( i ) ; if ( anInPort->IsGate() ) { // Loop : Open the doors @@ -1638,8 +1717,8 @@ void GraphExecutor::InNode::SetWaitingStates(GraphExecutor::InNode * EndNode ) { } else if ( anInPort->State() != SUPERV::WaitingState ) { if ( !docdebug ) { -// cdebug << ThreadNo() -// << " --> GraphExecutor::InNodeThreads::SetWaitingStates " << Name() << endl; + cdebug << ThreadNo() + << " --> GraphExecutor::InNodeThreads::SetWaitingStates " << Name() << endl; docdebug = true ; } if ( !anInPort->IsDataStream() ) { @@ -1654,12 +1733,14 @@ void GraphExecutor::InNode::SetWaitingStates(GraphExecutor::InNode * EndNode ) { !( IsEndLoopNode() && ( anOutPort->IsGate() || anOutPort->IsLoop() ) ) && !anOutPort->IsDataStream() && - !anOutPort->ChangeInPorts( j )->IsDataStream() ) { -// cdebug << ThreadNo() -// << " GraphExecutor::InNodeThreads::SetWaitingStates " -// << Name() << "( " << anOutPort->PortName() << " ) --> InPort " -// << anOutPort->ChangeInPorts( j )->PortName() << " from Node " -// << anOutPort->ChangeInPorts( j )->NodeName() << endl; + !anOutPort->ChangeInPorts( j )->IsDataStream() && + !anOutPort->ChangeInPorts( j )->IsExternConnected() ) { + cdebug << ThreadNo() + << " GraphExecutor::InNodeThreads::SetWaitingStates " + << Name() << "( " << anOutPort->PortName() << " " << anOutPort->PortStatus() << " ) --> InPort " + << anOutPort->ChangeInPorts( j )->PortName() << " " + << anOutPort->ChangeInPorts( j )->PortStatus() << " from Node " + << anOutPort->ChangeInPorts( j )->NodeName() << endl; GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) _OutNode->Graph()->GetChangeGraphNode( anOutPort->ChangeInPorts( j )->NodeName() )->GetInNode() ; if ( aNode != EndNode ) { aNode->SetWaitingStates( EndNode ) ; @@ -1670,7 +1751,7 @@ void GraphExecutor::InNode::SetWaitingStates(GraphExecutor::InNode * EndNode ) { } int GraphExecutor::InNode::Successed_SuccessAction() { -// cdebug << ThreadNo() << " --> Successed_SuccessAction " << Name() << endl; + cdebug << ThreadNo() << " --> Successed_SuccessAction " << Name() << endl; int res = 1; int linkednodesnumber = LinkedNodesSize() ; GraphExecutor::InNode *firstzeroNode = NULL ; @@ -1682,6 +1763,12 @@ int GraphExecutor::InNode::Successed_SuccessAction() { DoneAction() ; + if ( IsMacroNode() ) { + cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " LinkedNodes->SomeDataReady already done" + << endl ; + return 1; + } + if ( IsGOTONode() || ( IsEndLoopNode() && GetNodeInLoop()->GetOutPort()->BoolValue() ) ) { cdebug << ThreadNo() << " Successed_SuccessAction " << Name() @@ -1696,15 +1783,15 @@ int GraphExecutor::InNode::Successed_SuccessAction() { for ( i = 0 ; i < aGateOutPort->InPortsSize() ; i++ ) { const GraphBase::InPort * anInPort = aGateOutPort->InPorts( i ) ; GraphExecutor::InNode * aLabelNode = (GraphExecutor::InNode *) _OutNode->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ; -// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " will Loop to HeadNode " -// << aLabelNode->Name() << " from port " << anInPort->PortName() << endl ; + cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " will Loop to HeadNode " + << aLabelNode->Name() << " from port " << anInPort->PortName() << endl ; aLabelNode->SetWaitingStates( this ) ; for ( j = 0 ; j < aLabelNode->GetNodeInPortsSize() ; j++ ) { const GraphBase::InPort * anInPort = aLabelNode->GetNodeInPort( j ) ; if ( anInPort->GetOutPort() ) { -// cdebug << aLabelNode->Name() << "(" << anInPort->PortName() << ") value : " -// << anInPort->GetOutPort()->NodeName() << "(" << anInPort->GetOutPort()->PortName() << ")" -// << endl ; + cdebug << aLabelNode->Name() << "(" << anInPort->PortName() << ") value : " + << anInPort->GetOutPort()->NodeName() << "(" << anInPort->GetOutPort()->PortName() << ")" + << endl ; } } for ( j = 0 ; j < GetNodeOutPortsSize() ; j++ ) { @@ -1719,17 +1806,17 @@ int GraphExecutor::InNode::Successed_SuccessAction() { } if ( aBusParamChangeInPort ) { aBusParamChangeInPort->ChangeOutPort( aBusParamOutPort ) ; -// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " ChangeOutPort to HeadNode " -// << aLabelNode->Name() << "(" << aBusParamChangeInPort->PortName() << ") from port " -// << aBusParamOutPort->PortName() << endl ; + cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " ChangeOutPort to HeadNode " + << aLabelNode->Name() << "(" << aBusParamChangeInPort->PortName() << ") from port " + << aBusParamOutPort->PortName() << endl ; if ( !aLabelNode->IsLockedDataWait() ) { res = aLabelNode->SendSomeDataReady( Name() ) ; if ( res ) { if ( firsttoNode == NULL && aLabelNode->ThreadNo() == pthread_self() ) { firsttoNode = aLabelNode ; -// cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode " -// << aLabelNode->Name() << endl ; + cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode " + << aLabelNode->Name() << endl ; } else if ( firstzeroNode == NULL && aLabelNode->ThreadNo() == 0 ) { @@ -1737,33 +1824,33 @@ int GraphExecutor::InNode::Successed_SuccessAction() { } else { SomeDataNodes.push_back( aLabelNode ) ; -// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push " -// << aLabelNode->Name() << " " << SomeDataNodes.size() -// << endl ; + cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push " + << aLabelNode->Name() << " " << SomeDataNodes.size() + << endl ; } } } else { -// cdebug << ThreadNo() -// << " Successed_SuccessAction Loop to HeadNode " -// << aLabelNode->Name() << " with datas from " << Name() << "(" -// << aBusParamOutPort->PortName() << ") to port " -// << aBusParamChangeInPort->PortName() << endl; + cdebug << ThreadNo() + << " Successed_SuccessAction Loop to HeadNode " + << aLabelNode->Name() << " with datas from " << Name() << "(" + << aBusParamOutPort->PortName() << ") to port " + << aBusParamChangeInPort->PortName() << endl; } } else { -// cdebug << ThreadNo() << " ERROR in Successed_SuccessAction of " << Name() -// << " NO port " << aBusParamOutPort->PortName() << " in " -// << aLabelNode->Name() << endl; + cdebug << ThreadNo() << " ERROR in Successed_SuccessAction of " << Name() + << " NO port " << aBusParamOutPort->PortName() << " in " + << aLabelNode->Name() << endl; } } } for ( j = 0 ; j < aLabelNode->GetNodeInPortsSize() ; j++ ) { const GraphBase::InPort * anInPort = aLabelNode->GetNodeInPort( j ) ; if ( anInPort->GetOutPort() ) { -// cdebug << aLabelNode->Name() << "(" << anInPort->PortName() << ") value : " -// << anInPort->GetOutPort()->NodeName() << "(" << anInPort->GetOutPort()->PortName() << ")" -// << endl ; + cdebug << aLabelNode->Name() << "(" << anInPort->PortName() << ") value : " + << anInPort->GetOutPort()->NodeName() << "(" << anInPort->GetOutPort()->PortName() << ")" + << endl ; } } const GraphBase::InPort * aGateInPort = aLabelNode->GetNodeInGate() ; @@ -1777,8 +1864,8 @@ int GraphExecutor::InNode::Successed_SuccessAction() { if ( firsttoNode == NULL && aLabelNode->ThreadNo() == pthread_self() ) { firsttoNode = aLabelNode ; -// cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode " -// << aLabelNode->Name() << endl ; + cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode " + << aLabelNode->Name() << endl ; } else if ( firstzeroNode == NULL && aLabelNode->ThreadNo() == 0 ) { @@ -1786,9 +1873,9 @@ int GraphExecutor::InNode::Successed_SuccessAction() { } else { SomeDataNodes.push_back( aLabelNode ) ; -// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push " -// << aLabelNode->Name() << " " << SomeDataNodes.size() -// << endl ; + cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push " + << aLabelNode->Name() << " " << SomeDataNodes.size() + << endl ; } } } @@ -1802,22 +1889,26 @@ int GraphExecutor::InNode::Successed_SuccessAction() { } else { -// cdebug << ThreadNo() << " Successed_SuccessAction of " << Name() -// << " with " << LinkedNodesSize() << " linked nodes :" ; + cdebug << ThreadNo() << " Successed_SuccessAction of " << Name() + << " with " << LinkedNodesSize() << " linked nodes :" ; for ( i = 0 ; i < LinkedNodesSize() ; i++ ) { if ( LinkedNodes( i )->IsDataFlowNode() ) { linkednodesnumber -= 1 ; } -// cdebug << " " << LinkedNodes( i )->Name() ; + cdebug << " " << LinkedNodes( i )->Name() ; } -// cdebug << endl; + cdebug << endl; for ( i = 0 ; i < LinkedNodesSize() ; i++ ) { bool IgnoreForEndLoop = false ; GraphBase::ComputingNode * aComputingNode ; aComputingNode = (GraphBase::ComputingNode * ) LinkedNodes( i ) ; toNode = (GraphExecutor::InNode *) aComputingNode->GetInNode() ; -// cdebug << ThreadNo() << " Successed_SuccessAction of " << Name() -// << " [" << i << "] " << LinkedNodes( i )->Name() << endl ; + cdebug << ThreadNo() << " Successed_SuccessAction of " << Name() + << " [" << i << "] " << LinkedNodes( i )->Name() << " toNode " << toNode << " IgnoreForEndLoop " + << IgnoreForEndLoop ; + if ( toNode ) { + cdebug << " " << toNode->Kind() << endl ; + } if ( toNode && !toNode->IsDataFlowNode() ) { if ( IsComputingNode() && toNode->IsInLineNode() ) { GraphBase::InPort * toGateInPort = toNode->GetChangeNodeInGate() ; @@ -1869,13 +1960,15 @@ int GraphExecutor::InNode::Successed_SuccessAction() { toNode->GetChangeNodeInPort( j )->InitialOutPort() ; } } + cdebug << ThreadNo() << " Successed_SuccessAction " << toNode->Name() << "->SendSomeDataReady( " + << Name() << " )" << endl ; res = toNode->SendSomeDataReady( Name() ) ; if ( res ) { if ( firsttoNode == NULL && toNode->ThreadNo() == pthread_self() ) { firsttoNode = toNode ; -// cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode " -// << toNode->Name() << endl ; + cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode " + << toNode->Name() << endl ; } else if ( firstzeroNode == NULL && toNode->ThreadNo() == 0 ) { @@ -1883,8 +1976,8 @@ int GraphExecutor::InNode::Successed_SuccessAction() { } else { SomeDataNodes.push_back( toNode ) ; -// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push " -// << toNode->Name() << " " << SomeDataNodes.size() << endl ; + cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push " + << toNode->Name() << " " << SomeDataNodes.size() << endl ; } } } @@ -1893,14 +1986,18 @@ int GraphExecutor::InNode::Successed_SuccessAction() { if ( firsttoNode == NULL && firstzeroNode ) { firsttoNode = firstzeroNode ; -// cdebug << ThreadNo() -// << " Successed_SuccessAction firsttoNode = firstzeroNode " -// << endl ; + cdebug << ThreadNo() + << " Successed_SuccessAction firsttoNode = firstzeroNode " + << endl ; } else if ( firsttoNode && firstzeroNode ) { SomeDataNodes.push_back( firstzeroNode ) ; -// cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push firstzeroNode " -// << firstzeroNode->Name() << " " << SomeDataNodes.size() << endl ; + cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push firstzeroNode " + << firstzeroNode->Name() << " " << SomeDataNodes.size() << endl ; + } + else { + cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " firsttoNode " << firsttoNode + << " firstzeroNode " << firstzeroNode << endl ; } while ( SomeDataNodes.size() ) { @@ -1909,7 +2006,7 @@ int GraphExecutor::InNode::Successed_SuccessAction() { // cdebug << pthread_self() << "/" << ThreadNo() // << " Successed_SuccessAction pop " // << SomeDataNodes.size() << " " << aNode->Name() << endl ; - if ( aNode->State() == SUPERV::DataReadyState ) { + if ( aNode->State() == GraphExecutor::DataReadyState ) { aNode->CreateNewThreadIf( true ) ; aNode->UnLockDataWait() ; res = aNode->DataUndef_AllDataReadyAction() ; @@ -1927,13 +2024,13 @@ int GraphExecutor::InNode::Successed_SuccessAction() { // << SomeDataNodes.size() << " " << firsttoNode->Name() << endl ; firsttoNode->CreateNewThreadIf( false ) ; firsttoNode->RewindStack( RewindStack() ) ; - if ( firsttoNode->State() == SUPERV::SuccessedState ) { + if ( firsttoNode->State() == GraphExecutor::SuccessedState ) { // cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() // << " : " << firsttoNode->Name() << " " // << Automaton()->StateName( firsttoNode->State() ) // << " --> DataWaitingState for Thread " // << firsttoNode->ThreadNo() << endl ; - firsttoNode->State( SUPERV::DataWaitingState ) ; + firsttoNode->State( GraphExecutor::DataWaitingState ) ; } // pthread_t OldT = firsttoNode->ThreadNo() ; firsttoNode->ThreadNo( pthread_self() ) ; @@ -1947,7 +2044,7 @@ int GraphExecutor::InNode::Successed_SuccessAction() { // << " !firsttoNode->CreateNewThreadIf() " // << !firsttoNode->CreateNewThreadIf() // << " " << Automaton()->StateName( firsttoNode->State() ) ; - if ( firsttoNode->State() == SUPERV::DataReadyState ) { + if ( firsttoNode->State() == GraphExecutor::DataReadyState ) { cdebug << endl ; firsttoNode->UnLockDataWait() ; res = firsttoNode->DataUndef_AllDataReadyAction() ; @@ -1977,8 +2074,8 @@ int GraphExecutor::InNode::Successed_SuccessAction() { bool GraphExecutor::InNode::SendSomeDataReady( char * FromNodeName ) { bool RetVal = false ; if ( IsDataFlowNode() ) { -// cdebug << ThreadNo() << " ----> " << Name() -// << " send Result to graph " << Name() << endl; + cdebug << ThreadNo() << " ----> " << Name() + << " send Result to graph " << Name() << endl; } else { // cdebug << pthread_self() << "/" << ThreadNo() << " ----> " << FromNodeName @@ -1987,20 +2084,20 @@ bool GraphExecutor::InNode::SendSomeDataReady( char * FromNodeName ) { // << " CreateNewThreadIf() " << CreateNewThreadIf() // << " LockedDataWait " << IsLockedDataWait() << endl; #if 0 - cout << pthread_self() << "/" << ThreadNo() << " ----> " << FromNodeName + //cout << pthread_self() << "/" << ThreadNo() << " ----> " << FromNodeName << " send SomeDataReady to " << Name() << " " << Automaton()->StateName( State() ) << " CreateNewThreadIf() " << CreateNewThreadIf() << " LockedDataWait " << IsLockedDataWait() << endl; #endif - if ( State() == SUPERV::SuccessedState || - State() == SUPERV::SuspendedSuccessedState || - State() == SUPERV::SuspendedSuccessedToReStartState ) { + if ( State() == GraphExecutor::SuccessedState || + State() == GraphExecutor::SuspendedSuccessedState || + State() == GraphExecutor::SuspendedSuccessedToReStartState ) { // cdebug << ThreadNo() << " " << FromNodeName // << " : " << Name() << " " << Automaton()->StateName( State() ) // << " --> DataWaitingState for Thread " // << ThreadNo() << " " << endl ; - State( SUPERV::DataWaitingState ) ; + State( GraphExecutor::DataWaitingState ) ; } LockDataWait() ; DataFromNode( FromNodeName ) ; @@ -2024,7 +2121,7 @@ int GraphExecutor::InNode::Successed_SuspendAction() { << " Threads " << _OutNode->Threads() << " SuspendedThreads " << _OutNode->SuspendedThreads() << endl; _OutNode->PushEvent( this , GraphExecutor::SuspendedSuccessedEvent , - SUPERV::SuspendedSuccessedState ) ; + GraphExecutor::SuspendedSuccessedState ) ; DoneAction() ; GraphExecutor::InNode * aReStartNode = SuspendAction() ; cdebug << ThreadNo() << " Successed_SuspendAction Resumed " << Name() ; @@ -2045,7 +2142,7 @@ int GraphExecutor::InNode::Errored_SuspendAction() { << " Threads " << _OutNode->Threads() << " SuspendedThreads " << _OutNode->SuspendedThreads() << endl; _OutNode->PushEvent( this , GraphExecutor::SuspendedErroredEvent , - SUPERV::SuspendedErroredState ) ; + GraphExecutor::SuspendedErroredState ) ; DoneAction() ; GraphExecutor::InNode * aReStartNode = SuspendAction() ; cdebug << ThreadNo() << " Errored_SuspendAction Resumed " << Name() @@ -2064,7 +2161,7 @@ int GraphExecutor::InNode::SuspendedSuccessed_ResumeAction() { cdebug << ThreadNo() << " SuspendedSuccessed_ResumeAction " << Name() << endl; // ResumeAction() ; _OutNode->PushEvent( this , GraphExecutor::ResumedSuccessedEvent , - SUPERV::ResumedSuccessedState ) ; + GraphExecutor::ResumedSuccessedState ) ; SendEvent( ResumedSuccessedEvent ) ; return 1 ; } @@ -2073,7 +2170,7 @@ int GraphExecutor::InNode::SuspendedErrored_ResumeAction() { cdebug << ThreadNo() << " SuspendedErrored_ResumeAction " << Name() << endl; // ResumeAction() ; _OutNode->PushEvent( this , GraphExecutor::ResumedErroredEvent , - SUPERV::ResumedErroredState ) ; + GraphExecutor::ResumedErroredState ) ; SendEvent( ResumedErroredEvent ) ; return 1 ; } @@ -2081,7 +2178,7 @@ int GraphExecutor::InNode::SuspendedErrored_ResumeAction() { int GraphExecutor::InNode::Successed_KillAction() { KillAction() ; _OutNode->PushEvent( this , GraphExecutor::KilledEvent , - SUPERV::KilledSuccessedState ) ; + GraphExecutor::KilledSuccessedState ) ; cdebug << ThreadNo() << " Successed_KillAction " << Name() << endl; return 1 ; } @@ -2089,7 +2186,7 @@ int GraphExecutor::InNode::Successed_KillAction() { int GraphExecutor::InNode::Errored_KillAction() { KillAction() ; _OutNode->PushEvent( this , GraphExecutor::KilledEvent , - SUPERV::KilledErroredState ) ; + GraphExecutor::KilledErroredState ) ; cdebug << ThreadNo() << " Errored_KillAction " << Name() << endl; return 1 ; } @@ -2097,7 +2194,7 @@ int GraphExecutor::InNode::Errored_KillAction() { int GraphExecutor::InNode::Successed_StopAction() { StopAction() ; _OutNode->PushEvent( this , GraphExecutor::StoppedEvent , - SUPERV::StoppedSuccessedState ) ; + GraphExecutor::StoppedSuccessedState ) ; cdebug << ThreadNo() << " Successed_StopAction " << Name() << endl; return 1 ; } @@ -2105,7 +2202,7 @@ int GraphExecutor::InNode::Successed_StopAction() { int GraphExecutor::InNode::Errored_StopAction() { StopAction() ; _OutNode->PushEvent( this , GraphExecutor::StoppedEvent , - SUPERV::StoppedErroredState ) ; + GraphExecutor::StoppedErroredState ) ; cdebug << ThreadNo() << " Errored_StopAction " << Name() << endl; return 1 ; } @@ -2113,7 +2210,7 @@ int GraphExecutor::InNode::Errored_StopAction() { int GraphExecutor::InNode::SuspendedSuccessed_ReStartAction() { cdebug << ThreadNo() << " SuspendedSuccessed_ReStartAction " << Name() << endl; _OutNode->PushEvent( this , GraphExecutor::ReStartedEvent , - SUPERV::ReStartedState ) ; + GraphExecutor::ReStartedState ) ; int i ; for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) { GetChangeNodeInPort( i )->State( SUPERV::ReadyState ) ; @@ -2126,7 +2223,7 @@ int GraphExecutor::InNode::SuspendedSuccessed_ReStartAction() { int GraphExecutor::InNode::SuspendedErrored_ReStartAction() { cdebug << ThreadNo() << " SuspendedErrored_ReStartAction " << Name() << endl; _OutNode->PushEvent( this , GraphExecutor::ReStartedEvent , - SUPERV::ReStartedState ) ; + GraphExecutor::ReStartedState ) ; int i ; for ( i = 0 ; i < GetNodeInPortsSize() ; i++ ) { GetChangeNodeInPort( i )->State( SUPERV::ReadyState ) ; @@ -2140,8 +2237,8 @@ int GraphExecutor::InNode::SuspendedSuccessed_ReStartAndSuspendAction() { cdebug << ThreadNo() << " SuspendedSuccessed_ReStartAndSuspendAction " << Name() << endl; _OutNode->PushEvent( this , GraphExecutor::ReStartedAndSuspendEvent , - SUPERV::ReStartedState ) ; - State( SUPERV::DataWaitingState ) ; + GraphExecutor::ReStartedState ) ; + State( GraphExecutor::DataWaitingState ) ; if ( !Suspend() ) { cdebug << "InNode::Suspend() Node " << Name() << endl ; return false ; @@ -2160,8 +2257,8 @@ int GraphExecutor::InNode::SuspendedErrored_ReStartAndSuspendAction() { cdebug << ThreadNo() << " SuspendedErrored_ReStartAndSuspendAction " << Name() << endl; _OutNode->PushEvent( this , GraphExecutor::ReStartedAndSuspendEvent , - SUPERV::ReStartedState ) ; - State( SUPERV::DataWaitingState ) ; + GraphExecutor::ReStartedState ) ; + State( GraphExecutor::DataWaitingState ) ; if ( !Suspend() ) { cdebug << "InNode::Suspend() Node " << Name() << endl ; return false ; @@ -2571,7 +2668,9 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err , int i ; GraphBase::OutPort * aGateOutPort = NULL ; bool OrSwitch = false ; - if ( nOutParams ) { + cdebug << "OutParametersSet " << Name() << " nOutParams " << nOutParams << " NewState " << NewState << endl ; +// cout << "OutParametersSet " << Name() << " nOutParams " << nOutParams << " NewState " << NewState << endl ; + if ( nOutParams && !IsMacroNode() ) { GraphBase::OutPort * anOutPort ; for ( i = 0 ; i < nOutParams ; i++ ) { anOutPort = GetChangeNodeOutPort(i) ; @@ -2690,30 +2789,45 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err , int j ; for ( j = 0 ; j < anOutPort->InPortsSize() ; j++ ) { bool fromGOTO = false ; - GraphBase::OutPort * aGOTOPort = _OutNode->Graph()->GetChangeGraphNode( anOutPort->ChangeInPorts( j )->NodeName() )->GetChangeNodeInGate()->GetOutPort() ; - if ( aGOTOPort ) { - fromGOTO = aGOTOPort->IsGOTO() ; - } - if ( anOutPort->ChangeInPorts( j )->IsEndSwitch() || fromGOTO ) { - cdebug << anOutPort->ChangeInPorts( j )->NodeName() << "(" - << anOutPort->ChangeInPorts( j )->PortName() << "," - << anOutPort->ChangeInPorts( j )->Kind() << ") WILL BE changed from " - << anOutPort->ChangeInPorts( j )->GetOutPort()->NodeName() - << "(" - << anOutPort->ChangeInPorts( j )->GetOutPort()->PortName() - << ") to " << anOutPort->NodeName() << "(" - << anOutPort->PortName() << ")" << endl ; - anOutPort->ChangeInPorts( j )->ChangeOutPort( anOutPort ) ; - } + const char * ToNodeName = anOutPort->ChangeInPorts( j )->NodeName() ; + if ( !strcmp( ToNodeName , _OutNode->Graph()->Name() ) && _OutNode->Graph()->GraphMacroLevel() != 0 ) { + cdebug << "OutParametersSet ToNodeName " << _OutNode->Graph()->CoupledNode() + << " GraphExecutor " << _OutNode->Graph()->CoupledNode()->GraphExecutor() << endl ; + _OutNode->Graph()->CoupledNode()->GraphExecutor()->OutputOfAny( _OutNode->Graph()->CoupledNodeName() , + anOutPort->ChangeInPorts( j )->PortName() , + *anOutPort->Value() ) ; + } else { - cdebug << anOutPort->ChangeInPorts( j )->NodeName() << "(" - << anOutPort->ChangeInPorts( j )->PortName() << "," - << anOutPort->ChangeInPorts( j )->Kind() << ") NOT changed from " - << anOutPort->ChangeInPorts( j )->GetOutPort()->NodeName() - << "(" - << anOutPort->ChangeInPorts( j )->GetOutPort()->PortName() - << ") to " << anOutPort->NodeName() << "(" - << anOutPort->PortName() << ")" << endl ; + GraphBase::ComputingNode * ToNode = _OutNode->Graph()->GetChangeGraphNode( ToNodeName ) ; + if ( ToNode ) { +// cout << "OutParametersSet ToNodeName " << ToNodeName << endl ; + cdebug << "OutParametersSet ToNodeName " << ToNodeName << " " << ToNode->Name() << endl ; + GraphBase::OutPort * aGOTOPort = ToNode->GetChangeNodeInGate()->GetOutPort() ; + if ( aGOTOPort ) { + fromGOTO = aGOTOPort->IsGOTO() ; + } + if ( anOutPort->ChangeInPorts( j )->IsEndSwitch() || fromGOTO ) { + cdebug << anOutPort->ChangeInPorts( j )->NodeName() << "(" + << anOutPort->ChangeInPorts( j )->PortName() << "," + << anOutPort->ChangeInPorts( j )->Kind() << ") WILL BE changed from " + << anOutPort->ChangeInPorts( j )->GetOutPort()->NodeName() + << "(" + << anOutPort->ChangeInPorts( j )->GetOutPort()->PortName() + << ") to " << anOutPort->NodeName() << "(" + << anOutPort->PortName() << ")" << endl ; + anOutPort->ChangeInPorts( j )->ChangeOutPort( anOutPort ) ; + } + else { + cdebug << anOutPort->ChangeInPorts( j )->NodeName() << "(" + << anOutPort->ChangeInPorts( j )->PortName() << "," + << anOutPort->ChangeInPorts( j )->Kind() << ") NOT changed from " + << anOutPort->ChangeInPorts( j )->GetOutPort()->NodeName() + << "(" + << anOutPort->ChangeInPorts( j )->GetOutPort()->PortName() + << ") to " << anOutPort->NodeName() << "(" + << anOutPort->PortName() << ")" << endl ; + } + } } } //#if 0 diff --git a/src/GraphExecutor/DataFlowExecutor_OutNode.cxx b/src/GraphExecutor/DataFlowExecutor_OutNode.cxx index d8031a4..26b81bf 100644 --- a/src/GraphExecutor/DataFlowExecutor_OutNode.cxx +++ b/src/GraphExecutor/DataFlowExecutor_OutNode.cxx @@ -46,7 +46,7 @@ GraphExecutor::OutNode::OutNode() { _Done = false ; _Threads = 0 ; _ControlState = SUPERV::VoidState ; - _State = SUPERV::UnKnownState ; + _State = GraphExecutor::UnKnownState ; _PyInitialized = false ; pthread_mutex_init( &_MutexWait , NULL ) ; pthread_mutex_init( &_PyMutexWait , NULL ) ; @@ -71,12 +71,12 @@ GraphExecutor::OutNode::OutNode( CORBA::ORB_ptr ORB, if ( aKindOfNode == SUPERV::DataFlowGraph ) { _StreamGraph = NULL ; // _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ; - _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , + _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowName , aKindOfNode , _prof_debug , _fdebug ) ; } else if ( aKindOfNode == SUPERV::DataStreamGraph ) { // _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , DebugFileName ) ;; - _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , + _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowName , aKindOfNode , _prof_debug , _fdebug ) ; _Graph = _StreamGraph ; } @@ -85,7 +85,7 @@ GraphExecutor::OutNode::OutNode( CORBA::ORB_ptr ORB, _Done = false ; _Threads = 0 ; _ControlState = SUPERV::VoidState ; - _State = SUPERV::UnKnownState ; + _State = GraphExecutor::UnKnownState ; _PyInitialized = false ; _Orb = CORBA::ORB::_duplicate( ORB ) ; pthread_mutex_init( &_MutexWait , NULL ) ; @@ -101,46 +101,45 @@ GraphExecutor::OutNode::OutNode( CORBA::ORB_ptr ORB, cdebug_out << "GraphEditor::OutNode::OutNode" << endl; } -GraphExecutor::OutNode::OutNode( - CORBA::ORB_ptr ORB, - SALOME_NamingService* ptrNamingService , - const SALOME_ModuleCatalog::Service& DataFlowService , - const char *DataFlowComponentName , - const char *DataFlowInterfaceName , - const char *DataFlowName , - const SUPERV::KindOfNode DataFlowkind , - const SUPERV::SDate DataFlowFirstCreation , - const SUPERV::SDate DataFlowLastModification , - const char * DataFlowEditorRelease , - const char * DataFlowAuthor , - const char * DataFlowComputer , - const char * DataFlowComment , - const char * DebugFileName ) { -// Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName , -// DataFlowInterfaceName , DataFlowName , DataFlowkind , -// DataFlowFirstCreation , DataFlowLastModification , -// DataFlowEditorRelease , DataFlowAuthor , -// DataFlowComputer , DataFlowComment , DebugFileName ) { +GraphExecutor::OutNode::OutNode( CORBA::ORB_ptr ORB, + SALOME_NamingService* ptrNamingService , + const SALOME_ModuleCatalog::Service& DataFlowService , + const char *DataFlowComponentName , + const char *DataFlowInterfaceName , + const char *DataFlowName , + const SUPERV::KindOfNode DataFlowkind , + const SUPERV::SDate DataFlowFirstCreation , + const SUPERV::SDate DataFlowLastModification , + const char * DataFlowEditorRelease , + const char * DataFlowAuthor , + const char * DataFlowComputer , + const char * DataFlowComment , + const char * DebugFileName ) { +// Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName , +// DataFlowInterfaceName , DataFlowName , DataFlowkind , +// DataFlowFirstCreation , DataFlowLastModification , +// DataFlowEditorRelease , DataFlowAuthor , +// DataFlowComputer , DataFlowComment , DebugFileName ) { Set_prof_debug( ORB , DebugFileName ) ; cdebug_in << "GraphEditor::OutNode::OutNode(" << DataFlowName << " , " << DataFlowkind << ")" << endl; if ( DataFlowkind == SUPERV::DataFlowGraph ) { _StreamGraph = NULL ; _Graph = new GraphBase::Graph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName , - DataFlowInterfaceName , DataFlowName , DataFlowkind , - DataFlowFirstCreation , DataFlowLastModification , - DataFlowEditorRelease , DataFlowAuthor , - DataFlowComputer , DataFlowComment , - _prof_debug , _fdebug ) ; -// DataFlowComputer , DataFlowComment , DebugFileName ) ; + DataFlowInterfaceName , DataFlowName , DataFlowkind , + DataFlowFirstCreation , DataFlowLastModification , + DataFlowEditorRelease , DataFlowAuthor , + DataFlowComputer , DataFlowComment , + _prof_debug , _fdebug ) ; +// DataFlowComputer , DataFlowComment , DebugFileName ) ; } else if ( DataFlowkind == SUPERV::DataStreamGraph ) { _StreamGraph = new GraphBase::StreamGraph( ORB , ptrNamingService , DataFlowService , DataFlowComponentName , - DataFlowInterfaceName , DataFlowName , DataFlowkind , - DataFlowFirstCreation , DataFlowLastModification , - DataFlowEditorRelease , DataFlowAuthor , - DataFlowComputer , DataFlowComment , - _prof_debug , _fdebug ) ; + DataFlowInterfaceName , DataFlowName , DataFlowkind , + DataFlowFirstCreation , DataFlowLastModification , + DataFlowEditorRelease , DataFlowAuthor , + DataFlowComputer , DataFlowComment , + _prof_debug , _fdebug ) ; _Graph = _StreamGraph ; } _Valid = false ; @@ -148,7 +147,7 @@ GraphExecutor::OutNode::OutNode( _Done = false ; _Threads = 0 ; _ControlState = SUPERV::VoidState ; - _State = SUPERV::UnKnownState ; + _State = GraphExecutor::UnKnownState ; _PyInitialized = false ; _Orb = CORBA::ORB::_duplicate( ORB ) ; pthread_mutex_init( &_MutexWait , NULL ) ; @@ -176,18 +175,19 @@ void GraphExecutor::OutNode::Set_prof_debug( CORBA::ORB_ptr ORB , } } -bool GraphExecutor::OutNode::LoadDataFlow(const GraphBase::SGraph &aDataFlow ) { +bool GraphExecutor::OutNode::LoadDataFlow(const GraphBase::SGraph * aDataFlow ) { bool RetVal = false ; - RetVal = LoadInfo( aDataFlow.Info ) ; + cdebug_in << "GraphExecutor::OutNode::LoadDataFlow " << (*aDataFlow).Info.theName << endl ; + RetVal = LoadInfo( (*aDataFlow).Info ) ; if ( Graph()->ServiceName() != NULL ) { // MESSAGE( "GraphExecutor::OutNode::LoadDataFlow" ); if ( RetVal ) { - RetVal = LoadNodes( aDataFlow.Nodes ) ; + RetVal = LoadNodes( (*aDataFlow).Nodes ) ; if ( RetVal ) { - RetVal = LoadLinks( aDataFlow.Links ) ; + RetVal = LoadLinks( (*aDataFlow).Links ) ; if ( RetVal ) { IsValid() ; - RetVal = LoadDatas( aDataFlow.Datas ) ; + RetVal = LoadDatas( (*aDataFlow).Datas ) ; IsExecutable() ; if ( !RetVal) { cdebug << "GraphExecutor::OutNode::LoadDataFlow LoadDatas Error." @@ -212,26 +212,29 @@ bool GraphExecutor::OutNode::LoadDataFlow(const GraphBase::SGraph &aDataFlow ) { else { cdebug << "GraphExecutor::OutNode::LoadDataFlow ServiceName Error." << endl ; } + cdebug_in << "GraphExecutor::OutNode::LoadDataFlow " << RetVal << endl ; return RetVal ; } +#if 0 bool GraphExecutor::OutNode::LoadXml( const char* myFileName ) { bool RetVal = false ; - GraphBase::SGraph aDataFlow ; - if ( Graph()->LoadXml( _Orb , myFileName , aDataFlow ) ) { - RetVal = LoadDataFlow( aDataFlow ) ; + GraphBase::ListOfSGraphs aListOfDataFlows ; + if ( Graph()->LoadXml( _Orb , myFileName , aListOfDataFlows ) ) { + RetVal = LoadDataFlow( aListOfDataFlows ) ; // if ( aConstructor && RetVal ) // RetVal = Name( aDataFlow.Info.theName.c_str() ) ; } return RetVal ; -} +} +#endif bool GraphExecutor::OutNode::LoadInfo(const GraphBase::SNode &aDataFlowInfo ) { cdebug << "GraphExecutor::OutNode::LoadInfo _StreamGraph " << _StreamGraph << endl ; // ComponentName( aDataFlowInfo.theComponentName.c_str() ) ; Graph()->Name( aDataFlowInfo.theName.c_str() ) ; Graph()->Kind( aDataFlowInfo.theKind ) ; - if ( Graph()->IsDataStreamNode() ) { + if ( Graph()->IsDataStreamNode() && aDataFlowInfo.theKind == SUPERV::DataStreamGraph ) { StreamGraph()->SetStreamParams( aDataFlowInfo.theTimeout , aDataFlowInfo.theDataStreamTrace , aDataFlowInfo.theDeltaTime ) ; } Graph()->DataService( _Orb , aDataFlowInfo.theService , _prof_debug , _fdebug ) ; @@ -246,7 +249,7 @@ bool GraphExecutor::OutNode::LoadInfo(const GraphBase::SNode &aDataFlowInfo ) { return true ; } -bool GraphExecutor::OutNode::LoadNodes(const GraphBase::ListOfNodes &aListOfNodes ) { +bool GraphExecutor::OutNode::LoadNodes(const GraphBase::ListOfSNodes &aListOfNodes ) { bool RetVal = true ; GraphExecutor::InNode * anInNode ; cdebug << "GraphExecutor::OutNode::LoadNodes" << endl ; @@ -268,7 +271,7 @@ bool GraphExecutor::OutNode::LoadNodes(const GraphBase::ListOfNodes &aListOfNode RetVal = false ; break ; } - if ( anInNode->IsOneOfInLineNodes() ) { + if ( anInNode->IsOneOfInLineNodes() || anInNode->IsMacroNode() ) { anInNode->GraphExecutor::InNode::InLineNode()->DefPortsOfNode( _Orb , aNode.theService , anInNode->NamePtr() , anInNode->Kind() , @@ -335,13 +338,21 @@ bool GraphExecutor::OutNode::LoadNodes(const GraphBase::ListOfNodes &aListOfNode if ( anInNode->IsOneOfGOTONodes() && strlen( aNode.theCoupledNode.c_str() ) ) { GraphBase::GOTONode * aCoupledNode ; aCoupledNode = (GraphBase::GOTONode * ) Graph()->GetGraphNode( aNode.theName.c_str() ) ; - aCoupledNode->CoupledNode( (GraphBase::GOTONode * ) Graph()->GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ) ; + GraphBase::GOTONode * aCoupledCoupledNode ; + aCoupledCoupledNode = (GraphBase::GOTONode * ) Graph()->GetChangeGraphNode( aNode.theCoupledNode.c_str() ) ; + if ( aCoupledCoupledNode != NULL ) { + aCoupledNode->CoupledNode( aCoupledCoupledNode ) ; + } + else { + aCoupledNode->CoupledNodeName( aNode.theCoupledNode.c_str() ) ; + } + aCoupledNode->SetGraphExecutor( (GraphExecutor::DataFlow * ) this ) ; } } return RetVal ; } -bool GraphExecutor::OutNode::LoadLinks(const GraphBase::ListOfLinks &aListOfLinks ) { +bool GraphExecutor::OutNode::LoadLinks(const GraphBase::ListOfSLinks &aListOfLinks ) { bool RetVal = true ; cdebug << "GraphExecutor::OutNode::LoadLinks " << aListOfLinks.size() << endl ; @@ -351,16 +362,15 @@ bool GraphExecutor::OutNode::LoadLinks(const GraphBase::ListOfLinks &aListOfLink RetVal = Graph()->AddLink( aLink.FromNodeName.c_str() , aLink.FromServiceParameterName.c_str() , aLink.ToNodeName.c_str() , - aLink.ToServiceParameterName.c_str() , - aLink.aLinkValue ) ; -// aLink.aLinkValue.Value , aLink.aLinkValue.Kind ) ; + aLink.ToServiceParameterName.c_str() ) ; +// , aLink.aLinkValue ) ; if ( !RetVal ) break ; } return RetVal ; } -bool GraphExecutor::OutNode::LoadDatas(const GraphBase::ListOfLinks &aListOfDatas ) { +bool GraphExecutor::OutNode::LoadDatas(const GraphBase::ListOfSLinks &aListOfDatas ) { bool RetVal = true ; cdebug << "GraphExecutor::OutNode::LoadDatas " << aListOfDatas.size() << endl ; @@ -371,15 +381,11 @@ bool GraphExecutor::OutNode::LoadDatas(const GraphBase::ListOfLinks &aListOfData RetVal = Graph()->AddInputData( aLink.ToNodeName.c_str() , aLink.ToServiceParameterName.c_str() , aLink.aLinkValue ) ; -// aLink.aLinkValue.Value , aLink.aLinkValue.Kind ) ; - else if ( !strcmp( aLink.ToNodeName.c_str() , Graph()->Name() ) ) { - RetVal = Graph()->AddOutputData( aLink.FromNodeName.c_str() , - aLink.FromServiceParameterName.c_str() , - aLink.aLinkValue ) ; -// aLink.aLinkValue.Value , -// aLink.aLinkValue.Kind ) ; - Graph()->AddLink( aLink.FromNodeName.c_str() , (GraphBase::ComputingNode *) this ) ; - } +// else if ( !strcmp( aLink.ToNodeName.c_str() , Graph()->Name() ) ) { +// RetVal = Graph()->AddOutputData( aLink.FromNodeName.c_str() , +// aLink.FromServiceParameterName.c_str() ) ; +// Graph()->AddLink( aLink.FromNodeName.c_str() , (GraphBase::ComputingNode *) this ) ; +// } else { cdebug << "GraphExecutor::OutNode::LoadDatas Error " << aLink.FromNodeName << " and " << aLink.ToNodeName << " differents from " << Graph()->Name() @@ -425,20 +431,6 @@ GraphExecutor::InNode *GraphExecutor::OutNode::AddNode( } -bool GraphExecutor::OutNode::AddInputData( const char* ToNodeName1 , - const char* ToParameterName1 , - const char* ToNodeName2 , - const char* ToParameterName2 ) { - cdebug_in << "GraphExecutor::OutNode::AddInputData" << endl; - bool RetVal = Graph()->AddInputData( ToNodeName1 , - ToParameterName1 , - ToNodeName2 , - ToParameterName2 ) ; - cdebug_out << "GraphExecutor::OutNode::AddInputData" << endl; - _Valid = false ; - return RetVal ; -} - bool GraphExecutor::OutNode::Valid() { cdebug_in << "GraphExecutor::OutNode::Valid" << endl; @@ -486,7 +478,7 @@ bool GraphExecutor::OutNode::Executable() { _Executable = false ; } - cdebug_out << "GraphExecutor::OutNode::Executable" << endl; + cdebug_out << "GraphExecutor::OutNode::Executable " << _Executable << endl; return _Executable ; } @@ -521,8 +513,8 @@ bool GraphExecutor::OutNode::Run( const bool AndSuspend ) { GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) Graph()->GraphNodes( i )->GetInNode() ; if ( anInNode->IsOneOfInLineNodes() ) { if ( !anInNode->InitPythonFunctions( true ) ) { - anInNode->State( SUPERV::ErroredState ) ; - State( SUPERV::ErroredState ) ; + anInNode->State( GraphExecutor::ErroredState ) ; + State( GraphExecutor::ErroredState ) ; cdebug_out << "GraphExecutor::OutNode::Run InitPythonFunctions ERROR " << anInNode->Name() << endl ; return false ; @@ -530,69 +522,105 @@ bool GraphExecutor::OutNode::Run( const bool AndSuspend ) { } } - cdebug << "Execution starting GraphExecutor::Action_DataOk_RunService Node " - << Graph()->Name() << endl ; - - PushEvent( NULL , GraphExecutor::ReadyEvent , - SUPERV::DataReadyState ) ; - State( SUPERV::DataReadyState ) ; - - for ( i = 0 ; i < Graph()->HeadNodesSize() ; i++ ) { - GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) Graph()->HeadNodes( i )->GetInNode() ; - if ( anInNode->State() != SUPERV::DataReadyState ) { - cdebug << "GraphExecutor::OutNode::Run inconsistency State of Node " - << anInNode->Name() << " : " << anInNode->State() << endl ; - cdebug_out << "GraphExecutor::OutNode::Run State ERROR" << endl ; - return false ; + for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { + GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) Graph()->GraphNodes( i )->GetInNode() ; + if ( anInNode->IsMacroNode() ) { + GraphBase::Graph * aMacroGraph = anInNode->GraphMacroNode() ; + cdebug << "GraphExecutor::OutNode::Run " << anInNode << " MacroNode " << aMacroGraph + << aMacroGraph->Name() << endl ; + SUPERV::Graph_var iobject = anInNode->GraphMacroNode()->MacroObject() ; + if ( CORBA::is_nil( iobject ) ) { + cdebug << "MacroObject() is a nil object. Error" << endl ; + } + else { + cdebug << "MacroObject() is NOT a nil object." << endl ; + } } -// PushEvent( anInNode , GraphExecutor::ReadyEvent , -// SUPERV::DataReadyState ) ; - anInNode->CreateNewThread( true ) ; - anInNode->DataFromNode( Graph()->Name() ) ; - if ( AndSuspend ) { - anInNode->State( SUPERV::DataWaitingState ) ; - anInNode->ControlState( SUPERV::ToSuspendStartState ) ; - if ( !anInNode->SendEvent( GraphExecutor::SomeDataReadyEvent ) ) { - cdebug << "InNode::SendEvent( SomeDataReadyEvent ) ERROR Node " - << anInNode->Name() << endl ; - cdebug_out << "GraphExecutor::OutNode::Run SendEvent ERROR" << endl ; + } + + if ( Graph()->GraphMacroLevel() != 0 ) { + cdebug << "Execution starting GraphExecutor::Action_DataOk_RunService Node " + << Graph()->Name() << " GraphMacroLevel " << Graph()->GraphMacroLevel() << endl ; + PushEvent( NULL , GraphExecutor::NoDataReadyEvent , + GraphExecutor::DataUndefState ) ; + } + else { + cdebug << "Execution starting GraphExecutor::Action_DataOk_RunService Node " + << Graph()->Name() << " GraphMacroLevel " << Graph()->GraphMacroLevel() << endl ; + PushEvent( NULL , GraphExecutor::ReadyEvent , + GraphExecutor::DataReadyState ) ; + State( GraphExecutor::DataReadyState ) ; + + cdebug << pthread_self() << " GraphExecutor::OutNode::Run Start of the " << Graph()->HeadNodesSize() + << " HeadNodes" << endl ; + for ( i = 0 ; i < Graph()->HeadNodesSize() ; i++ ) { + GraphExecutor::InNode * anInNode = (GraphExecutor::InNode *) Graph()->HeadNodes( i )->GetInNode() ; + cdebug << pthread_self() << "GraphExecutor::OutNode::Run Start of HeadNode " << i << " " + << anInNode->Name() << endl ; + if ( anInNode->State() != GraphExecutor::DataReadyState ) { + cdebug << "GraphExecutor::OutNode::Run inconsistency State of Node " + << anInNode->Name() << " : " << anInNode->State() << endl ; + cdebug_out << "GraphExecutor::OutNode::Run State ERROR" << endl ; return false ; } - anInNode->SuspendedWait() ; +// PushEvent( anInNode , GraphExecutor::ReadyEvent , +// GraphExecutor::DataReadyState ) ; + anInNode->CreateNewThread( true ) ; + anInNode->DataFromNode( Graph()->Name() ) ; + if ( AndSuspend ) { + anInNode->State( GraphExecutor::DataWaitingState ) ; + anInNode->ControlState( SUPERV::ToSuspendStartState ) ; + if ( !anInNode->SendEvent( GraphExecutor::SomeDataReadyEvent ) ) { + cdebug << "InNode::SendEvent( SomeDataReadyEvent ) ERROR Node " + << anInNode->Name() << endl ; + cdebug_out << "GraphExecutor::OutNode::Run SendEvent ERROR" << endl ; + return false ; + } + anInNode->SuspendedWait() ; + } + else if ( anInNode->IsMacroNode() ) { + if ( !anInNode->SendEvent( GraphExecutor::SomeDataReadyEvent ) ) { + cdebug << "InNode::SendEvent( SomeDataReadyEvent ) ERROR Node " + << anInNode->Name() << endl ; + cdebug_out << "GraphExecutor::OutNode::Run SendEvent ERROR" << endl ; + return false ; + } + cdebug << pthread_self() << " GraphExecutor::OutNode::Run " << anInNode->Name() << "->RunningWait" + << endl ; + anInNode->RunningWait() ; + cdebug << pthread_self() << " GraphExecutor::OutNode::Run " << anInNode->Name() << "->RunningWaited" + << endl ; + } + else if ( !anInNode->IsMacroNode() ) { + if ( !anInNode->SendEvent( GraphExecutor::ExecuteEvent ) ) { + cdebug << "InNode::SendEvent( ExecuteEvent ) ERROR Node " + << anInNode->Name() << endl ; + cdebug_out << "GraphExecutor::OutNode::Run SendEvent ERROR" << endl ; + return false ; + } + anInNode->RunningWait() ; + } } - else if ( !anInNode->SendEvent( GraphExecutor::ExecuteEvent ) ) { - cdebug << "InNode::SendEvent( ExecuteEvent ) ERROR Node " - << anInNode->Name() << endl ; - cdebug_out << "GraphExecutor::OutNode::Run SendEvent ERROR" << endl ; - return false ; + + if ( AndSuspend ) { + PushEvent( NULL , GraphExecutor::SuspendedReadyEvent , + GraphExecutor::SuspendedReadyState ) ; } else { - anInNode->RunningWait() ; + PushEvent( NULL , GraphExecutor::ExecutingEvent , + GraphExecutor::ExecutingState ) ; + if (AutomatonState() == GraphExecutor::DataReadyState) { + State( GraphExecutor::ExecutingState ) ; + }; } +// ostringstream astr ; +// astr << "Graph " << Graph()->Name() << " is running" ; +// Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ; + RetVal = true ; } - - if ( AndSuspend ) { - PushEvent( NULL , GraphExecutor::SuspendedReadyEvent , - SUPERV::SuspendedReadyState ) ; - } - else { - PushEvent( NULL , GraphExecutor::ExecutingEvent , - SUPERV::ExecutingState ) ; - if (AutomatonState() == SUPERV::DataReadyState) { - State( SUPERV::ExecutingState ) ; - }; - } -// ostringstream astr ; -// astr << "Graph " << Graph()->Name() << " is running" ; -// Graph()->ObjImpl()->sendMessage( NOTIF_STEP, astr.str().c_str() ) ; - RetVal = true ; - } - else { - PushEvent( NULL , GraphExecutor::NoDataReadyEvent , - SUPERV::DataUndefState ) ; } - cdebug_out << "GraphExecutor::OutNode::Run" << endl ; + cdebug_out << "GraphExecutor::OutNode::Run GraphMacroLevel " << Graph()->GraphMacroLevel() << endl ; return RetVal ; } @@ -613,8 +641,8 @@ bool GraphExecutor::OutNode::Run( const char * aNodeName , void GraphExecutor::OutNode::CheckAllDone() { int j ; cdebug_in << "GraphExecutor::OutNode::CheckAllDone " << endl; - SUPERV::AutomatonState OutNodeState = SUPERV::SuccessedState ; - SUPERV::AutomatonState InNodeState ; + GraphExecutor::AutomatonState OutNodeState = GraphExecutor::SuccessedState ; + GraphExecutor::AutomatonState InNodeState ; bool AllDone = true ; if ( !Done() ) { for ( j = 0 ; j < Graph()->QueueNodesSize() ; j++ ) { @@ -622,21 +650,21 @@ void GraphExecutor::OutNode::CheckAllDone() { cdebug << j << ". " << ( (GraphExecutor::InNode * ) Graph()->QueueNodes( j )->GetInNode() )->Name() << " " << theAutomaton->StateName( InNodeState ) << endl ; - if ( InNodeState != SUPERV::SuccessedState && - InNodeState != SUPERV::ErroredState && - InNodeState != SUPERV::DataWaitingState ) { + if ( InNodeState != GraphExecutor::SuccessedState && + InNodeState != GraphExecutor::ErroredState && + InNodeState != GraphExecutor::DataWaitingState ) { AllDone = false ; } - if ( InNodeState != SUPERV::SuccessedState && - InNodeState != SUPERV::DataWaitingState && - InNodeState != SUPERV::DataReadyState ) { + if ( InNodeState != GraphExecutor::SuccessedState && + InNodeState != GraphExecutor::DataWaitingState && + InNodeState != GraphExecutor::DataReadyState ) { OutNodeState = InNodeState ; } } if ( AllDone ) { if( _Threads == 0 && _SuspendedThreads == 0 ) { - if ( OutNodeState != SUPERV::ErroredState ) { - OutNodeState = SUPERV::SuccessedState ; + if ( OutNodeState != GraphExecutor::ErroredState ) { + OutNodeState = GraphExecutor::SuccessedState ; } } else { @@ -821,7 +849,7 @@ void GraphExecutor::OutNode::SuspendThread() { exit( 0 ) ; } if ( IsSuspended() ) { - PushEvent( NULL , GraphExecutor::SuspendEvent , SUPERV::SuspendedState ) ; + PushEvent( NULL , GraphExecutor::SuspendEvent , GraphExecutor::SuspendedState ) ; } } void GraphExecutor::OutNode::ResumeThread() { @@ -1004,126 +1032,126 @@ SUPERV::GraphEvent GraphExecutor::OutNode::AutomatonGraphEvent(GraphExecutor::No return aGraphEvent ; } -SUPERV::GraphState GraphExecutor::OutNode::AutomatonGraphState(SUPERV::AutomatonState aState ) { +SUPERV::GraphState GraphExecutor::OutNode::AutomatonGraphState(GraphExecutor::AutomatonState aState ) { SUPERV::GraphState aGraphState ; switch ( aState ) { - case SUPERV::UnKnownState : { + case GraphExecutor::UnKnownState : { aGraphState = SUPERV::UndefinedState ; break ; } - case SUPERV::DataUndefState : { + case GraphExecutor::DataUndefState : { aGraphState = SUPERV::UndefinedState ; break ; } - case SUPERV::DataWaitingState : { + case GraphExecutor::DataWaitingState : { aGraphState = SUPERV::WaitingState ; break ; } - case SUPERV::DataReadyState : { + case GraphExecutor::DataReadyState : { aGraphState = SUPERV::ReadyState ; break ; } - case SUPERV::SuspendedReadyState : { + case GraphExecutor::SuspendedReadyState : { aGraphState = SUPERV::SuspendReadyState ; break ; } - case SUPERV::ResumedReadyState : { + case GraphExecutor::ResumedReadyState : { aGraphState = SUPERV::ReadyState ; break ; } - case SUPERV::KilledReadyState : { + case GraphExecutor::KilledReadyState : { aGraphState = SUPERV::KillState ; break ; } - case SUPERV::StoppedReadyState : { + case GraphExecutor::StoppedReadyState : { aGraphState = SUPERV::StopState ; break ; } - case SUPERV::ExecutingState : { + case GraphExecutor::ExecutingState : { aGraphState = SUPERV::RunningState ; break ; } - case SUPERV::SuspendedExecutingState : { + case GraphExecutor::SuspendedExecutingState : { aGraphState = SUPERV::SuspendState ; break ; } - case SUPERV::ResumedExecutingState : { + case GraphExecutor::ResumedExecutingState : { aGraphState = SUPERV::RunningState ; break ; } - case SUPERV::KilledExecutingState : { + case GraphExecutor::KilledExecutingState : { aGraphState = SUPERV::KillState ; break ; } - case SUPERV::StoppedExecutingState : { + case GraphExecutor::StoppedExecutingState : { aGraphState = SUPERV::StopState ; break ; } - case SUPERV::SuccessedExecutingState : { + case GraphExecutor::SuccessedExecutingState : { aGraphState = SUPERV::DoneState ; break ; } - case SUPERV::ErroredExecutingState : { + case GraphExecutor::ErroredExecutingState : { aGraphState = SUPERV::ErrorState ; break ; } - case SUPERV::SuspendedSuccessedState : { + case GraphExecutor::SuspendedSuccessedState : { aGraphState = SUPERV::SuspendDoneState ; break ; } - case SUPERV::SuspendedErroredState : { + case GraphExecutor::SuspendedErroredState : { aGraphState = SUPERV::SuspendErroredState ; break ; } - case SUPERV::ResumedSuccessedState : { + case GraphExecutor::ResumedSuccessedState : { aGraphState = SUPERV::DoneState ; break ; } - case SUPERV::ResumedErroredState : { + case GraphExecutor::ResumedErroredState : { aGraphState = SUPERV::ErrorState ; break ; } - case SUPERV::KilledSuccessedState : { + case GraphExecutor::KilledSuccessedState : { aGraphState = SUPERV::KillState ; break ; } - case SUPERV::KilledErroredState : { + case GraphExecutor::KilledErroredState : { aGraphState = SUPERV::KillState ; break ; } - case SUPERV::StoppedSuccessedState : { + case GraphExecutor::StoppedSuccessedState : { aGraphState = SUPERV::StopState ; break ; } - case SUPERV::StoppedErroredState : { + case GraphExecutor::StoppedErroredState : { aGraphState = SUPERV::StopState ; break ; } - case SUPERV::SuccessedState : { + case GraphExecutor::SuccessedState : { aGraphState = SUPERV::DoneState ; break ; } - case SUPERV::ErroredState : { + case GraphExecutor::ErroredState : { aGraphState = SUPERV::ErrorState ; break ; } - case SUPERV::SuspendedState : { + case GraphExecutor::SuspendedState : { aGraphState = SUPERV::SuspendState ; break ; } - case SUPERV::KilledState : { + case GraphExecutor::KilledState : { aGraphState = SUPERV::KillState ; break ; } - case SUPERV::StoppedState : { + case GraphExecutor::StoppedState : { aGraphState = SUPERV::StopState ; break ; } - case SUPERV::ReRunnedState : { + case GraphExecutor::ReRunnedState : { aGraphState = SUPERV::ReRunState ; break ; } - case SUPERV::ReStartedState : { + case GraphExecutor::ReStartedState : { aGraphState = SUPERV::ReStartState ; break ; } @@ -1142,7 +1170,7 @@ int GraphExecutor::OutNode::GetListSize() { bool GraphExecutor::OutNode::PushEvent( GraphExecutor::InNode * aNode , GraphExecutor::NodeEvent anEvent , - SUPERV::AutomatonState aState ) { + GraphExecutor::AutomatonState aState ) { // cdebug_in << "PushEvent Threads " << Threads() << " SuspendedThreads " // << SuspendedThreads() << endl ; if ( pthread_mutex_lock( &_MutexWait ) ) { @@ -1212,7 +1240,7 @@ bool GraphExecutor::OutNode::Event( char ** aNodeName , _EventNodes.size() > 0 ; char * NodeName = "" ; GraphExecutor::NodeEvent theEvent = GraphExecutor::UndefinedEvent ; - SUPERV::AutomatonState theState = SUPERV::UnKnownState ; + GraphExecutor::AutomatonState theState = GraphExecutor::UnKnownState ; anEvent = SUPERV::UndefinedEvent ; aState = SUPERV::UndefinedState ; if ( ( Done() || IsKilled() || IsStopped() ) && _EventNodes.size() == 0 ) { @@ -1300,7 +1328,7 @@ bool GraphExecutor::OutNode::EventWait( char ** aNodeName , cdebug << "--> EventW RetVal " << RetVal << endl ; char * NodeName = "" ; GraphExecutor::NodeEvent theEvent = GraphExecutor::UndefinedEvent ; - SUPERV::AutomatonState theState = SUPERV::UnKnownState ; + GraphExecutor::AutomatonState theState = GraphExecutor::UnKnownState ; anEvent = SUPERV::UndefinedEvent ; aState = SUPERV::UndefinedState ; if ( IsDone() && _EventNodes.size() == 0 ) { @@ -1421,7 +1449,7 @@ void GraphExecutor::OutNode::EventList() { } list< char * >::iterator itEventNodes = _EventNodes.begin() ; list< GraphExecutor::NodeEvent >::iterator itEvents = _Events.begin() ; - list< SUPERV::AutomatonState >::iterator itStates = _States.begin() ; + list< GraphExecutor::AutomatonState >::iterator itStates = _States.begin() ; while ( itEventNodes != _EventNodes.end() ) { cdebug << pthread_self() << "EVENTSTACK " << *itEventNodes << " " << *itEvents << " " @@ -1437,7 +1465,15 @@ void GraphExecutor::OutNode::EventList() { } } -void GraphExecutor::OutNode::State(SUPERV::AutomatonState aState ) { +void GraphExecutor::OutNode::SendSomeDataReady( const char * aNodeName ) { + cdebug_in << "GraphExecutor::OutNode::SendSomeDataReady " << aNodeName << "->SendSomeDataReady( " + << Graph()->Name() << " )" << endl; + int sts ; + sts = ((GraphExecutor::InNode * ) Graph()->GetChangeGraphNode( aNodeName )->GetInNode())->SendSomeDataReady( Graph()->Name() ) ; + cdebug_out << "GraphExecutor::OutNode::SendSomeDataReady sts " << sts << endl ; +} + +void GraphExecutor::OutNode::State(GraphExecutor::AutomatonState aState ) { // cdebug << "GraphExecutor::OutNode::State " << Graph()->Name() << " " // << theAutomaton->StateName( AutomatonGraphState( _State ) ) << " ---> " // << theAutomaton->StateName( AutomatonGraphState( aState ) ) << endl ; @@ -1454,7 +1490,7 @@ SUPERV::GraphState GraphExecutor::OutNode::State() { SUPERV::GraphState GraphExecutor::OutNode::State( const char * NodeName ) { // cdebug_in << "GraphExecutor::OutNode::State " << NodeName << endl; - SUPERV::AutomatonState aret = SUPERV::UnKnownState ; + GraphExecutor::AutomatonState aret = GraphExecutor::UnKnownState ; const GraphBase::ComputingNode * aCNode = Graph()->GetGraphNode( NodeName ) ; if ( aCNode ) { GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *)aCNode->GetInNode() ; @@ -1477,15 +1513,15 @@ SUPERV::GraphState GraphExecutor::OutNode::State( const char * NodeName , return aret ; } -SUPERV::AutomatonState GraphExecutor::OutNode::AutomatonState() { +GraphExecutor::AutomatonState GraphExecutor::OutNode::AutomatonState() { // cdebug_in << "GraphExecutor::OutNode::AutomatonState" << endl; // cdebug_out << "GraphExecutor::OutNode::AutomatonState" << endl ; return _State ; } -SUPERV::AutomatonState GraphExecutor::OutNode::AutomatonState( const char * NodeName ) { +GraphExecutor::AutomatonState GraphExecutor::OutNode::AutomatonState( const char * NodeName ) { // cdebug_in << "GraphExecutor::OutNode::AutomatonState " << NodeName << endl; - SUPERV::AutomatonState aret = SUPERV::UnKnownState ; + GraphExecutor::AutomatonState aret = GraphExecutor::UnKnownState ; GraphExecutor::InNode *anInNode = (GraphExecutor::InNode *) Graph()->GetGraphNode( NodeName )->GetInNode() ; if ( anInNode ) aret = anInNode->State() ; @@ -1671,7 +1707,7 @@ bool GraphExecutor::OutNode::ContainerKill() { } RetVal = true ; } - State( SUPERV::KilledState ) ; + State( GraphExecutor::KilledState ) ; cdebug_out << "GraphExecutor::OutNode::ContainerKill" << endl ; return RetVal ; } @@ -1699,7 +1735,7 @@ bool GraphExecutor::OutNode::Suspend() { } } if ( RetVal ) { - State( SUPERV::SuspendedState ) ; + State( GraphExecutor::SuspendedState ) ; MESSAGE("================================================================================") ; MESSAGE( Graph()->Name() << " IS SUSPENDED" ) ; MESSAGE("================================================================================") ; @@ -1717,7 +1753,7 @@ bool GraphExecutor::OutNode::Resume() { int RetVal = 0 ; cdebug_in << "GraphExecutor::OutNode::Resume" << endl; if ( IsSuspended() ) { - State( SUPERV::ExecutingState ) ; + State( GraphExecutor::ExecutingState ) ; int i ; for ( i = 0 ; i < Graph()->GraphNodesSize() ; i++ ) { GraphExecutor::InNode * aNode = (GraphExecutor::InNode * ) Graph()->GraphNodes( i )->GetInNode() ; @@ -1791,7 +1827,7 @@ bool GraphExecutor::OutNode::Kill() { } RetVal = true ; } - State( SUPERV::KilledState ) ; + State( GraphExecutor::KilledState ) ; if ( RetVal ) { MESSAGE("================================================================================") ; MESSAGE( Graph()->Name() << " IS KILLED" << theAutomaton->StateName( AutomatonState() ) << " EventQSize " diff --git a/src/GraphExecutor/DataFlowExecutor_OutNode.hxx b/src/GraphExecutor/DataFlowExecutor_OutNode.hxx index 2676c74..72c38db 100644 --- a/src/GraphExecutor/DataFlowExecutor_OutNode.hxx +++ b/src/GraphExecutor/DataFlowExecutor_OutNode.hxx @@ -50,7 +50,7 @@ namespace GraphExecutor { bool _PyInitialized ; bool _Valid ; bool _Executable ; - SUPERV::AutomatonState _State ; + GraphExecutor::AutomatonState _State ; SUPERV::ControlState _ControlState ; bool _Done ; @@ -63,15 +63,15 @@ namespace GraphExecutor { int _SuspendedThreads ; list< char * > _EventNodes ; list< GraphExecutor::NodeEvent > _Events ; - list< SUPERV::AutomatonState > _States ; + list< GraphExecutor::AutomatonState > _States ; bool Valid() ; void UnValid() ; bool Executable() ; - bool LoadNodes( const GraphBase::ListOfNodes &aNodes ) ; - bool LoadLinks( const GraphBase::ListOfLinks &aLinks ) ; - bool LoadDatas( const GraphBase::ListOfLinks &aDatas ) ; + bool LoadNodes( const GraphBase::ListOfSNodes &aNodes ) ; + bool LoadLinks( const GraphBase::ListOfSLinks &aLinks ) ; + bool LoadDatas( const GraphBase::ListOfSLinks &aDatas ) ; CORBA::ORB_ptr _Orb ; @@ -107,8 +107,8 @@ namespace GraphExecutor { GraphBase::Graph * Graph() const { return _Graph ; } ; - bool LoadDataFlow( const GraphBase::SGraph &aDataFlow ) ; - bool LoadXml( const char* myFileName ) ; + bool LoadDataFlow( const GraphBase::SGraph * aDataFlow ) ; +// bool LoadXml( const char* myFileName ) ; bool LoadInfo( const GraphBase::SNode &aDataFlowInfo ) ; GraphExecutor::InNode * AddNode( @@ -128,11 +128,6 @@ namespace GraphExecutor { const int NodeX = 0 , const int NodeY = 0 ) ; - bool AddInputData( const char* ToNodeName1 , - const char* ToParameterName1 , - const char* ToNodeName2 , - const char* ToParameterName2 ) ; - bool IsValid() { if ( !_Valid ) return Valid() ; return _Valid ; } ; @@ -170,7 +165,7 @@ namespace GraphExecutor { bool PushEvent( GraphExecutor::InNode * aNode , GraphExecutor::NodeEvent anEvent , - SUPERV::AutomatonState aState ) ; + GraphExecutor::AutomatonState aState ) ; int GetListSize(); bool StateWait( SUPERV::GraphState aState ) ; bool Event( char ** aNodeName , @@ -186,8 +181,10 @@ namespace GraphExecutor { long EventQSize() ; void EventList() ; - void State(SUPERV::AutomatonState aState ) ; - const char * StateName(SUPERV::AutomatonState aState ) { + void SendSomeDataReady( const char * aNodeName ) ; + + void State(GraphExecutor::AutomatonState aState ) ; + const char * StateName(GraphExecutor::AutomatonState aState ) { return theAutomaton->StateName( aState ) ; } SUPERV::GraphState State() ; @@ -196,10 +193,10 @@ namespace GraphExecutor { const char * ServiceParameterName ) ; SUPERV::GraphEvent AutomatonGraphEvent(GraphExecutor::NodeEvent anEvent) ; - SUPERV::GraphState AutomatonGraphState(SUPERV::AutomatonState anAutomatonState) ; + SUPERV::GraphState AutomatonGraphState(GraphExecutor::AutomatonState anAutomatonState) ; - SUPERV::AutomatonState AutomatonState() ; - SUPERV::AutomatonState AutomatonState( const char * NodeName ) ; + GraphExecutor::AutomatonState AutomatonState() ; + GraphExecutor::AutomatonState AutomatonState( const char * NodeName ) ; SUPERV::ControlState ControlState() ; SUPERV::ControlState ControlState( const char * aNodeName ) ; diff --git a/src/GraphExecutor/Makefile.in b/src/GraphExecutor/Makefile.in index 2786b4f..ccf0b54 100644 --- a/src/GraphExecutor/Makefile.in +++ b/src/GraphExecutor/Makefile.in @@ -47,7 +47,7 @@ BIN_SERVER_IDL = CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) \ -I${KERNEL_ROOT_DIR}/include/salome -CXXFLAGS= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \ +CXXFLAGS+= -g -D_DEBUG_ -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \ -I${KERNEL_ROOT_DIR}/include/salome LDFLAGS+= -export-dynamic -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lOpUtil -lSALOMELocalTrace \ -lc $(QT_MT_LIBS) $(OGL_LIBS) \ diff --git a/src/MulComponent/MulComponent.cxx b/src/MulComponent/MulComponent.cxx deleted file mode 100644 index 1b4c41f..0000000 --- a/src/MulComponent/MulComponent.cxx +++ /dev/null @@ -1,90 +0,0 @@ -// SuperVisionTest MulComponent : example of component that multiplies two numbers -// -// 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 : MulComponentEngine.cxx -// Author : MARC TAJCHMAN, CEA -// Module : SuperVisionTest - -using namespace std; -#include -#include -#include -#include -#include - -//#include "utilities.h" -#include "MulComponent.hxx" - -MulComponentEngine::MulComponentEngine( CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) -{ -// MESSAGE("MulComponentEngine::MulComponentEngine activate object instanceName(" -// << instanceName << ") interfaceName(" << interfaceName << ")" ) - _thisObj = this ; - _id = _poa->activate_object(_thisObj); - _nexec = 0 ; -} - -MulComponentEngine::MulComponentEngine() -{ -} - -MulComponentEngine::~MulComponentEngine() -{ -} - -void MulComponentEngine::Mul( double x , double y , double & z ) { - beginService( " MulComponentEngine::Mul" ); - z = x * y ; - int S; - - sendMessage(NOTIF_STEP, "Mul is Computing"); - S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(S); - MESSAGE( "MulComponentEngine::Mul( " << x << " , " << y << " , " << z - << " ) after " << S << " seconds" ) - endService( " MulComponentEngine::Mul" ); -} - -extern "C" -{ - PortableServer::ObjectId * MulComponentEngine_factory - (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) - { - MESSAGE("MulComponentEngine_factory MulComponentEngine (" - << instanceName << "," << interfaceName << ")"); - MulComponentEngine * myMulComponent - = new MulComponentEngine(orb, poa, contId, instanceName, interfaceName); - return myMulComponent->getId() ; - } -} - - diff --git a/src/SubComponent/SubComponent.cxx b/src/SubComponent/SubComponent.cxx deleted file mode 100644 index 76ed6e1..0000000 --- a/src/SubComponent/SubComponent.cxx +++ /dev/null @@ -1,90 +0,0 @@ -// SuperVisionTest SubComponent : example of component that sunstracts one number from another -// -// 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 : SubComponentEngine.cxx -// Author : MARC TAJCHMAN, CEA -// Module : SuperVisionTest - -using namespace std; -#include -#include -#include -#include -#include - -//#include "utilities.h" -#include "SubComponent.hxx" - -SubComponentEngine::SubComponentEngine( CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) -{ -// MESSAGE("SubComponentEngine::SubComponentEngine activate object instanceName(" -// << instanceName << ") interfaceName(" << interfaceName << ")" ) - _thisObj = this ; - _id = _poa->activate_object(_thisObj); - _nexec = 0 ; -} - -SubComponentEngine::SubComponentEngine() -{ -} - -SubComponentEngine::~SubComponentEngine() -{ -} - -void SubComponentEngine::Sub( double x , double y , double & z ) { - beginService( " SubComponentEngine::Sub" ); - z = x - y ; - int S; - - sendMessage(NOTIF_STEP, "Sub is Computing"); - S = 1+(int) (15.0*rand()/(RAND_MAX+1.0)); - sleep(S); - MESSAGE( "SubComponentEngine::Sub( " << x << " , " << y << " , " << z - << " ) after " << S << " seconds" ) - endService( " SubComponentEngine::Sub" ); -} - -extern "C" -{ - PortableServer::ObjectId * SubComponentEngine_factory - (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) - { - MESSAGE("SubComponentEngine_factory SubComponentEngine (" - << instanceName << "," << interfaceName << ")"); - SubComponentEngine * mySubComponent - = new SubComponentEngine(orb, poa, contId, instanceName, interfaceName); - return mySubComponent->getId() ; - } -} - - diff --git a/src/Supervision/CNode_Impl.cxx b/src/Supervision/CNode_Impl.cxx index 452dff0..e33332e 100644 --- a/src/Supervision/CNode_Impl.cxx +++ b/src/Supervision/CNode_Impl.cxx @@ -28,7 +28,8 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - const char *aDataFlowName ) : + const char *aDataFlowName , + const SUPERV::KindOfNode aKindOfNode ) : Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { // MESSAGE("CNode_Impl::CNode_Impl activate object instanceName(" // << instanceName << ") interfaceName(" << interfaceName << ") --> " @@ -36,13 +37,21 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , // _thisObj = this ; // _id = _poa->activate_object(_thisObj); // MESSAGE( "CNode_Impl::CNode_Impl " << aDataFlowName << " " ); - beginService( "CNode_Impl::CNode_Impl" ); +// beginService( "CNode_Impl::CNode_Impl" ); _Orb = CORBA::ORB::_duplicate(orb); _Poa = poa ; _ContId = contId ; + _DataFlowEditor = NULL ; + _DataFlowExecutor = NULL ; _DataFlowNode = NULL ; - _IsNode = false ; - endService( "CNode_Impl::CNode_Impl" ); + _DataFlowExecutorNode = NULL ; + if ( aKindOfNode == SUPERV::MacroNode ) { + _IsNode = true ; + } + else { + _IsNode = false ; + } +// endService( "CNode_Impl::CNode_Impl" ); } CNode_Impl::CNode_Impl() { @@ -53,14 +62,14 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - GraphEditor::DataFlow * DataFlowEditor , + GraphEditor::DataFlow * aDataFlowEditor , const SALOME_ModuleCatalog::Service &NodeService , const char * NodeName , const SUPERV::KindOfNode NodeKindOfNode , const char * FuncName , const SUPERV::ListOfStrings & PythonFunction ) : Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { - beginService( "CNode_Impl::CNode_Impl" ); +// beginService( "CNode_Impl::CNode_Impl" ); // cout << "CNode_Impl::CNode_Impl -->" << endl ; // if ( FuncName && NodeName ) { // cout << "CNode_Impl::CNode_Impl " << (void *) NodeName << " " << NodeName @@ -68,14 +77,16 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , // << " " << strlen( FuncName ) << endl ; // } if ( NodeKindOfNode == SUPERV::ComputingNode ) { - MESSAGE( "CNode_Impl::CNode_Impl " << FuncName << " _poa->activate_object" ); +// MESSAGE( "CNode_Impl::CNode_Impl " << FuncName << " _poa->activate_object" ); _thisObj = this ; _id = _poa->activate_object(_thisObj); } _Orb = CORBA::ORB::_duplicate(orb); _Poa = poa ; _ContId = contId ; - _DataFlowEditor = DataFlowEditor ; + _DataFlowEditor = aDataFlowEditor ; + _DataFlowExecutor = NULL ; + DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ; GraphBase::ListOfFuncName aFuncName ; GraphBase::ListOfPythonFunctions aPythonFunction ; if ( FuncName ) { @@ -88,8 +99,9 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , NodeKindOfNode , aFuncName , aPythonFunction ) ; + _DataFlowExecutorNode = NULL ; _IsNode = true ; - endService( "CNode_Impl::CNode_Impl" ); +// endService( "CNode_Impl::CNode_Impl" ); // cout << "<-- CNode_Impl::CNode_Impl" << endl ; } @@ -98,33 +110,36 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - GraphEditor::DataFlow * DataFlowEditor , + GraphEditor::DataFlow * aDataFlowEditor , const SALOME_ModuleCatalog::Service &NodeService , const char * NodeName , const SUPERV::KindOfNode NodeKindOfNode , const GraphBase::ListOfFuncName & aFuncName , const GraphBase::ListOfPythonFunctions & aPythonFunction ) : Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { - MESSAGE( NodeName << " " ); - beginService( "CNode_Impl::CNode_Impl" ); +// MESSAGE( NodeName << " " ); +// beginService( "CNode_Impl::CNode_Impl" ); if ( NodeName ) { - MESSAGE("CNode_Impl::CNode_Impl " << NodeName << " " << strlen( NodeName ) ) ; +// MESSAGE("CNode_Impl::CNode_Impl " << NodeName << " " << strlen( NodeName ) ) ; } if ( NodeKindOfNode == SUPERV::ComputingNode ) { - MESSAGE( "CNode_Impl::CNode_Impl " << aFuncName[0] << " _poa->activate_object" ); +// MESSAGE( "CNode_Impl::CNode_Impl " << aFuncName[0] << " _poa->activate_object" ); _thisObj = this ; _id = _poa->activate_object(_thisObj); } _Orb = CORBA::ORB::_duplicate(orb); _Poa = poa ; _ContId = contId ; - _DataFlowEditor = DataFlowEditor ; + _DataFlowEditor = aDataFlowEditor ; + _DataFlowExecutor = NULL ; + DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ; _DataFlowNode = _DataFlowEditor->AddNode( NodeService , "" , "" , NodeName , NodeKindOfNode , aFuncName , aPythonFunction ) ; + _DataFlowExecutorNode = NULL ; _IsNode = true ; - endService( "CNode_Impl::CNode_Impl" ); +// endService( "CNode_Impl::CNode_Impl" ); } CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , @@ -132,26 +147,67 @@ CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - GraphEditor::DataFlow * DataFlowEditor , - GraphEditor::InNode * DataFlowNode ) : + GraphEditor::DataFlow * aDataFlowEditor , + GraphEditor::InNode * aDataFlowNode ) : Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { - MESSAGE( DataFlowNode->Name() << " " ); - beginService( "CNode_Impl::CNode_Impl" ); - if ( DataFlowNode->IsComputingNode() ) { - MESSAGE( "CNode_Impl::CNode_Impl _poa->activate_object" ); +// beginService( "CNode_Impl::CNode_Impl" ); + if ( aDataFlowNode && aDataFlowNode->IsComputingNode() ) { +// MESSAGE( "CNode_Impl::CNode_Impl _poa->activate_object" ); _thisObj = this ; _id = _poa->activate_object(_thisObj); } else { - MESSAGE( "CNode_Impl::CNode_Impl NO _poa->activate_object " ); +// MESSAGE( "CNode_Impl::CNode_Impl NO _poa->activate_object " ); } _Orb = CORBA::ORB::_duplicate(orb); _Poa = poa ; _ContId = contId ; - _DataFlowEditor = DataFlowEditor ; - _DataFlowNode = DataFlowNode ; - _IsNode = true ; - endService( "CNode_Impl::CNode_Impl" ); + _DataFlowEditor = aDataFlowEditor ; + _DataFlowExecutor = NULL ; + DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ; + _DataFlowNode = aDataFlowNode ; + _DataFlowExecutorNode = NULL ; + if ( aDataFlowNode ) { + _IsNode = true ; + } + else { + _IsNode = false ; + } +// endService( "CNode_Impl::CNode_Impl" ); +} + +CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphExecutor::DataFlow * aDataFlowExecutor , + GraphExecutor::InNode * aDataFlowExecutorNode ) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { +// beginService( "CNode_Impl::CNode_Impl" ); + if ( aDataFlowExecutorNode && aDataFlowExecutorNode->IsComputingNode() ) { +// MESSAGE( "CNode_Impl::CNode_Impl _poa->activate_object" ); + _thisObj = this ; + _id = _poa->activate_object(_thisObj); + } + else { +// MESSAGE( "CNode_Impl::CNode_Impl NO _poa->activate_object " ); + } + _Orb = CORBA::ORB::_duplicate(orb); + _Poa = poa ; + _ContId = contId ; + _DataFlowEditor = NULL ; + _DataFlowExecutor = aDataFlowExecutor ; + DataFlowExecutor()->Graph()->SetGraphExecutor( aDataFlowExecutor ) ; + _DataFlowNode = NULL ; + _DataFlowExecutorNode = aDataFlowExecutorNode ; + if ( aDataFlowExecutorNode ) { + _IsNode = true ; + } + else { + _IsNode = false ; + } +// endService( "CNode_Impl::CNode_Impl" ); } CNode_Impl::~CNode_Impl() { @@ -177,6 +233,7 @@ bool CNode_Impl::Delete() { beginService( "CNode_Impl::Delete" ); bool RetVal = false ; if ( _DataFlowEditor->IsEditing() ) { + DeletePorts() ; RetVal = _DataFlowEditor->RemoveNode( Name() ) ; if ( RetVal ) { RetVal = _DataFlowEditor->UnValid() ; @@ -186,6 +243,26 @@ bool CNode_Impl::Delete() { return RetVal ; } +void CNode_Impl::DeletePorts() { + beginService( "CNode_Impl::DeletePorts" ); + if ( _DataFlowEditor->IsEditing() && _DataFlowNode ) { + int i ; + for ( i = 0 ; i < _DataFlowNode->ComputingNode()->GetNodeInPortsSize() ; i++ ) { + SUPERV::Port_var aPort = _DataFlowNode->ComputingNode()->GetChangeNodeInPort( i )->ObjRef() ; + if ( !CORBA::is_nil( aPort ) ) { + aPort->Remove() ; + } + } + for ( i = 0 ; i < _DataFlowNode->ComputingNode()->GetNodeOutPortsSize() ; i++ ) { + SUPERV::Port_var aPort = _DataFlowNode->ComputingNode()->GetChangeNodeOutPort( i )->ObjRef() ; + if ( !CORBA::is_nil( aPort ) ) { + aPort->Remove() ; + } + } + } + endService( "CNode_Impl::DeletePorts" ); +} + SALOME_ModuleCatalog::Service * CNode_Impl::Service() { // beginService( "CNode_Impl::Service" ); SALOME_ModuleCatalog::Service * RetVal ; @@ -220,7 +297,8 @@ bool CNode_Impl::SetName( const char * aDataFlowName ) { aDataFlowName ) ; } else { - RetVal = _DataFlowEditor->Graph()->Name( aDataFlowName ) ; +// RetVal = _DataFlowEditor->Graph()->Name( aDataFlowName ) ; + RetVal = _DataFlowEditor->Name( aDataFlowName ) ; } } // endService( "CNode_Impl::SetName" ); @@ -262,6 +340,47 @@ bool CNode_Impl::IsStreamGraph() { // endService( "CNode_Impl::IsStreamGraph" ); return RetVal ; } +bool CNode_Impl::IsMacro() { +// beginService( "CNode_Impl::IsMacro" ); + bool RetVal = false ; + if ( _IsNode && _DataFlowNode->IsMacroNode() ) { + RetVal = true ; + } +// endService( "CNode_Impl::IsMacro" ); + return RetVal ; +} +bool CNode_Impl::IsFlowMacro() { +// beginService( "CNode_Impl::IsFlowMacro" ); + bool RetVal = false ; + if ( _IsNode && _DataFlowNode->IsMacroNode() && _DataFlowNode->ComputingNode()->MacroObject()->IsGraph() ) { + RetVal = true ; + } +// endService( "CNode_Impl::IsFlowMacro" ); + return RetVal ; +} +bool CNode_Impl::IsStreamMacro() { +// beginService( "CNode_Impl::IsStreamMacro" ); + bool RetVal = false ; + if ( _IsNode && _DataFlowNode->IsMacroNode() && _DataFlowNode->ComputingNode()->MacroObject()->IsStreamGraph() ) { + RetVal = true ; + } +// endService( "CNode_Impl::IsStreamMacro" ); + return RetVal ; +} +bool CNode_Impl::IsHeadGraph() { + bool RetVal = false ; + beginService( "CNode_Impl::IsHeadGraph" ); + endService( "CNode_Impl::IsHeadGraph" ); + return RetVal ; +} +long CNode_Impl::GraphLevel() { + long RetVal = 0 ; + beginService( "CNode_Impl::GraphLevel" ); + RetVal = DataFlowEditor()->Graph()->GraphMacroLevel() ; + endService( "CNode_Impl::GraphLevel" ); + return RetVal ; +} + bool CNode_Impl::IsComputing() { // beginService( "CNode_Impl::IsComputing" ); bool RetVal = SUPERV::UnknownNode ; @@ -605,7 +724,7 @@ SUPERV::Port_ptr CNode_Impl::Input( const char * ToServiceParameterName , GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; bool sts = false ; GraphBase::InPort * anInPort = NULL ; - if ( _DataFlowEditor->IsEditing() ) { + if ( _DataFlowEditor->IsEditing() && _DataFlowEditor->Graph()->GraphMacroLevel() == 0 ) { if ( _IsNode ) { sts = _DataFlowEditor->AddInputData( _DataFlowNode->Name() , ToServiceParameterName , @@ -692,6 +811,49 @@ SUPERV::Port_ptr CNode_Impl::Input( const char * ToServiceParameterName , return SUPERV::Port::_duplicate( iobject ) ; } +#if 0 +bool CNode_Impl::InputOfAny( const char * ToServiceParameterName , + const CORBA::Any & aValue ) { + beginService( "CNode_Impl::InputOfAny" ); + GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; + bool RetVal = false ; + MESSAGE( pthread_self() << "CNode_Impl::InputOfAny " << Name() << "(" << ToServiceParameterName << ")" ) ; + if ( !_DataFlowEditor->IsEditing() && _DataFlowExecutor && _DataFlowEditor->Graph()->GraphMacroLevel() ) { + if ( !_IsNode ) { + GraphBase::OutPort * anOutPort ; + anOutPort = _DataFlowExecutor->Graph()->GetChangeInDataNodePort( ToServiceParameterName ) ; + MESSAGE( pthread_self() << "CNode_Impl::InputOfAny " << _DataFlowExecutor->Graph()->Name() << " " << ToServiceParameterName + << " " << anOutPort->State() << " Done " << anOutPort->Done() ) ; + RetVal = _DataFlowExecutor->AddInputData( _DataFlowExecutor->Graph()->Name() , + ToServiceParameterName , + aValue ) ; + anOutPort->State( SUPERV::ReadyState ) ; + anOutPort->Done( true ) ; + GraphExecutor::InNode * anInNode = (GraphExecutor::InNode * ) _DataFlowExecutor->Graph()->GetChangeGraphNode( anOutPort->InPorts( 0 )->NodeName() )->GetInNode() ; + MESSAGE( pthread_self() << "CNode_Impl::InputOfAny : " << anInNode->Name() << "->SendSomeDataReady( " + << _DataFlowExecutor->Graph()->Name() << " ) " ) ; + anInNode->SendSomeDataReady( _DataFlowExecutor->Graph()->Name() ) ; + if ( anInNode->IsReady() ) { + MESSAGE( pthread_self() << "CNode_Impl::InputOfAny : " << anInNode->Name() + << "->SendEvent( GraphExecutor::ExecuteEvent ) " + << " " << anInNode->Name() << "->IsReady() " << anInNode->IsReady() << " State " + << anInNode->State() ) ; + if ( anInNode->IsLockedDataWait() ) { + MESSAGE( pthread_self() << "CNode_Impl::InputOfAny : " << anInNode->Name() + << " IsLockedDataWait() ==> UnLockDataWait" ) ; + anInNode->UnLockDataWait() ; + } + anInNode->CreateNewThread( true ) ; + anInNode->SendEvent( GraphExecutor::ExecuteEvent ) ; + _DataFlowExecutor->State( GraphExecutor::ExecutingState ) ; + } + } + } + endService( "CNode_Impl::InputOfAny" ); + return RetVal ; +} +#endif + SUPERV::Port_ptr CNode_Impl::GetInPort( const char *aParameterName ) { SUPERV::Port_ptr Inobject = SUPERV::Port::_nil() ; Port_Impl * myInPort = NULL ; @@ -796,6 +958,13 @@ SUPERV::StreamPort_ptr CNode_Impl::GetOutStreamPort( const char *aParameterName return SUPERV::StreamPort::_duplicate( Outobject ); } +bool CNode_Impl::HasStreamPort() { + bool RetVal = false ; + beginService( "CNode_Impl::HasStreamPort" ); + endService( "CNode_Impl::HasStreamPort" ); + return RetVal ; +} + SUPERV::Link_ptr CNode_Impl::GetLink(const char * ToServiceParameterName ) { bool begin = true ; SUPERV::Link_var iobject = SUPERV::Link::_nil() ; @@ -895,8 +1064,6 @@ SUPERV::ListOfPorts * CNode_Impl::Ports() { int PortCount = 0 ; SUPERV::ListOfPorts_var RetVal = new SUPERV::ListOfPorts ; if ( _IsNode ) { -// RetVal->length( _DataFlowNode->GetNodeInPortsSize() + -// _DataFlowNode->GetNodeOutPortsSize() ) ; for ( i = 0 ; i < _DataFlowNode->GetNodeInPortsSize() ; i++ ) { GraphBase::InPort * anInPort = _DataFlowNode->GetChangeNodeInPort( i ) ; if ( !anInPort->IsDataStream() ) { @@ -904,15 +1071,14 @@ SUPERV::ListOfPorts * CNode_Impl::Ports() { beginService( "CNode_Impl::Ports" ); begin = false ; } - if ( anInPort->IsLoop() || ( anInPort->IsGate() && !anInPort->IsConnected() && + if ( anInPort->IsLoop() || ( anInPort->IsGate() && anInPort->IsNotConnected() && ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) { - MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ; -// RetVal[ i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ; +// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ; } else if ( CORBA::is_nil( anInPort->ObjRef() ) ) { - MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting " - << _DataFlowEditor->IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate() - << "/" << anInPort->IsConnected() ) ; +// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting " +// << _DataFlowEditor->IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate() +// << "/" << anInPort->IsNotConnected() ) ; Port_Impl * myPort ; if ( _DataFlowNode->HasInput( anInPort->PortName() ) ) { const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ; @@ -942,15 +1108,14 @@ SUPERV::ListOfPorts * CNode_Impl::Ports() { anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ; } else { - MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() ) ; +// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() ) ; PortCount += 1 ; RetVal->length( PortCount ) ; RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( anInPort->ObjRef() ) ; } } else { - MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsDataStream" ) ; -// RetVal[ i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ; +// MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsDataStream" ) ; } } for ( i = 0 ; i < _DataFlowNode->GetNodeOutPortsSize() ; i++ ) { @@ -960,13 +1125,12 @@ SUPERV::ListOfPorts * CNode_Impl::Ports() { beginService( "CNode_Impl::Ports" ); begin = false ; } - if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && !anOutPort->IsConnected() && + if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && anOutPort->IsNotConnected() && ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) { - MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ; -// RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ; +// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ; } else if ( CORBA::is_nil( anOutPort->ObjRef() ) ) { - MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ; +// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ; const CORBA::Any * anAny = anOutPort->Value() ; Port_Impl * myPort = new Port_Impl( _Orb , _Poa , _ContId , instanceName() , interfaceName() , @@ -985,15 +1149,14 @@ SUPERV::ListOfPorts * CNode_Impl::Ports() { anOutPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ; } else { - MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ; +// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ; PortCount += 1 ; RetVal->length( PortCount ) ; RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( anOutPort->ObjRef() ) ; } } else { - MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " IsDataStream" ) ; -// RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ; +// MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " IsDataStream" ) ; } } } @@ -1044,7 +1207,6 @@ SUPERV::ListOfPorts * CNode_Impl::Ports() { } } else { -// RetVal[ i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ; } } j = _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() ; @@ -1091,15 +1253,16 @@ SUPERV::ListOfPorts * CNode_Impl::Ports() { } } else { -// RetVal[ j + i ] = SUPERV::Port::_duplicate( SUPERV::Port::_narrow( CORBA::Object::_nil() ) ) ; } } } } -// int RetVallength = (unsigned int ) RetVal->length() ; -// for ( i = 0 ; i < RetVallength ; i++ ) { -// MESSAGE( "Port " << i << " " << RetVal[i]->Name() << " of Node " << Name() ) ; -// } +#if 0 + int RetVallength = (unsigned int ) RetVal->length() ; + for ( i = 0 ; i < RetVallength ; i++ ) { + MESSAGE( "Port " << i << " " << RetVal[i]->Name() << " of Node " << Name() ) ; + } +#endif if ( !begin ) { endService( "CNode_Impl::Ports " ) ; } @@ -1124,7 +1287,7 @@ SUPERV::ListOfStreamPorts * CNode_Impl::StreamPorts() { beginService( "CNode_Impl::StreamPorts" ); begin = false ; } - if ( anInPort->IsLoop() || ( anInPort->IsGate() && !anInPort->IsConnected() && + if ( anInPort->IsLoop() || ( anInPort->IsGate() && anInPort->IsNotConnected() && ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) { MESSAGE( "InStreamPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ; // RetVal[ i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ; @@ -1132,7 +1295,7 @@ SUPERV::ListOfStreamPorts * CNode_Impl::StreamPorts() { else if ( CORBA::is_nil( anInPort->ObjRef() ) ) { MESSAGE( "InStreamPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting " << _DataFlowEditor->IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate() - << "/" << anInPort->IsConnected() ) ; + << "/" << anInPort->IsNotConnected() ) ; StreamPort_Impl * myStreamPort ; if ( _DataFlowNode->HasInput( anInPort->PortName() ) ) { const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ; @@ -1179,7 +1342,7 @@ SUPERV::ListOfStreamPorts * CNode_Impl::StreamPorts() { beginService( "CNode_Impl::StreamPorts" ); begin = false ; } - if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && !anOutPort->IsConnected() && + if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && anOutPort->IsNotConnected() && ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) { MESSAGE( "OutStreamPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ; // RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ; @@ -1328,6 +1491,7 @@ SUPERV::ListOfLinks * CNode_Impl::Links() { beginService( "CNode_Impl::Links" ) ; SUPERV::ListOfLinks_var RetVal = new SUPERV::ListOfLinks ; if ( _DataFlowNode ) { +// MESSAGE( "CNode_Impl::Links " << DataFlowEditor() << " " << DataFlowEditor()->Graph() << " " << DataFlowEditor()->Graph()->ObjImpl() << " " << _DataFlowNode->ComputingNode() << " " << _DataFlowNode->ComputingNode()->Name() ) ; RetVal = DataFlowEditor()->Graph()->ObjImpl()->Links( _DataFlowNode->ComputingNode() , NULL ) ; } else { @@ -1418,9 +1582,9 @@ long CNode_Impl::Thread() { // endService( "CNode_Impl::Thread" ); return RetVal ; } -SUPERV::AutomatonState CNode_Impl::AutoState() { +GraphExecutor::AutomatonState CNode_Impl::AutoState() { // beginService( "CNode_Impl::AutoState" ); - SUPERV::AutomatonState RetVal = SUPERV::UnKnownState ; + GraphExecutor::AutomatonState RetVal = GraphExecutor::UnKnownState ; GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; if ( _DataFlowExecutor ) { if ( _IsNode ) { @@ -1727,6 +1891,7 @@ bool CNode_Impl::Run() { beginService( "CNode_Impl::Run" ); bool RetVal = false ; GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; + MESSAGE( "CNode_Impl::Run DataFlowExecutor " << _DataFlowExecutor << Name() << " _IsNode " << _IsNode ) ; if ( _DataFlowExecutor ) { _DataFlowEditor->EditedAfterExecution( false ) ; if ( _IsNode ) { diff --git a/src/Supervision/CNode_Impl.hxx b/src/Supervision/CNode_Impl.hxx index eeb4028..d67d4d2 100644 --- a/src/Supervision/CNode_Impl.hxx +++ b/src/Supervision/CNode_Impl.hxx @@ -31,8 +31,10 @@ class CNode_Impl : public POA_SUPERV::CNode , PortableServer::POA_ptr _Poa ; PortableServer::ObjectId * _ContId ; - GraphEditor::DataFlow * _DataFlowEditor ; - GraphEditor::InNode * _DataFlowNode ; + GraphEditor::DataFlow * _DataFlowEditor ; + GraphExecutor::DataFlow * _DataFlowExecutor ; + GraphEditor::InNode * _DataFlowNode ; + GraphExecutor::InNode * _DataFlowExecutorNode ; bool _IsNode ; public: @@ -42,7 +44,8 @@ class CNode_Impl : public POA_SUPERV::CNode , PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - const char *aDataFlowName ) ; + const char *aDataFlowName , + const SUPERV::KindOfNode aKindOfNode ) ; CNode_Impl( CORBA::ORB_ptr orb , PortableServer::POA_ptr poa , PortableServer::ObjectId * contId , @@ -72,18 +75,35 @@ class CNode_Impl : public POA_SUPERV::CNode , const char *interfaceName , GraphEditor::DataFlow * DataFlowEditor , GraphEditor::InNode * DataFlowNode ) ; + CNode_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphExecutor::DataFlow * DataFlowExecutor , + GraphExecutor::InNode * DataFlowExecutorNode ) ; virtual ~CNode_Impl() ; virtual void destroy() ; virtual bool Delete() ; + void DeletePorts() ; + virtual void DataFlowEditor( GraphEditor::DataFlow * DataFlowEditor ) { _DataFlowEditor = DataFlowEditor ; } ; virtual GraphEditor::DataFlow * DataFlowEditor() { return _DataFlowEditor ; } ; + virtual void DataFlowExecutor( GraphExecutor::DataFlow * DataFlowExecutor ) { + _DataFlowExecutor = DataFlowExecutor ; } ; + virtual GraphExecutor::DataFlow * DataFlowExecutor() { + return _DataFlowExecutor ; } ; virtual void DataFlowNode( GraphEditor::InNode * DataFlowNode ) { _DataFlowNode = DataFlowNode ; } ; virtual GraphEditor::InNode * DataFlowNode() { return _DataFlowNode ; } ; + virtual void DataFlowNode( GraphExecutor::InNode * DataFlowExecutorNode ) { + _DataFlowExecutorNode = DataFlowExecutorNode ; } ; + virtual GraphExecutor::InNode * DataFlowExecutorNode() { + return _DataFlowExecutorNode ; } ; virtual char * Name() ; virtual bool SetName( const char * aDataFlowName ) ; @@ -116,7 +136,13 @@ class CNode_Impl : public POA_SUPERV::CNode , _DataFlowNode->SetObjRef( aNode ) ; } else { - _DataFlowEditor->Graph()->SetObjRef( SUPERV::Graph::_narrow( aNode ) ) ; + if ( _DataFlowEditor ) { + _DataFlowEditor->Graph()->SetObjRef( SUPERV::Graph::_narrow( aNode ) ) ; + } + if ( _DataFlowExecutor ) { + _DataFlowExecutor->Graph()->SetObjRef( SUPERV::Graph::_narrow( aNode ) ) ; + } + } } ; @@ -138,6 +164,8 @@ class CNode_Impl : public POA_SUPERV::CNode , virtual SUPERV::Port_ptr Input( const char * ToServiceParameterName , const SUPERV::Value_ptr aValue ) ; +// virtual bool InputOfAny( const char * ToServiceParameterName , +// const CORBA::Any & aValue ) ; virtual SUPERV::Port_ptr GetInPort( const char * aParameterName ) ; virtual SUPERV::Port_ptr GetOutPort( const char * aParameterName ) ; @@ -148,6 +176,8 @@ class CNode_Impl : public POA_SUPERV::CNode , virtual SUPERV::ListOfPorts * Ports() ; virtual SUPERV::ListOfStreamPorts * StreamPorts() ; + virtual bool HasStreamPort() ; + virtual SUPERV::ListOfLinks * Links() ; virtual SUPERV::ListOfStreamLinks * StreamLinks() ; @@ -156,6 +186,11 @@ class CNode_Impl : public POA_SUPERV::CNode , virtual bool IsStreamGraph() ; virtual bool IsGraph() ; + virtual bool IsMacro() ; + virtual bool IsFlowMacro() ; + virtual bool IsStreamMacro() ; + virtual bool IsHeadGraph() ; + virtual long GraphLevel() ; virtual bool IsComputing() ; virtual bool IsFactory() ; virtual bool IsInLine() ; @@ -186,7 +221,7 @@ class CNode_Impl : public POA_SUPERV::CNode , virtual long Thread() ; - virtual SUPERV::AutomatonState AutoState() ; + GraphExecutor::AutomatonState AutoState() ; virtual bool ReadyW() ; virtual bool RunningW() ; diff --git a/src/Supervision/ELNode_Impl.cxx b/src/Supervision/ELNode_Impl.cxx index 86290ca..e5913bd 100644 --- a/src/Supervision/ELNode_Impl.cxx +++ b/src/Supervision/ELNode_Impl.cxx @@ -98,6 +98,7 @@ bool ELNode_Impl::Delete() { MESSAGE("--------> ELNode_Impl::Delete() BEGIN"); bool RetVal = false ; if ( DataFlowEditor()->IsEditing() ) { + DeletePorts() ; MESSAGE("--------> In Delete: Editing dataflow"); RetVal = DataFlowEditor()->RemoveNode( Name() ) ; MESSAGE("--------> RetVal = "<IsEditing() ) { + DeletePorts() ; RetVal = DataFlowEditor()->RemoveNode( Name() ) ; if ( RetVal ) RetVal = DataFlowEditor()->IsValid() ; diff --git a/src/Supervision/FNode_Impl.cxx b/src/Supervision/FNode_Impl.cxx index d5c9f0c..290df45 100644 --- a/src/Supervision/FNode_Impl.cxx +++ b/src/Supervision/FNode_Impl.cxx @@ -93,6 +93,7 @@ bool FNode_Impl::Delete() { // beginService( "FNode_Impl::Delete" ); bool RetVal = false ; if ( DataFlowEditor()->IsEditing() ) { + DeletePorts() ; RetVal = DataFlowEditor()->RemoveNode( Name() ) ; if ( RetVal ) RetVal = DataFlowEditor()->IsValid() ; diff --git a/src/Supervision/GNode_Impl.cxx b/src/Supervision/GNode_Impl.cxx index 02fc37e..6d7cd4a 100644 --- a/src/Supervision/GNode_Impl.cxx +++ b/src/Supervision/GNode_Impl.cxx @@ -22,6 +22,27 @@ using namespace std; GNode_Impl::GNode_Impl() { } +GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + const char *aDataFlowName , + const SUPERV::KindOfNode aKindOfNode ) : + INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowName , aKindOfNode ) { +// MESSAGE("GNode_Impl::GNode_Impl activate object instanceName(" +// << instanceName << ") interfaceName(" << interfaceName << ") --> " +// << hex << (void *) this << dec ) +// _thisObj = this ; +// _id = _poa->activate_object(_thisObj); +// MESSAGE( "GNode_Impl::GNode_Impl " << aDataFlowName ); +// beginService( "GNode_Impl::GNode_Impl" ); + _Orb = CORBA::ORB::_duplicate(orb); + _Poa = poa ; + _ContId = contId ; +// endService( "INode_Impl::INode_Impl" ); +} + GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb , PortableServer::POA_ptr poa , PortableServer::ObjectId * contId , @@ -34,7 +55,7 @@ GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb , // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , FuncName , PythonFunction , NodeKindOfNode ) { // MESSAGE( NodeName << " " ); - beginService( "GNode_Impl::GNode_Impl" ); +// beginService( "GNode_Impl::GNode_Impl" ); if ( FuncName ) { // cout << "GNode_Impl::GNode_Impl " << (void *) FuncName << " " << FuncName // << " " << strlen( FuncName ) << endl ; @@ -52,7 +73,7 @@ GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb , // DataFlowNode( DataFlowEditor()->AddNode( SALOME_ModuleCatalog::Service() , // "" , "" , "" , // NodeKindOfNode ) ) ; - endService( "GNode_Impl::GNode_Impl" ); +// endService( "GNode_Impl::GNode_Impl" ); } GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb , @@ -67,7 +88,7 @@ GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb , // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , FuncNameList , PythonFunctionList , NodeKindOfNode ) { // MESSAGE( NodeName << " " ); - beginService( "GNode_Impl::GNode_Impl" ); +// beginService( "GNode_Impl::GNode_Impl" ); if ( NodeKindOfNode == SUPERV::GOTONode ) { _thisObj = this ; _id = _poa->activate_object(_thisObj); @@ -81,7 +102,7 @@ GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb , // DataFlowNode( DataFlowEditor()->AddNode( SALOME_ModuleCatalog::Service() , // "" , "" , "" , // NodeKindOfNode ) ) ; - endService( "GNode_Impl::GNode_Impl" ); +// endService( "GNode_Impl::GNode_Impl" ); } GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb , @@ -93,16 +114,45 @@ GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb , GraphEditor::InNode * aDataFlowNode ) : // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) { - MESSAGE( DataFlowNode()->Name() << " " ); - beginService( "GNode_Impl::GNode_Impl" ); - if ( DataFlowNode()->IsGOTONode() ) { +// beginService( "GNode_Impl::GNode_Impl" ); + if ( DataFlowNode() && DataFlowNode()->IsGOTONode() ) { +// MESSAGE( "GNode_Impl::GNode_Impl " << DataFlowNode()->PyFuncName() +// << " _poa->activate_object" ); _thisObj = this ; _id = _poa->activate_object(_thisObj); } + else { +// MESSAGE( "GNode_Impl::GNode_Impl NO _poa->activate_object" ); + } _Orb = CORBA::ORB::_duplicate(orb); _Poa = poa ; _ContId = contId ; - endService( "GNode_Impl::GNode_Impl" ); +// endService( "GNode_Impl::GNode_Impl" ); +} + +GNode_Impl::GNode_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphExecutor::DataFlow * aDataFlowExecutor , + GraphExecutor::InNode * aDataFlowExecutorNode ) : +// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { + INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowExecutor , aDataFlowExecutorNode ) { +// beginService( "GNode_Impl::GNode_Impl" ); + if ( DataFlowExecutorNode() && DataFlowExecutorNode()->IsGOTONode() ) { +// MESSAGE( "GNode_Impl::GNode_Impl " << DataFlowExecutorNode()->Name() +// << " _poa->activate_object" ); + _thisObj = this ; + _id = _poa->activate_object(_thisObj); + } + else { +// MESSAGE( "GNode_Impl::GNode_Impl NO _poa->activate_object" ); + } + _Orb = CORBA::ORB::_duplicate(orb); + _Poa = poa ; + _ContId = contId ; +// endService( "GNode_Impl::GNode_Impl" ); } GNode_Impl::~GNode_Impl() { @@ -127,6 +177,7 @@ bool GNode_Impl::Delete() { beginService( "GNode_Impl::Delete" ); bool RetVal = false ; if ( DataFlowEditor()->IsEditing() ) { + DeletePorts() ; RetVal = DataFlowEditor()->RemoveNode( Name() ) ; if ( RetVal ) RetVal = DataFlowEditor()->IsValid() ; @@ -138,19 +189,38 @@ bool GNode_Impl::Delete() { SUPERV::INode_ptr GNode_Impl::Coupled() { // beginService( "GNode_Impl::Coupled" ); SUPERV::INode_var iobject = SUPERV::INode::_nil() ; - if ( DataFlowNode()->CoupledNode() ) { - if ( CORBA::is_nil( DataFlowNode()->CoupledNode()->ObjRef() ) ) { - INode_Impl * myNode = new INode_Impl( _Orb , _Poa , _ContId , - instanceName() , interfaceName() , - DataFlowEditor() , - (GraphEditor::InNode *) DataFlowNode()->CoupledNode()->GetInNode() ) ; - PortableServer::ObjectId * id = myNode->getId() ; - CORBA::Object_var obj = _poa->id_to_reference(*id); - iobject = SUPERV::INode::_narrow(obj) ; - myNode->SetObjRef( SUPERV::INode::_duplicate( iobject ) ) ; + if ( DataFlowNode() ) { + if ( DataFlowNode()->CoupledNode() ) { + if ( CORBA::is_nil( DataFlowNode()->CoupledNode()->ObjRef() ) ) { + INode_Impl * myNode = new INode_Impl( _Orb , _Poa , _ContId , + instanceName() , interfaceName() , + DataFlowEditor() , + (GraphEditor::InNode *) DataFlowNode()->CoupledNode()->GetInNode() ) ; + PortableServer::ObjectId * id = myNode->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + iobject = SUPERV::INode::_narrow(obj) ; + myNode->SetObjRef( SUPERV::INode::_duplicate( iobject ) ) ; + } + else { + iobject = SUPERV::INode::_narrow( DataFlowNode()->CoupledNode()->ObjRef() ) ; + } } - else { - iobject = SUPERV::INode::_narrow( DataFlowNode()->CoupledNode()->ObjRef() ) ; + } + else { + if ( DataFlowEditor()->Graph()->CoupledNode() ) { + if ( CORBA::is_nil( DataFlowEditor()->Graph()->CoupledNode()->ObjRef() ) ) { + INode_Impl * myNode = new INode_Impl( _Orb , _Poa , _ContId , + instanceName() , interfaceName() , + DataFlowEditor() , + (GraphEditor::InNode *) DataFlowEditor()->Graph()->CoupledNode()->GetInNode() ) ; + PortableServer::ObjectId * id = myNode->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + iobject = SUPERV::INode::_narrow(obj) ; + myNode->SetObjRef( SUPERV::INode::_duplicate( iobject ) ) ; + } + else { + iobject = SUPERV::INode::_narrow( DataFlowEditor()->Graph()->CoupledNode()->ObjRef() ) ; + } } } // endService( "GNode_Impl::Coupled" ); diff --git a/src/Supervision/GNode_Impl.hxx b/src/Supervision/GNode_Impl.hxx index 3821296..52ddcc1 100644 --- a/src/Supervision/GNode_Impl.hxx +++ b/src/Supervision/GNode_Impl.hxx @@ -36,6 +36,13 @@ class GNode_Impl : public INode_Impl , public: GNode_Impl(); + GNode_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + const char *aDataFlowName , + const SUPERV::KindOfNode aKindOfNode ) ; GNode_Impl( CORBA::ORB_ptr orb , PortableServer::POA_ptr poa , PortableServer::ObjectId * contId , @@ -61,6 +68,13 @@ class GNode_Impl : public INode_Impl , const char *interfaceName , GraphEditor::DataFlow * DataFlowEditor , GraphEditor::InNode * DataFlowNode ) ; + GNode_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphExecutor::DataFlow * DataFlowExecutor , + GraphExecutor::InNode * DataFlowExecutorNode ) ; virtual ~GNode_Impl() ; virtual void destroy() ; virtual bool Delete() ; diff --git a/src/Supervision/Graph_Impl.cxx b/src/Supervision/Graph_Impl.cxx index abbebd9..31358d7 100644 --- a/src/Supervision/Graph_Impl.cxx +++ b/src/Supervision/Graph_Impl.cxx @@ -34,33 +34,21 @@ using namespace std; //#include "utilities.h" -#include "Graph_Impl.hxx" +#include "StreamGraph_Impl.hxx" #include "DataFlowEditor_DataFlow.hxx" extern GraphExecutor::FiniteStateMachine * theAutomaton ; -Graph_Impl::Graph_Impl( CORBA::ORB_ptr orb , - PortableServer::POA_ptr poa , - PortableServer::ObjectId * contId , - const char *instanceName , - const char *interfaceName , - const char *aDataFlowName , - const SUPERV::KindOfNode aKindOfNode ) : - INode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowName ) { -// MESSAGE("Graph_Impl::Graph_Impl activate object instanceName(" -// << instanceName << ") interfaceName(" << interfaceName << ") --> " -// << hex << (void *) this << dec ) - beginService( "Graph_Impl::Graph_Impl" ); - _Orb = CORBA::ORB::_duplicate(orb); - _Poa = poa ; - _ContId = contId ; - if ( aKindOfNode == SUPERV::DataFlowGraph ) { - _thisObj = this ; - _id = _poa->activate_object(_thisObj); - } - - string dbgfile = "/tmp/" ; +static void CreateEditor( CORBA::ORB_ptr orb , + const char *instanceName , + const char *aDataFlowName , + const SUPERV::KindOfNode aKindOfNode , + string & dbgfile , + GraphEditor::DataFlow ** aDataFlowEditor ) { +// string dbgfile = "/tmp/" ; + bool aXmlFile = false ; + dbgfile = "/tmp/" ; dbgfile += instanceName ; dbgfile += "_" ; int lenname = strlen( aDataFlowName ) ; @@ -70,35 +58,167 @@ Graph_Impl::Graph_Impl( CORBA::ORB_ptr orb , if ( lenname > 4 && !strcmp( &aDataFlowName[ lenname - 4 ] , ".xml" ) ) { strncpy( theDataFlowName , &aDataFlowName[ 0 ] , lenname-4 ) ; theDataFlowName[ lenname-4 ] = '\0' ; + aXmlFile = true ; int i ; for ( i = lenname - 5 ; i >= 0 ; i-- ) { if ( aDataFlowName[ i ] == '/' ) { strncpy( theDataFlowName , &aDataFlowName[ i + 1 ] , lenname-5-i ) ; theDataFlowName[ lenname-5-i ] = '\0' ; break ; - } + } } } else { strcpy( theDataFlowName , &aDataFlowName[ 0 ] ) ; } - dbgfile += theDataFlowName ; } - dbgfile += ".log" ; - _DebugFileName = new char[ strlen( dbgfile.c_str() )+1 ] ; - strcpy( _DebugFileName , dbgfile.c_str() ) ; + string theDataFlowInstanceName = theDataFlowName ; + if ( !aXmlFile ) { + theDataFlowInstanceName = theAutomaton->GraphInstanceName( theDataFlowName ) ; + } + dbgfile += theDataFlowInstanceName ; + dbgfile = dbgfile + "_" + theAutomaton->DbgFileNumber() + ".log" ; + SALOME_NamingService * NamingService = new SALOME_NamingService( orb ) ; + *aDataFlowEditor = new GraphEditor::DataFlow( orb , NamingService , + theDataFlowInstanceName.c_str() , dbgfile.c_str() , + aKindOfNode ) ; + MESSAGE( "CreateEditor " << theDataFlowName << " uniquely named " << theDataFlowInstanceName << " created with " + << dbgfile.c_str() ) ; + delete [] theDataFlowName ; +} + +static void CreateEditor( CORBA::ORB_ptr orb , + const char *instanceName , + const char *aDataFlowName , + const SUPERV::KindOfNode aKindOfNode , + string & dbgfile , + GraphExecutor::DataFlow ** aDataFlowExecutor ) { +// string dbgfile = "/tmp/" ; + dbgfile = "/tmp/" ; + dbgfile += instanceName ; + dbgfile += "_" ; + int lenname = strlen( aDataFlowName ) ; + char * theDataFlowName = new char [ lenname+1 ] ; + strcpy( theDataFlowName , aDataFlowName ) ; + if ( aDataFlowName ) { + strcpy( theDataFlowName , &aDataFlowName[ 0 ] ) ; + } + string theDataFlowInstanceName = theDataFlowName ; + dbgfile += theDataFlowInstanceName ; + dbgfile = dbgfile + "_" + theAutomaton->DbgFileNumber() ; + + ostringstream astr ; + astr << theAutomaton->ExecNumber() ; + dbgfile += astr.str() ; + dbgfile += string( "_Exec.log" ) ; + + SALOME_NamingService * NamingService = new SALOME_NamingService( orb ) ; + *aDataFlowExecutor = new GraphExecutor::DataFlow( orb , NamingService , + theDataFlowInstanceName.c_str() , dbgfile.c_str() , + aKindOfNode ) ; + MESSAGE( "CreateEditor " << theDataFlowName << " " << theDataFlowInstanceName << " created with " + << dbgfile.c_str() ) ; + delete [] theDataFlowName ; +} + +Graph_Impl::Graph_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + const char *aDataFlowName , + const SUPERV::KindOfNode aKindOfNode ) : + GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowName , aKindOfNode ) { +// MESSAGE("Graph_Impl::Graph_Impl activate object instanceName(" +// << instanceName << ") interfaceName(" << interfaceName << ") --> " +// << hex << (void *) this << dec ) +// beginService( "Graph_Impl::Graph_Impl" ); + _Orb = CORBA::ORB::_duplicate(orb); + _Poa = poa ; + _ContId = contId ; + if ( aKindOfNode == SUPERV::DataFlowGraph || aKindOfNode == SUPERV::MacroNode ) { +// MESSAGE( "Graph_Impl::Graph_Impl _poa->activate_object" ); + _thisObj = this ; + _id = _poa->activate_object(_thisObj); + } + else { +// MESSAGE( "Graph_Impl::Graph_Impl NO _poa->activate_object " ); + } - _NamingService = new SALOME_NamingService( orb ) ; - GraphEditor::DataFlow * aDataFlowEditor ; - aDataFlowEditor = new GraphEditor::DataFlow( _Orb , _NamingService , - theDataFlowName , _DebugFileName , - aKindOfNode ) ; + if ( aKindOfNode == SUPERV::DataFlowGraph || aKindOfNode == SUPERV::DataStreamGraph ) { + string dbgfile ; + GraphEditor::DataFlow * aDataFlowEditor ; + CreateEditor( orb , instanceName , aDataFlowName , aKindOfNode , + dbgfile , &aDataFlowEditor ) ; + _DebugFileName = new char[ strlen( dbgfile.c_str() )+1 ] ; + strcpy( _DebugFileName , dbgfile.c_str() ) ; + + _NamingService = new SALOME_NamingService( orb ) ; + DataFlowEditor( aDataFlowEditor ) ; + DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ; + DataFlowEditor()->Graph()->SetObjImpl( this ) ; + } + pthread_mutex_init( &_MutexExecutorWait , NULL ) ; +// DataFlowExecutor( NULL ) ; +// endService( "Graph_Impl::Graph_Impl" ); +} + +Graph_Impl::Graph_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphEditor::DataFlow * aDataFlowEditor , + GraphEditor::InNode * aDataFlowNode ) : + GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) { +// beginService( "Graph_Impl::Graph_Impl" ); +// MESSAGE( aDataFlowEditor->Graph()->Name() << " " ); + if ( aDataFlowEditor->Graph()->IsDataFlowNode() || aDataFlowNode->IsMacroNode() ) { +// MESSAGE( "Graph_Impl::Graph_Impl _poa->activate_object" ); + _thisObj = this ; + _id = _poa->activate_object(_thisObj); + } + else { +// MESSAGE( "Graph_Impl::Graph_Impl NO _poa->activate_object " ); + } + _Orb = CORBA::ORB::_duplicate(orb); + _Poa = poa ; + _ContId = contId ; DataFlowEditor( aDataFlowEditor ) ; + DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ; DataFlowEditor()->Graph()->SetObjImpl( this ) ; pthread_mutex_init( &_MutexExecutorWait , NULL ) ; - _DataFlowExecutor = NULL ; - delete [] theDataFlowName ; - endService( "Graph_Impl::Graph_Impl" ); +// DataFlowExecutor( NULL ) ; +// endService( "Graph_Impl::Graph_Impl" ); +} + +Graph_Impl::Graph_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphExecutor::DataFlow * aDataFlowExecutor , + GraphExecutor::InNode * aDataFlowExecutorNode ) : + GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowExecutor , aDataFlowExecutorNode ) { +// beginService( "Graph_Impl::Graph_Impl" ); +// MESSAGE( aDataFlowExecutor->Graph()->Name() << " " ); + if ( aDataFlowExecutor->Graph()->IsDataFlowNode() || aDataFlowExecutorNode->IsMacroNode() ) { +// MESSAGE( "Graph_Impl::Graph_Impl _poa->activate_object" ); + _thisObj = this ; + _id = _poa->activate_object(_thisObj); + } + else { +// MESSAGE( "Graph_Impl::Graph_Impl NO _poa->activate_object " ); + } + _Orb = CORBA::ORB::_duplicate(orb); + _Poa = poa ; + _ContId = contId ; + DataFlowExecutor( aDataFlowExecutor ) ; + DataFlowExecutor()->Graph()->SetGraphExecutor( aDataFlowExecutor ) ; + DataFlowExecutor()->Graph()->SetObjImpl( this ) ; + pthread_mutex_init( &_MutexExecutorWait , NULL ) ; +// DataFlowExecutor( NULL ) ; +// endService( "Graph_Impl::Graph_Impl" ); } Graph_Impl::Graph_Impl() { @@ -118,8 +238,12 @@ void Graph_Impl::destroy() { // endService( "Graph_Impl::destroy" ); } + char* Graph_Impl::getIOR() { - if (CORBA::is_nil(myServant)) { + if ( IsMacro() ) { + return CORBA::string_dup( NULLSTRING ) ; + } + else if ( CORBA::is_nil( myServant ) ) { PortableServer::ObjectId* id = getId(); CORBA::Object_var obj; obj = _poa->id_to_reference(*id); @@ -130,16 +254,18 @@ char* Graph_Impl::getIOR() { SUPERV::Graph_ptr Graph_Impl::Copy() { beginService( "Graph_Impl::Copy" ); - Graph_Impl * myGraph ; - myGraph = new Graph_Impl( _Orb , _Poa, _ContId, - instanceName() , interfaceName() , - DataFlowEditor()->Graph()->Name() , SUPERV::DataFlowGraph ) ; - PortableServer::ObjectId * id = myGraph->getId() ; - CORBA::Object_var obj = _poa->id_to_reference(*id); - SUPERV::Graph_var iobject ; - iobject = SUPERV::Graph::_narrow(obj) ; - GraphBase::SGraph * aSGraph = GetGraph() ; - myGraph->LoadGraph( aSGraph ) ; + SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ; + if ( !IsMacro() ) { + Graph_Impl * myGraph ; + myGraph = new Graph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + DataFlowEditor()->Graph()->Name() , SUPERV::DataFlowGraph ) ; + PortableServer::ObjectId * id = myGraph->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + iobject = SUPERV::Graph::_narrow(obj) ; + GraphBase::ListOfSGraphs * aListOfSGraphs = GetGraphs() ; + myGraph->LoadGraphs( aListOfSGraphs ) ; + } endService( "Graph_Impl::Copy" ); return SUPERV::Graph::_duplicate(iobject) ; } @@ -158,103 +284,68 @@ SUPERV::INode_ptr Graph_Impl::Node() { return SUPERV::Graph::_duplicate(iobject) ; } -GraphBase::SGraph * Graph_Impl::GetGraph() { - return DataFlowEditor()->GetDataFlow() ; +GraphBase::ListOfSGraphs * Graph_Impl::GetGraphs() { + return DataFlowEditor()->GetDataFlows() ; } -#if 0 -char * Graph_Impl::DataFlowInfo() { - beginService( "Graph_Impl::DataFlowInfo" ); - char * RetVal = DataFlowEditor()->DataFlowInfo() ; - endService( "Graph_Impl::DataFlowInfo" ); - return CORBA::string_dup( RetVal ) ; -} - -char * Graph_Impl::DataNodeInfo() { - beginService( "Graph_Impl::DataNodeInfo" ); - char * RetVal = DataFlowEditor()->DataNodeInfo() ; - endService( "Graph_Impl::DataNodeInfo" ); - return CORBA::string_dup( RetVal ) ; -} - -char * Graph_Impl::NodeInfo( const char * aNodeName ) { - beginService( "Graph_Impl::NodeInfo" ); - char * RetVal = DataFlowEditor()->NodeInfo( aNodeName ) ; - endService( "Graph_Impl::NodeInfo" ); - return CORBA::string_dup( RetVal ) ; -} -#endif - -bool Graph_Impl::LoadGraph(const GraphBase::SGraph * aDataFlow ) { -// beginService( "Graph_Impl::LoadGraph" ); +bool Graph_Impl::LoadGraphs( GraphBase::ListOfSGraphs * aListOfDataFlows ) { + beginService( "Graph_Impl::LoadGraphs" ); bool RetVal = false ; if ( DataFlowEditor()->IsEditing() ) { - RetVal = DataFlowEditor()->LoadDataFlow( aDataFlow ) ; +// RetVal = DataFlowEditor()->LoadDataFlows( aListOfDataFlows ) ; + RetVal = LoadDataFlows( DataFlowEditor() , aListOfDataFlows , 0 ) ; } -// endService( "Graph_Impl::LoadGraph" ); + endService( "Graph_Impl::LoadGraphs" ); return RetVal ; } bool Graph_Impl::Import(const char * aXmlFile ) { -// beginService( "Graph_Impl::Import" ); + beginService( "Graph_Impl::Import" ); bool RetVal = false ; - if ( DataFlowEditor()->IsEditing() ) { - RetVal = DataFlowEditor()->LoadXml( aXmlFile ) ; + if ( DataFlowEditor()->IsEditing() && !IsMacro() ) { + GraphBase::ListOfSGraphs aListOfDataFlows ; + RetVal = DataFlowEditor()->LoadXml( aXmlFile , aListOfDataFlows ) ; + if ( RetVal && aXmlFile != NULL ) { +// RetVal = DataFlowEditor()->LoadDataFlows( &aListOfDataFlows ) ; + RetVal = LoadDataFlows( DataFlowEditor() , &aListOfDataFlows , 0 ) ; + } } -// endService( "Graph_Impl::Import" ); + endService( "Graph_Impl::Import" ); return RetVal ; } bool Graph_Impl::Export(const char * anXmlFile ) { beginService( "Graph_Impl::Export" ); - char * aFile = new char [ strlen( anXmlFile ) + 5 ] ; - strcpy( aFile , anXmlFile ) ; - int len = strlen( aFile ) ; - if ( !strcmp( &aFile[ len - 4 ] , ".xml" ) ) { - } - else if ( !strcmp( &aFile[ len - 3 ] , ".py" ) ) { - strcpy( &aFile[ len - 3 ] , ".xml" ) ; - len = strlen( aFile ) ; - } - else { - strcat( aFile , ".xml" ) ; - len = strlen( aFile ) ; - } - bool RetVal = DataFlowEditor()->SaveXml( aFile ) ; - if ( RetVal ) { - strcpy( &aFile[ len - 4 ] , ".py" ) ; - RetVal = DataFlowEditor()->SavePy( aFile ) ; + bool RetVal = false ; + if ( !IsMacro() ) { + char * aFile = new char [ strlen( anXmlFile ) + 5 ] ; + strcpy( aFile , anXmlFile ) ; + int len = strlen( aFile ) ; + if ( !strcmp( &aFile[ len - 4 ] , ".xml" ) ) { + } + else if ( !strcmp( &aFile[ len - 3 ] , ".py" ) ) { + strcpy( &aFile[ len - 3 ] , ".xml" ) ; + len = strlen( aFile ) ; + } + else { + strcat( aFile , ".xml" ) ; + len = strlen( aFile ) ; + } + RetVal = DataFlowEditor()->SaveXml( aFile ) ; + if ( RetVal ) { + strcpy( &aFile[ len - 4 ] , ".py" ) ; + RetVal = DataFlowEditor()->SavePy( aFile ) ; + } + delete [] aFile ; } - delete [] aFile ; endService( "Graph_Impl::Export" ); return RetVal ; } -#if 0 -GraphBase::ListOfNodes * Graph_Impl::GetNodes() { -// beginService( "Graph_Impl::GetNodes" ); - GraphBase::ListOfNodes * RetVal = DataFlowEditor()->GetNodes() ; -// endService( "Graph_Impl::GetNodes" ); - return RetVal ; -} -GraphBase::ListOfLinks * Graph_Impl::GetLinks() { -// beginService( "Graph_Impl::GetLinks" ); - GraphBase::ListOfLinks * RetVal = DataFlowEditor()->GetLinks() ; -// endService( "Graph_Impl::GetLinks" ); - return RetVal ; -} -GraphBase::ListOfLinks * Graph_Impl::GetDatas() { -// beginService( "Graph_Impl::GetDatas" ); - GraphBase::ListOfLinks * RetVal = DataFlowEditor()->GetDatas() ; -// endService( "Graph_Impl::GetDatas" ); - return RetVal ; -} -#endif - SUPERV::CNode_ptr Graph_Impl::CNode( const SALOME_ModuleCatalog::Service &NodeService ) { beginService( "Graph_Impl::CNode" ); SUPERV::CNode_var iobject = SUPERV::CNode::_nil() ; - if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) { + if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) { CNode_Impl * myNode = new CNode_Impl( _Orb , _Poa , _ContId , instanceName() , interfaceName() , DataFlowEditor() , @@ -276,7 +367,7 @@ SUPERV::FNode_ptr Graph_Impl::FNode( const char * NodeComponentName , const SALOME_ModuleCatalog::Service &NodeService ) { beginService( "Graph_Impl::FNode" ); SUPERV::FNode_var iobject = SUPERV::FNode::_nil() ; - if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) { + if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) { FNode_Impl * myNode = new FNode_Impl( _Orb , _Poa , _ContId , instanceName() , interfaceName() , DataFlowEditor() , @@ -298,7 +389,7 @@ SUPERV::INode_ptr Graph_Impl::INode( const char * FuncName , const SUPERV::ListOfStrings & PythonFuntion ) { beginService( "Graph_Impl::INode" ); SUPERV::INode_var iobject = SUPERV::INode::_nil() ; - if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) { + if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) { INode_Impl * myNode = new INode_Impl( _Orb , _Poa , _ContId , instanceName() , interfaceName() , DataFlowEditor() , @@ -321,7 +412,7 @@ SUPERV::GNode_ptr Graph_Impl::GNode( const char * FuncName , const char * anInLineNode ) { beginService( "Graph_Impl::GNode" ); SUPERV::GNode_var iobject = SUPERV::GNode::_nil() ; - if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) { + if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) { GNode_Impl * myNode = new GNode_Impl( _Orb , _Poa , _ContId , instanceName() , interfaceName() , DataFlowEditor() , @@ -355,7 +446,7 @@ SUPERV::LNode_ptr Graph_Impl::LNode( const char * InitName , beginService( "Graph_Impl::LNode" ); SUPERV::LNode_var iobject = SUPERV::LNode::_nil() ; SUPERV::ELNode_var iendobject = SUPERV::ELNode::_nil() ; - if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) { + if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) { GraphBase::ListOfFuncName FuncNameList ; FuncNameList.resize(3) ; FuncNameList[0] = InitName ; @@ -417,7 +508,7 @@ SUPERV::SNode_ptr Graph_Impl::SNode( const char * FuncName , beginService( "Graph_Impl::SNode" ); SUPERV::SNode_var iobject = SUPERV::SNode::_nil() ; SUPERV::ESNode_var iendobject = SUPERV::ESNode::_nil() ; - if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() ) { + if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) { SNode_Impl * myNode = new SNode_Impl( _Orb , _Poa , _ContId , instanceName() , interfaceName() , DataFlowEditor() , @@ -464,6 +555,469 @@ SUPERV::SNode_ptr Graph_Impl::SNode( const char * FuncName , return SUPERV::SNode::_duplicate( iobject ) ; } +// WARNING : THIS IS COMPLICATED : +bool Graph_Impl::LoadDataFlows( GraphEditor::DataFlow * aDataFlowEditor , + GraphBase::ListOfSGraphs * aListOfDataFlows , + int index ) { + beginService( "Graph_Impl::EditorLoadDataFlows" ) ; + SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ; + if ( !aDataFlowEditor->LoadDataFlow( &(*aListOfDataFlows)[ index ] ) ) { + MESSAGE("Graph_Impl::LoadDataFlows failed" ) ; + return false ; + } +// That graph is not a StreamGraph : + else if ( !aDataFlowEditor->Graph()->HasDataStream() ) { + aDataFlowEditor->Graph()->Kind( SUPERV::DataFlowGraph ) ; + aDataFlowEditor->Graph()->SetGraphEditor( aDataFlowEditor ) ; + Graph_Impl * myGraph ; +// We create a Graph ObjRef for that graph + myGraph = new Graph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + aDataFlowEditor , NULL ) ; + PortableServer::ObjectId * id = myGraph->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id) ; + iobject = SUPERV::Graph::_narrow( obj ) ; + myGraph->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ; + GraphBase::Graph * aGraph = myGraph->DataFlowEditor()->Graph() ; + int i ; + for ( i = 0 ; i < aGraph->GraphNodesSize() ; i++ ) { + if ( aGraph->GraphNodes( i )->IsMacroNode() ) { + GraphBase::GOTONode * aMacroNode = (GraphBase::GOTONode * ) aGraph->GraphNodes( i ) ; + + + +// Creation of a GraphMacroNode in the current editor + SUPERV::Graph_var macroiobject = SUPERV::Graph::_nil() ; + string aMacroNodeName = string( "Macro_" ) + string( myGraph->Name() ) ; + Graph_Impl * myMacroNode ; + myMacroNode = new Graph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + aMacroNodeName.c_str() , SUPERV::MacroNode ) ; + id = myMacroNode->getId() ; + obj = _poa->id_to_reference(*id); + macroiobject = SUPERV::Graph::_narrow( obj ) ; + myMacroNode->DataFlowEditor( DataFlowEditor() ) ; + aMacroNode->SetGraphEditor( DataFlowEditor() ) ; + GraphEditor::InNode * aDataFlowNode = (GraphEditor::InNode * ) aMacroNode->GetInNode() ; + myMacroNode->DataFlowNode( aDataFlowNode ) ; + aDataFlowNode->SetObjRef( SUPERV::CNode::_duplicate( SUPERV::CNode::_narrow( obj ) ) ) ; + aDataFlowNode->SetObjImpl( this ) ; + + + + + + char * aCoupledNodeName = aMacroNode->CoupledNodeName() ; + MESSAGE( "LoadDataFlows MacroNode " << aMacroNode->Name() << " --> " << aCoupledNodeName + << " to be searched among " << (*aListOfDataFlows).size() << " Graphs" ) ; + int index ; + for ( index = 0 ; index < (int ) (*aListOfDataFlows).size() ; index++ ) { + if ( !strcmp( aCoupledNodeName , (*aListOfDataFlows)[index].Info.theName.c_str() ) ) { + string dbgfile ; +// At first create the editor and a StreamGraph + GraphEditor::DataFlow * aMacroGraphDataFlowEditor ; + CreateEditor( _Orb , instanceName() , aCoupledNodeName , SUPERV::DataStreamGraph , + dbgfile , &aMacroGraphDataFlowEditor ) ; +// if ( !aDataFlowEditor->LoadDataFlow( aDataFlowEditor , aListOfDataFlows , index ) ) { + MESSAGE( "RECURSIVE IMPORT OF GRAPHS OF MACRONODES :" << aCoupledNodeName ) ; + if ( !LoadDataFlows( aMacroGraphDataFlowEditor , aListOfDataFlows , index ) ) { + MESSAGE("Graph_Impl::LoadDataFlows failed" ) ; + return false ; + } + +// That graph is not a StreamGraph : + else if ( !aMacroGraphDataFlowEditor->Graph()->HasDataStream() ) { + aMacroGraphDataFlowEditor->Graph()->Kind( SUPERV::DataFlowGraph ) ; + aMacroGraphDataFlowEditor->Graph()->SetGraphEditor( aMacroGraphDataFlowEditor ) ; + Graph_Impl * myMacroGraph ; +// We create a Graph ObjRef for that graph + myMacroGraph = new Graph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + aMacroGraphDataFlowEditor , NULL ) ; + PortableServer::ObjectId * id = myMacroGraph->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + SUPERV::Graph_var iobject = SUPERV::Graph::_narrow( obj ) ; + myMacroGraph->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ; + + GraphBase::Graph * aMacroGraph = myMacroGraph->DataFlowEditor()->Graph() ; + aMacroGraph->GraphMacroLevel( aGraph->GraphMacroLevel() + 1 ) ; + aMacroGraph->CoupledNode( aMacroNode ) ; + + aMacroGraph->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ; + aMacroGraph->MacroObject( SUPERV::Graph::_duplicate( macroiobject ) ) ; + +// Set the GraphMacroNode ObjRef in the MacroNode + aMacroNode->CoupledNode( aMacroGraph ) ; + aMacroNode->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ; + } + } + } + } + } + } + + endService( "Graph_Impl::EditorLoadDataFlows" ); + return true ; +} + +bool Graph_Impl::LoadDataFlows( GraphExecutor::DataFlow * aDataFlowExecutor , + GraphBase::ListOfSGraphs * aListOfDataFlows , + int index ) { + beginService( "Graph_Impl::ExecutorLoadDataFlows" ) ; + MESSAGE("Graph_Impl::LoadDataFlows index " << index << " " << (*aListOfDataFlows)[index].Info.theName.c_str() ) ; + SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ; +// That method is recursive : +// At first we load the supergraph with index = 0 : +// (After we load the graph corresponding to each MacroNode :) + if ( !aDataFlowExecutor->LoadDataFlow( &(*aListOfDataFlows)[ index ] ) ) { + MESSAGE("Graph_Impl::LoadDataFlows failed" ) ; + return false ; + } +// That graph is not a StreamGraph : + else if ( !aDataFlowExecutor->Graph()->HasDataStream() ) { + aDataFlowExecutor->Graph()->Kind( SUPERV::DataFlowGraph ) ; + GraphEditor::DataFlow * aDataFlowEditor ; + aDataFlowEditor = theAutomaton->MapGraph( (*aListOfDataFlows)[index].Info.theName.c_str() )->GraphEditor() ; + aDataFlowEditor->Executor( aDataFlowExecutor ) ; + aDataFlowEditor->Graph()->SetGraphEditor( aDataFlowEditor ) ; + aDataFlowEditor->Graph()->SetGraphExecutor( aDataFlowExecutor ) ; + aDataFlowExecutor->Graph()->SetGraphEditor( aDataFlowEditor ) ; + aDataFlowExecutor->Graph()->SetGraphExecutor( aDataFlowExecutor ) ; + Graph_Impl * myGraph ; +// We create a Graph ObjRef for that graph + myGraph = new Graph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + aDataFlowExecutor , NULL ) ; + PortableServer::ObjectId * id = myGraph->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id) ; + iobject = SUPERV::Graph::_narrow( obj ) ; + myGraph->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ; + myGraph->DataFlowEditor( aDataFlowEditor ) ; + myGraph->DataFlowExecutor( aDataFlowExecutor ) ; + MESSAGE("ExecutorLoadDataFlows IsEditing " << myGraph->Name() << " " + << myGraph->DataFlowEditor() << " " << myGraph->DataFlowEditor()->IsEditing() << " " + << myGraph->DataFlowEditor()->Graph()->Name() << " " + << myGraph->DataFlowEditor()->Graph()->GraphEditor() << " " + << myGraph->DataFlowEditor()->Graph()->GraphEditor()->IsEditing() ) ; + GraphBase::Graph * aGraph = myGraph->DataFlowExecutor()->Graph() ; + int i ; +// For the supergraph or each graph of MacroNodes we search MacroNodes recursively : + for ( i = 0 ; i < aGraph->GraphNodesSize() ; i++ ) { + if ( aGraph->GraphNodes( i )->IsMacroNode() ) { + GraphBase::GOTONode * aMacroNode = (GraphBase::GOTONode * ) aGraph->GraphNodes( i ) ; + + + +// Creation of a GraphMacroNode ObjRef in the current executor + SUPERV::Graph_var macroiobject = SUPERV::Graph::_nil() ; + string aMacroNodeName = string( "Macro_" ) + string( aGraph->Name() ) ; + Graph_Impl * myMacroNode ; + myMacroNode = new Graph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + aMacroNodeName.c_str() , SUPERV::MacroNode ) ; + id = myMacroNode->getId() ; + obj = _poa->id_to_reference(*id); + macroiobject = SUPERV::Graph::_narrow( obj ) ; + myMacroNode->DataFlowEditor( DataFlowEditor() ) ; + myMacroNode->DataFlowExecutor( DataFlowExecutor() ) ; + aMacroNode->SetGraphEditor( DataFlowEditor() ) ; + GraphExecutor::InNode * aDataFlowExecutorNode = (GraphExecutor::InNode * ) aMacroNode->GetInNode() ; + myMacroNode->DataFlowNode( aDataFlowExecutorNode ) ; + aDataFlowExecutorNode->SetObjRef( SUPERV::CNode::_duplicate( SUPERV::CNode::_narrow( obj ) ) ) ; + aDataFlowExecutorNode->SetObjImpl( this ) ; + + char * aCoupledNodeName = aMacroNode->CoupledNodeName() ; + MESSAGE( "LoadDataFlows MacroNode " << aMacroNode->Name() << " --> " << aCoupledNodeName + << " to be searched among " << (*aListOfDataFlows).size() << " Graphs" ) ; + int index ; + for ( index = 0 ; index < (int ) (*aListOfDataFlows).size() ; index++ ) { + if ( !strcmp( aCoupledNodeName , (*aListOfDataFlows)[index].Info.theName.c_str() ) ) { + string dbgfile ; +// At first create the editor and a StreamGraph + GraphExecutor::DataFlow * aMacroGraphDataFlowExecutor ; + CreateEditor( _Orb , instanceName() , aCoupledNodeName , SUPERV::DataStreamGraph , + dbgfile , &aMacroGraphDataFlowExecutor ) ; +// if ( !aDataFlowEditor->LoadDataFlow( aDataFlowEditor , aListOfDataFlows , index ) ) { + MESSAGE( "RECURSIVE IMPORT OF GRAPHS OF MACRONODES :" << aCoupledNodeName ) ; + if ( !LoadDataFlows( aMacroGraphDataFlowExecutor , aListOfDataFlows , index ) ) { + MESSAGE("Graph_Impl::LoadDataFlows failed" ) ; + return false ; + } + +// That graph is not a StreamGraph : + else if ( !aMacroGraphDataFlowExecutor->Graph()->HasDataStream() ) { + aMacroGraphDataFlowExecutor->Graph()->Kind( SUPERV::DataFlowGraph ) ; + aMacroGraphDataFlowExecutor->Graph()->SetGraphExecutor( aMacroGraphDataFlowExecutor ) ; + GraphEditor::DataFlow * aDataFlow = theAutomaton->MapGraph( aCoupledNodeName )->GraphEditor() ; + if ( aDataFlow == NULL ) { + MESSAGE( "ExecutorLoadDataFlows NULL GraphEditor ERROR" ) ; + } + aMacroGraphDataFlowExecutor->Graph()->SetGraphEditor( aDataFlow ) ; + aMacroGraphDataFlowExecutor->Graph()->SetGraphExecutor( aMacroGraphDataFlowExecutor ) ; + aMacroGraphDataFlowExecutor->Graph()->SetGraphPorts() ; + Graph_Impl * myMacroGraph ; +// We create a Graph ObjRef for that graph + myMacroGraph = new Graph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + aMacroGraphDataFlowExecutor , NULL ) ; + PortableServer::ObjectId * id = myMacroGraph->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + SUPERV::Graph_var iobject = SUPERV::Graph::_narrow( obj ) ; + myMacroGraph->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ; + myMacroGraph->DataFlowEditor( aDataFlow ) ; + aDataFlow->Executor( aMacroGraphDataFlowExecutor ) ; + myMacroGraph->DebugFileName( (char * ) dbgfile.c_str() ) ; + + GraphBase::Graph * aMacroGraph = myMacroGraph->DataFlowExecutor()->Graph() ; + aMacroGraph->GraphMacroLevel( aGraph->GraphMacroLevel() + 1 ) ; + +// Set the MacroNode ObjRef in the GraphMacroNode + aMacroGraph->CoupledNode( aMacroNode ) ; + aMacroGraph->MacroObject( SUPERV::Graph::_duplicate( macroiobject ) ) ; + +// Set the GraphMacroNode ObjRef in the MacroNode + aMacroNode->CoupledNode( aMacroGraph ) ; + aMacroNode->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ; + + iobject->Run() ; + } + break ; + } + } + } + } + } + + endService( "Graph_Impl::ExecutorLoadDataFlows" ); + return true ; +} + +SUPERV::Graph_ptr Graph_Impl::MNode( const char * aXmlFileName ) { + beginService( "Graph_Impl::MNode" ); + SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ; + if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) { + GraphBase::ListOfSGraphs aListOfDataFlows ; + string dbgfile ; +// At first create the editor and a StreamGraph with the xml file + GraphEditor::DataFlow * aDataFlowEditor ; + CreateEditor( _Orb , instanceName() , aXmlFileName , SUPERV::DataStreamGraph , + dbgfile , &aDataFlowEditor ) ; + int lenname = strlen( aXmlFileName ) ; + bool loaded = false ; +// Import of the xml file + if ( lenname > 4 && !strcmp( &aXmlFileName[ lenname - 4 ] , ".xml" ) ) { + loaded = aDataFlowEditor->LoadXml( aXmlFileName , aListOfDataFlows ) ; + if ( loaded ) { + iobject = MNode( aDataFlowEditor , aListOfDataFlows ) ; + } + } + } + return iobject ; +} + +// WARNING : THIS IS COMPLICATED : +// I should have to remove duplicated code ... +SUPERV::Graph_ptr Graph_Impl::MNode( GraphEditor::DataFlow * aMacroGraphDataFlowEditor , + GraphBase::ListOfSGraphs aListOfDataFlows ) { + beginService( "Graph_Impl::MNode" ) ; + SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ; + SUPERV::Graph_var macroiobject = SUPERV::Graph::_nil() ; + + if ( !IsMacro() ) { + if ( !aMacroGraphDataFlowEditor->LoadDataFlow( &aListOfDataFlows[ 0 ] ) ) { + MESSAGE("Graph_Impl::MNode LoadDataFlow failed" ) ; + return false ; + } + +// That graph is not a StreamGraph : + else if ( !aMacroGraphDataFlowEditor->Graph()->HasDataStream() ) { + aMacroGraphDataFlowEditor->Graph()->Kind( SUPERV::DataFlowGraph ) ; + aMacroGraphDataFlowEditor->Graph()->SetGraphEditor( aMacroGraphDataFlowEditor ) ; + Graph_Impl * myMacroGraph ; +// We create a Graph ObjRef for that graph + myMacroGraph = new Graph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + aMacroGraphDataFlowEditor , NULL ) ; + PortableServer::ObjectId * id = myMacroGraph->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + iobject = SUPERV::Graph::_narrow( obj ) ; + myMacroGraph->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ; + + + +// Creation of a GraphMacroNode in the current editor + string aMacroNodeName = string( "Macro_" ) + string( myMacroGraph->Name() ) ; + Graph_Impl * myMacroNode ; + myMacroNode = new Graph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + aMacroNodeName.c_str() , SUPERV::MacroNode ) ; + id = myMacroNode->getId() ; + obj = _poa->id_to_reference(*id); + macroiobject = SUPERV::Graph::_narrow( obj ) ; + myMacroNode->DataFlowEditor( DataFlowEditor() ) ; + +// Creation of the MacroNode itself in the current Graph + GraphBase::ListOfFuncName aFuncName ; + aFuncName.resize( 1 ) ; + aFuncName[0] = "" ; + SUPERV::ListOfStrings aListOfStrings ; + aListOfStrings.length( 1 ) ; + aListOfStrings[0] = "" ; + GraphBase::ListOfPythonFunctions aPythonFunction ; + aPythonFunction.resize( 1 ) ; + aPythonFunction[0] = &aListOfStrings ; + SALOME_ModuleCatalog::Service * aMacroNodeService = myMacroGraph->Service() ; + GraphEditor::InNode * aDataFlowNode = DataFlowEditor()->AddNode( *aMacroNodeService , "" , "" , + aMacroNodeName.c_str() , SUPERV::MacroNode , + aFuncName , aPythonFunction ) ; + aDataFlowNode->SetPythonFunction( "" , aListOfStrings ) ; + myMacroNode->DataFlowNode( aDataFlowNode ) ; + aDataFlowNode->ComputingNode()->SetService( *aMacroNodeService ) ; + aDataFlowNode->SetObjRef( SUPERV::CNode::_duplicate( SUPERV::CNode::_narrow( obj ) ) ) ; + aDataFlowNode->SetObjImpl( this ) ; + + + + GraphBase::Graph * aGraph = myMacroGraph->DataFlowEditor()->Graph() ; + GraphBase::Graph * aGraphOfMacroGraph = myMacroNode->DataFlowEditor()->Graph() ; + GraphBase::Graph * aMacroGraph = myMacroNode->DataFlowNode()->GraphMacroNode() ; + aMacroGraph->Kind( SUPERV::MacroNode ) ; + aMacroGraph->SetGraphEditor( DataFlowEditor() ) ; +// Creation of the Ports of the MacroNode from the ports of the GraphMacroNode + aMacroGraph->SetMacroPorts( aGraph ) ; +// Valid ==> creation of Service and the ports of the current Graph + DataFlowEditor()->IsValid() ; +// Set the Input Datas from the GraphMacroNode to the current Graph + aMacroGraph->SetMacroDatas( aGraph , aGraphOfMacroGraph ) ; + aMacroGraphDataFlowEditor->UnValid() ; +// Set the MacroNode ObjRef in the GraphMacroNode + aGraph->CoupledNode( aMacroGraph ) ; + aGraph->MacroObject( SUPERV::Graph::_duplicate( macroiobject ) ) ; +// Set the GraphMacroNode ObjRef in the MacroNode + aMacroGraph->CoupledNode( aGraph ) ; + aMacroGraph->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ; +// aDataFlowNode->CoupledNode( aGraph ) ; +// aDataFlowNode->ComputingNode()->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ; +// Set the MacroLevel of that graph + aGraph->GraphMacroLevel( aGraphOfMacroGraph->GraphMacroLevel() + 1 ) ; + aMacroGraph->Coordinates( 0 , 0 ) ; + MESSAGE( "DataFlowNode Graph " << this << " DataFlowEditor " << DataFlowEditor() << " aDataFlowNode " + << aDataFlowNode << " " << aDataFlowNode->Name() << " created" ) ; + } + else { + delete aMacroGraphDataFlowEditor ; + } + } + endService( "Graph_Impl::MNode" ); + return SUPERV::Graph::_duplicate( macroiobject ) ; +} + +SUPERV::Graph_ptr Graph_Impl::GraphMNode( SUPERV::Graph_ptr myMacroGraph ) { + SUPERV::Graph_var iobject = myMacroGraph ; + beginService( "Graph_Impl::GraphMNode" ) ; + +// GraphBase::Graph * myMacroGraph = aGraph; + SUPERV::Graph_var macroiobject = SUPERV::StreamGraph::_nil() ; +// Creation of a GraphMacroNode in the current editor + if ( !IsMacro() ) { + string aMacroNodeName = string( "Macro_" ) + string( myMacroGraph->Name() ) ; + MESSAGE( "GraphMNode( " << myMacroGraph->Name() << " )" ) ; + Graph_Impl * myMacroNode ; + myMacroNode = new Graph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + aMacroNodeName.c_str() , SUPERV::MacroNode ) ; + PortableServer::ObjectId * id = myMacroNode->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + macroiobject = SUPERV::Graph::_narrow( obj ) ; + myMacroNode->DataFlowEditor( DataFlowEditor() ) ; + +// Creation of the MacroNode itself in the current Graph + GraphBase::ListOfFuncName aFuncName ; + aFuncName.resize( 1 ) ; + aFuncName[0] = "" ; + SUPERV::ListOfStrings aListOfStrings ; + aListOfStrings.length( 1 ) ; + aListOfStrings[0] = "" ; + GraphBase::ListOfPythonFunctions aPythonFunction ; + aPythonFunction.resize( 1 ) ; + aPythonFunction[0] = &aListOfStrings ; + SALOME_ModuleCatalog::Service * aMacroNodeService = myMacroGraph->Service() ; + GraphEditor::InNode * aDataFlowNode = DataFlowEditor()->AddNode( *aMacroNodeService , "" , "" , + aMacroNodeName.c_str() , SUPERV::MacroNode , + aFuncName , aPythonFunction ) ; + aDataFlowNode->SetPythonFunction( "" , aListOfStrings ) ; + myMacroNode->DataFlowNode( aDataFlowNode ) ; + aDataFlowNode->ComputingNode()->SetService( *aMacroNodeService ) ; + aDataFlowNode->SetObjRef( SUPERV::CNode::_duplicate( SUPERV::CNode::_narrow( obj ) ) ) ; + aDataFlowNode->SetObjImpl( this ) ; + + + +// GraphBase::Graph * aGraph = myMacroGraph->DataFlowEditor()->Graph() ; + GraphBase::Graph * aGraph = DataFlowEditor()->Automaton()->MapGraph( myMacroGraph->Name() ) ; + GraphBase::Graph * aGraphOfMacroGraph = myMacroNode->DataFlowEditor()->Graph() ; + GraphBase::Graph * aMacroGraph = myMacroNode->DataFlowNode()->GraphMacroNode() ; + aMacroGraph->Kind( SUPERV::MacroNode ) ; + aMacroGraph->SetGraphEditor( DataFlowEditor() ) ; +// Creation of the Ports of the MacroNode from the ports of the GraphMacroNode + aMacroGraph->SetMacroPorts( aGraph ) ; +// Valid ==> creation of Service and the ports of the current Graph + DataFlowEditor()->IsValid() ; +// Set the Input Datas from the GraphMacroNode to the current Graph + aMacroGraph->SetMacroDatas( aGraph , aGraphOfMacroGraph ) ; +// aMacroGraphDataFlowEditor->UnValid() ; + aGraph->GraphEditor()->UnValid() ; +// Set the MacroNode ObjRef in the GraphMacroNode + aGraph->CoupledNode( aMacroGraph ) ; + aGraph->MacroObject( SUPERV::Graph::_duplicate( macroiobject ) ) ; +// Set the GraphMacroNode ObjRef in the MacroNode + aMacroGraph->CoupledNode( aGraph ) ; + aMacroGraph->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ; +// aDataFlowNode->CoupledNode( aGraph ) ; +// aDataFlowNode->ComputingNode()->MacroObject( SUPERV::Graph::_duplicate( iobject ) ) ; +// Set the MacroLevel of that graph + aGraph->GraphMacroLevel( aGraphOfMacroGraph->GraphMacroLevel() + 1 ) ; + aMacroGraph->Coordinates( 0 , 0 ) ; + MESSAGE( aGraph->Name() << "->CoupledNode()->GraphEditor() : " << aGraph->CoupledNode()->GraphEditor() ) ; + MESSAGE( aMacroGraph->Name() << "->CoupledNode()->GraphEditor() : " << aMacroGraph->CoupledNode()->GraphEditor() ) ; + MESSAGE( "DataFlowNode Graph " << this << " DataFlowEditor " << DataFlowEditor() << " aDataFlowNode " + << aDataFlowNode << " " << aDataFlowNode->Name() << " created" ) ; + } + endService( "Graph_Impl::GraphMNode" ) ; + return SUPERV::Graph::_duplicate( macroiobject ) ; +} + +SUPERV::Graph_ptr Graph_Impl::FlowObjRef() { + beginService( "Graph_Impl::FlowObjRef" ); + SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ; + if ( IsMacro() ) { + iobject = SUPERV::Graph::_narrow( DataFlowNode()->GraphMacroNode()->MacroObject() ) ; + } + else if ( IsGraph() ) { + iobject = SUPERV::Graph::_narrow( DataFlowEditor()->Graph()->MacroObject() ) ; + } + if ( CORBA::is_nil( iobject ) ) { + MESSAGE( "Graph_Impl::FlowObjRef() returns a NIL Object" ) ; + } + endService( "Graph_Impl::FlowObjRef" ); + return SUPERV::Graph::_duplicate( iobject ) ; +} + +SUPERV::StreamGraph_ptr Graph_Impl::StreamObjRef() { + beginService( "Graph_Impl::StreamObjRef" ); + SUPERV::StreamGraph_var iobject = SUPERV::StreamGraph::_nil() ; + if ( IsMacro() ) { + iobject = SUPERV::StreamGraph::_narrow( DataFlowNode()->GraphMacroNode()->MacroObject() ) ; + } + else if ( IsGraph() || IsStreamGraph() ) { + iobject = SUPERV::StreamGraph::_narrow( DataFlowEditor()->Graph()->MacroObject() ) ; + } + if ( CORBA::is_nil( iobject ) ) { + MESSAGE( "Graph_Impl::StreamObjRef() returns a NIL Object" ) ; + } + endService( "Graph_Impl::StreamObjRef" ); + return SUPERV::StreamGraph::_duplicate( iobject ) ; +} SUPERV::CNode_ptr Graph_Impl::Node(char const * aNodeName ) { // beginService( "Graph_Impl::Node" ); @@ -482,12 +1036,14 @@ SUPERV::CNode_ptr Graph_Impl::Node(char const * aNodeName ) { else { iobject = DataFlowEditor()->GetNode( aNodeName )->ObjRef() ; */ - GraphEditor::InNode * anInNode = DataFlowEditor()->GetNode( aNodeName ) ; - if ( anInNode ) { - if ( CORBA::is_nil( anInNode->ObjRef() ) ) { - SetNodeObjRef( anInNode ) ; + if ( !IsMacro() ) { + GraphEditor::InNode * anInNode = DataFlowEditor()->GetNode( aNodeName ) ; + if ( anInNode ) { + if ( CORBA::is_nil( anInNode->ObjRef() ) ) { + SetNodeObjRef( anInNode ) ; + } + iobject = anInNode->ObjRef() ; } - iobject = anInNode->ObjRef() ; } // endService( "Graph_Impl::Node" ); return SUPERV::CNode::_duplicate( iobject ) ; @@ -498,7 +1054,7 @@ SUPERV::Link_ptr Graph_Impl::Link( SUPERV::Port_ptr OutPort , beginService( "Graph_Impl::Link" ); SUPERV::Link_var iobject = SUPERV::Link::_nil() ; if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && - !OutPort->IsDataStream() && !InPort->IsDataStream() ) { + !OutPort->IsDataStream() && !InPort->IsDataStream() && !IsMacro() ) { GraphBase::InPort * anInPort = DataFlowEditor()->GetNode( InPort->Node()->Name() )->ComputingNode()->GetChangeInPort( InPort->Name() ) ; GraphBase::OutPort * anOutPort = DataFlowEditor()->GetNode( OutPort->Node()->Name() )->ComputingNode()->GetChangeOutPort( OutPort->Name() ) ; if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { @@ -532,7 +1088,11 @@ SUPERV::Link_ptr Graph_Impl::Link( SUPERV::Port_ptr OutPort , return SUPERV::Link::_duplicate( iobject ) ; } +// Only to see MacroNodes with actual GUI ... : +#define GOTOMacroNode 0 + void Graph_Impl::SetNodeObjRef( GraphEditor::InNode * anInNode ) { + MESSAGE("Graph_Impl::SetNodeObjRef " << anInNode->Name() << " " << anInNode->Kind() ) ; CORBA::Object_var obj ; if ( anInNode->IsComputingNode() ) { CNode_Impl * myNode = new CNode_Impl( _Orb , _Poa , _ContId , @@ -564,7 +1124,14 @@ void Graph_Impl::SetNodeObjRef( GraphEditor::InNode * anInNode ) { SUPERV::INode_var iobject = SUPERV::INode::_narrow(obj) ; myNode->SetObjRef( SUPERV::INode::_duplicate( iobject ) ) ; } +#if GOTOMacroNode + else if ( anInNode->IsGOTONode() || anInNode->IsMacroNode() ) { + if ( anInNode->IsMacroNode() ) { + anInNode->ComputingNode()->Kind( SUPERV::GOTONode ) ; + } +#else else if ( anInNode->IsGOTONode() ) { +#endif GNode_Impl * myNode = new GNode_Impl( _Orb , _Poa , _ContId , instanceName() , interfaceName() , DataFlowEditor() , @@ -574,6 +1141,16 @@ void Graph_Impl::SetNodeObjRef( GraphEditor::InNode * anInNode ) { SUPERV::GNode_var iobject = SUPERV::GNode::_narrow(obj) ; myNode->SetObjRef( SUPERV::GNode::_duplicate( iobject ) ) ; } + else if ( anInNode->IsMacroNode() ) { + Graph_Impl * myNode = new Graph_Impl( _Orb , _Poa , _ContId , + instanceName() , interfaceName() , + DataFlowEditor() , + anInNode ) ; + PortableServer::ObjectId * id = myNode->getId() ; + obj = _poa->id_to_reference(*id); + SUPERV::Graph_var iobject = SUPERV::Graph::_narrow(obj) ; + myNode->SetObjRef( SUPERV::Graph::_duplicate( iobject ) ) ; + } else if ( anInNode->IsLoopNode() ) { LNode_Impl * myNode = new LNode_Impl( _Orb , _Poa , _ContId , instanceName() , interfaceName() , @@ -619,9 +1196,10 @@ void Graph_Impl::SetNodeObjRef( GraphEditor::InNode * anInNode ) { SUPERV::ListOfNodes_var Graph_Impl::SetNode( SUPERV::ListOfNodes_var RetVal , GraphBase::ComputingNode * aNode ) { int index = 0 ; - if ( _DataFlowExecutor ) { +// if ( _DataFlowExecutor ) { + if ( DataFlowExecutor() ) { MESSAGE("Graph_Impl::SetNode " << aNode->Name() << " " << aNode->Kind() << " " - << _DataFlowExecutor->StateName( _DataFlowExecutor->AutomatonState( aNode->Name() ) ) ) ; + << DataFlowExecutor()->StateName( DataFlowExecutor()->AutomatonState( aNode->Name() ) ) ) ; } else { MESSAGE("Graph_Impl::SetNode " << aNode->Name() << " " << aNode->Kind() ) ; @@ -638,10 +1216,18 @@ SUPERV::ListOfNodes_var Graph_Impl::SetNode( SUPERV::ListOfNodes_var RetVal , index = RetVal->INodes.length() ; RetVal->INodes.length( index+1 ); } +#if GOTOMacroNode + else if ( aNode->IsGOTONode() || aNode->IsMacroNode() ) { +#else else if ( aNode->IsGOTONode() ) { +#endif index = RetVal->GNodes.length() ; RetVal->GNodes.length( index+1 ); } + else if ( aNode->IsMacroNode() ) { + index = RetVal->Graphs.length() ; + RetVal->Graphs.length( index+1 ); + } else if ( aNode->IsLoopNode() ) { index = RetVal->LNodes.length() ; RetVal->LNodes.length( index+1 ); @@ -671,9 +1257,16 @@ SUPERV::ListOfNodes_var Graph_Impl::SetNode( SUPERV::ListOfNodes_var RetVal , else if ( aNode->IsInLineNode() ) { RetVal->INodes[index] = SUPERV::INode::_duplicate( SUPERV::INode::_narrow( aNodeObjRef ) ) ; } +#if GOTOMacroNode + else if ( aNode->IsGOTONode() || aNode->IsMacroNode() ) { +#else else if ( aNode->IsGOTONode() ) { +#endif RetVal->GNodes[index] = SUPERV::GNode::_duplicate( SUPERV::GNode::_narrow( aNodeObjRef ) ) ; } + else if ( aNode->IsMacroNode() ) { + RetVal->Graphs[index] = SUPERV::Graph::_duplicate( SUPERV::Graph::_narrow( aNodeObjRef ) ) ; + } else if ( aNode->IsLoopNode() ) { RetVal->LNodes[index] = SUPERV::LNode::_duplicate( SUPERV::LNode::_narrow( aNodeObjRef ) ) ; } @@ -698,29 +1291,59 @@ SUPERV::ListOfNodes * Graph_Impl::Nodes() { RetVal->LNodes.length(0) ; RetVal->SNodes.length(0) ; RetVal->GNodes.length(0) ; - int i ; - for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) { - GraphBase::ComputingNode * aNode = DataFlowEditor()->Graph()->GraphNodes( i ) ; - RetVal = SetNode( RetVal , aNode ) ; - } + RetVal->Graphs.length(0) ; + if ( !IsMacro() ) { + int i ; + for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) { + GraphBase::ComputingNode * aNode = DataFlowEditor()->Graph()->GraphNodes( i ) ; + RetVal = SetNode( RetVal , aNode ) ; + } #if 0 - char * aStateG = "" ; - if ( _DataFlowExecutor ) { - aStateG = (char *) _DataFlowExecutor->StateName( _DataFlowExecutor->AutomatonState() ) ; - } - MESSAGE("Graph_Impl::Nodes GraphState " << aStateG - << " CNodes " << RetVal->CNodes.length() - << " FNodes " << RetVal->FNodes.length() - << " INodes " << RetVal->INodes.length() - << " GNodes " << RetVal->GNodes.length() - << " LNodes " << RetVal->LNodes.length() - << " ELNodes " << RetVal->ELNodes.length() - << " SNodes " << RetVal->SNodes.length() - << " ESNodes " << RetVal->ESNodes.length() ) ; - if ( _DataFlowExecutor ) { - _DataFlowExecutor->EventList() ; - } + char * aStateG = "" ; + if ( DataFlowExecutor() ) { + aStateG = (char *) DataFlowExecutor()->StateName( DataFlowExecutor()->AutomatonState() ) ; + } + MESSAGE("Graph_Impl::Nodes GraphState " << aStateG << " CNodes " << RetVal->CNodes.length() ) ; + for ( i = 0 ; i < RetVal->CNodes.length() ; i++ ) { + MESSAGE(" " << RetVal->CNodes[ i ] ->Name() ) ; + } + MESSAGE("FNodes " << RetVal->FNodes.length() ) ; + for ( i = 0 ; i < RetVal->FNodes.length() ; i++ ) { + MESSAGE(" " << RetVal->FNodes[ i ] ->Name() ) ; + } + MESSAGE("INodes " << RetVal->INodes.length() ) ; + for ( i = 0 ; i < RetVal->INodes.length() ; i++ ) { + MESSAGE(" " << RetVal->INodes[ i ] ->Name() ) ; + } + MESSAGE("GNodes " << RetVal->GNodes.length() ) ; + for ( i = 0 ; i < RetVal->GNodes.length() ; i++ ) { + MESSAGE(" " << RetVal->GNodes[ i ] ->Name() ) ; + } + MESSAGE("LNodes " << RetVal->LNodes.length() ) ; + for ( i = 0 ; i < RetVal->LNodes.length() ; i++ ) { + MESSAGE(" " << RetVal->LNodes[ i ] ->Name() ) ; + } + MESSAGE("ELNodes " << RetVal->ELNodes.length() ) ; + for ( i = 0 ; i < RetVal->ELNodes.length() ; i++ ) { + MESSAGE(" " << RetVal->ELNodes[ i ] ->Name() ) ; + } + MESSAGE("SNodes " << RetVal->SNodes.length() ) ; + for ( i = 0 ; i < RetVal->SNodes.length() ; i++ ) { + MESSAGE(" " << RetVal->SNodes[ i ] ->Name() ) ; + } + MESSAGE("ESNodes " << RetVal->ESNodes.length() ) ; + for ( i = 0 ; i < RetVal->ESNodes.length() ; i++ ) { + MESSAGE(" " << RetVal->ESNodes[ i ] ->Name() ) ; + } + MESSAGE("Graphs " << RetVal->Graphs.length() ) ; + for ( i = 0 ; i < RetVal->Graphs.length() ; i++ ) { + MESSAGE(" " << RetVal->Graphs[ i ] ->Name() ) ; + } + if ( DataFlowExecutor() ) { + DataFlowExecutor()->EventList() ; + } #endif + } endService( "Graph_Impl::Nodes" ); return ( RetVal._retn() ) ; } @@ -734,237 +1357,267 @@ SUPERV::ListOfLinks * Graph_Impl::Links( GraphBase::ComputingNode * theNode , bool begin = true ; SUPERV::ListOfLinks_var RetVal = new SUPERV::ListOfLinks ; RetVal->length( 0 ) ; - int i , j , countlink ; - countlink = 0 ; - for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) { - GraphEditor::InNode * aNode = NULL ; - aNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GraphNodes( i )->GetInNode() ; - bool ToProcess = false ; - if ( theNode == NULL ) { - ToProcess = true ; - } - else { - if ( !strcmp( theNode->Name() , aNode->Name() ) ) { - if ( !theNode->IsEndSwitchNode() ) { - ToProcess = true ; - } - } - else if ( theNode->IsEndSwitchNode() ) { + if ( !IsMacro() ) { + int i , j , countlink ; + countlink = 0 ; + for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) { + GraphEditor::InNode * aNode = NULL ; + aNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GraphNodes( i )->GetInNode() ; + bool ToProcess = false ; + if ( theNode == NULL ) { ToProcess = true ; } - } - if ( ToProcess ) { - for ( j = 0 ; j < aNode->GetNodeInPortsSize() ; j++ ) { - GraphBase::InPort * anInPort = NULL ; - anInPort = aNode->GetChangeNodeInPort( j ) ; - if ( anInputParam == NULL || - !strcmp( anInPort->PortName() , anInputParam ) ) { - GraphBase::OutPort * anOutPort = NULL ; - anOutPort = anInPort->GetOutPort() ; - if ( anOutPort && !anOutPort->IsDataStream() ) { - if ( strcmp( anOutPort->NodeName() , Name() ) ) { -// MESSAGE("Graph_Impl::Links " << anOutPort->NodeName() << "(" -// << anOutPort->PortName() << ") --> " << aNode->Name() << "(" -// << anInPort->PortName() << ")" ) ; - if ( theNode == NULL || - ( theNode != NULL && !theNode->IsEndSwitchNode() && - !strcmp( theNode->Name() , aNode->Name() ) ) ) { - if ( anInPort->IsLoop() || anOutPort->IsLoop() || - ( aNode->IsEndLoopNode() && !strcmp( aNode->CoupledNode()->Name() , - anOutPort->NodeName() ) ) ) { -// MESSAGE( "Link " << anOutPort->NodeName() << "(" -// << anOutPort->PortName() << ") --> " << aNode->Name() << "(" -// << anInPort->PortName() << ")" << " ignored" ) ; - } - else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { - if ( begin ) { - beginService( "Graph_Impl::Links" ); - begin = false ; - } - GraphEditor::InNode * anOutNode = NULL ; - anOutNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anOutPort->NodeName() )->GetInNode() ; - if ( anOutNode ) { - bool Success ; - Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId , - instanceName() , interfaceName() , - DataFlowEditor() , - aNode , - anInPort->PortName() , - anOutNode , - anOutPort->PortName() , - false , true , Success ) ; - if ( Success ) { - PortableServer::ObjectId * id = myLink->getId() ; - CORBA::Object_var obj = _poa->id_to_reference(*id); - SUPERV::Link_var iobject ; - iobject = SUPERV::Link::_narrow(obj) ; - RetVal->length( countlink + 1 ) ; - RetVal[ countlink++ ] = SUPERV::Link::_duplicate( iobject ) ; - anOutPort->AddInPortObjRef( anInPort , SUPERV::Link::_duplicate( iobject ) ) ; - } - } - } - else { - RetVal->length( countlink + 1 ) ; - RetVal[ countlink++ ] = SUPERV::Link::_duplicate( anOutPort->InPortObjRef( anInPort ) ) ; - } -// MESSAGE( "Link " << anOutPort->NodeName() << "(" -// << anOutPort->PortName() << ") --> " << aNode->Name() << "(" -// << anInPort->PortName() << ")" << " selected" ) ; - } - else { -// MESSAGE( "Link " << anOutPort->NodeName() << "(" -// << anOutPort->PortName() << ") --> " << aNode->Name() << "(" -// << anInPort->PortName() << ")" << " skipped" ) ; - } - } - } - } + else { + if ( !strcmp( theNode->Name() , aNode->Name() ) ) { + if ( !theNode->IsEndSwitchNode() ) { + ToProcess = true ; + } + } + else if ( theNode->IsEndSwitchNode() ) { + ToProcess = true ; + } } - } - for ( j = 0 ; j < aNode->GetNodeOutPortsSize() ; j++ ) { - GraphBase::OutPort * anOutPort = aNode->GetChangeNodeOutPort( j ) ; - int k ; - for ( k = 0 ; k < anOutPort->InPortsSize() ; k++ ) { - GraphBase::InPort * anInPort = anOutPort->ChangeInPorts( k ) ; - GraphEditor::InNode * toNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ; - if ( theNode == NULL || - !strcmp( theNode->Name() , aNode->Name() ) ) { - if ( !anInPort->IsDataStream() ) { - if ( theNode || ( toNode->IsEndSwitchNode() && !aNode->IsSwitchNode() ) ) { - if ( anInputParam == NULL || - !strcmp( anInPort->PortName() , anInputParam ) ) { - if ( anInPort->IsLoop() || anOutPort->IsLoop() || - ( toNode->IsEndLoopNode() && !strcmp( toNode->CoupledNode()->Name() , - anOutPort->NodeName() ) ) ) { -// MESSAGE( "Link " << anOutPort->NodeName() << "(" -// << anOutPort->PortName() << ") --> " << toNode->Name() << "(" -// << anInPort->PortName() << ")" << " ignored" ) ; - } - else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { - if ( begin ) { - beginService( "Graph_Impl::Links" ); - begin = false ; - } - bool Success ; - Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId , - instanceName() , interfaceName() , - DataFlowEditor() , - toNode , - anInPort->PortName() , - aNode , - anOutPort->PortName() , - false , true , Success ) ; - if ( Success ) { - PortableServer::ObjectId * id = myLink->getId() ; - CORBA::Object_var obj = _poa->id_to_reference(*id); - SUPERV::Link_var iobject ; - iobject = SUPERV::Link::_narrow(obj) ; - RetVal->length( countlink + 1 ) ; - RetVal[ countlink++ ] = SUPERV::Link::_duplicate( iobject ) ; - anOutPort->AddInPortObjRef( anInPort , SUPERV::Link::_duplicate( iobject ) ) ; + if ( ToProcess ) { + for ( j = 0 ; j < aNode->GetNodeInPortsSize() ; j++ ) { + GraphBase::InPort * anInPort = NULL ; + anInPort = aNode->GetChangeNodeInPort( j ) ; + if ( anInputParam == NULL || + !strcmp( anInPort->PortName() , anInputParam ) ) { + GraphBase::OutPort * anOutPort = NULL ; + anOutPort = anInPort->GetOutPort() ; + if ( anOutPort && !anOutPort->IsDataStream() ) { + if ( strcmp( anOutPort->NodeName() , Name() ) ) { +// MESSAGE("Graph_Impl::Links " << anOutPort->NodeName() << "(" +// << anOutPort->PortName() << ") --> " << aNode->Name() << "(" +// << anInPort->PortName() << ")" ) ; + if ( theNode == NULL || + ( theNode != NULL && !theNode->IsEndSwitchNode() && + !strcmp( theNode->Name() , aNode->Name() ) ) ) { + if ( anInPort->IsLoop() || anOutPort->IsLoop() || + ( aNode->IsEndLoopNode() && !strcmp( aNode->CoupledNode()->Name() , + anOutPort->NodeName() ) ) ) { +// MESSAGE( "Link " << anOutPort->NodeName() << "(" +// << anOutPort->PortName() << ") --> " << aNode->Name() << "(" +// << anInPort->PortName() << ")" << " ignored" ) ; } + else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { + if ( begin ) { + beginService( "Graph_Impl::Links" ); + begin = false ; + } + GraphEditor::InNode * anOutNode = NULL ; + anOutNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anOutPort->NodeName() )->GetInNode() ; + if ( anOutNode ) { + bool Success ; + Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId , + instanceName() , interfaceName() , + DataFlowEditor() , + aNode , + anInPort->PortName() , + anOutNode , + anOutPort->PortName() , + false , true , Success ) ; + if ( Success ) { + PortableServer::ObjectId * id = myLink->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + SUPERV::Link_var iobject ; + iobject = SUPERV::Link::_narrow(obj) ; + RetVal->length( countlink + 1 ) ; + RetVal[ countlink++ ] = SUPERV::Link::_duplicate( iobject ) ; + anOutPort->AddInPortObjRef( anInPort , SUPERV::Link::_duplicate( iobject ) ) ; + } + } + } + else { + RetVal->length( countlink + 1 ) ; + RetVal[ countlink++ ] = SUPERV::Link::_duplicate( anOutPort->InPortObjRef( anInPort ) ) ; + } +// MESSAGE( "Link " << anOutPort->NodeName() << "(" +// << anOutPort->PortName() << ") --> " << aNode->Name() << "(" +// << anInPort->PortName() << ")" << " selected" ) ; } else { - RetVal->length( countlink + 1 ) ; - RetVal[ countlink++ ] = SUPERV::Link::_duplicate( SUPERV::Link::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ; +// MESSAGE( "Link " << anOutPort->NodeName() << "(" +// << anOutPort->PortName() << ") --> " << aNode->Name() << "(" +// << anInPort->PortName() << ")" << " skipped" ) ; } -// MESSAGE( "Link " << anOutPort->NodeName() << "(" -// << anOutPort->PortName() << ") --> " << toNode->Name() << "(" -// << anInPort->PortName() << ")" << " selected" ) ; } - else { -// MESSAGE( "Link " << anOutPort->NodeName() << "(" -// << anOutPort->PortName() << ") --> " << toNode->Name() << "(" -// << anInPort->PortName() << ")" << " skipped" ) ; + } + } + } + } + for ( j = 0 ; j < aNode->GetNodeOutPortsSize() ; j++ ) { + GraphBase::OutPort * anOutPort = aNode->GetChangeNodeOutPort( j ) ; +// MESSAGE( "Graph_Impl::Links " << aNode->Name() << " Out" << j << " " << anOutPort->PortName() << " " +// << anOutPort->PortStatus() << " PortConnected to " << anOutPort->InPortsSize() << " InPorts" ) ; + int k ; + for ( k = 0 ; k < anOutPort->InPortsSize() ; k++ ) { + GraphBase::InPort * anInPort = anOutPort->ChangeInPorts( k ) ; +// MESSAGE( " --> In" << k << " " << anInPort->NodeName() << " " << anInPort->PortName() +// << " " << anInPort->PortStatus() ) ; + if ( !anInPort->IsExternConnected() ) { + GraphEditor::InNode * toNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ; + if ( theNode == NULL || + !strcmp( theNode->Name() , aNode->Name() ) ) { + if ( !anInPort->IsDataStream() ) { + if ( theNode || ( toNode->IsEndSwitchNode() && !aNode->IsSwitchNode() ) ) { + if ( anInputParam == NULL || + !strcmp( anInPort->PortName() , anInputParam ) ) { + if ( anInPort->IsLoop() || anOutPort->IsLoop() || + ( toNode->IsEndLoopNode() && !strcmp( toNode->CoupledNode()->Name() , + anOutPort->NodeName() ) ) ) { +// MESSAGE( "Link " << anOutPort->NodeName() << "(" +// << anOutPort->PortName() << ") --> " << toNode->Name() << "(" +// << anInPort->PortName() << ")" << " ignored" ) ; + } + else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { + if ( begin ) { + beginService( "Graph_Impl::Links" ); + begin = false ; + } + bool Success ; + Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId , + instanceName() , interfaceName() , + DataFlowEditor() , + toNode , + anInPort->PortName() , + aNode , + anOutPort->PortName() , + false , true , Success ) ; + if ( Success ) { + PortableServer::ObjectId * id = myLink->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + SUPERV::Link_var iobject ; + iobject = SUPERV::Link::_narrow(obj) ; + RetVal->length( countlink + 1 ) ; + RetVal[ countlink++ ] = SUPERV::Link::_duplicate( iobject ) ; + anOutPort->AddInPortObjRef( anInPort , SUPERV::Link::_duplicate( iobject ) ) ; + } + } + else { + RetVal->length( countlink + 1 ) ; + RetVal[ countlink++ ] = SUPERV::Link::_duplicate( SUPERV::Link::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ; + } +// MESSAGE( "Link " << anOutPort->NodeName() << "(" +// << anOutPort->PortName() << ") --> " << toNode->Name() << "(" +// << anInPort->PortName() << ")" << " selected" ) ; + } + else { +// MESSAGE( "Link " << anOutPort->NodeName() << "(" +// << anOutPort->PortName() << ") --> " << toNode->Name() << "(" +// << anInPort->PortName() << ")" << " skipped" ) ; + } + } } } } } } } - } + #if 0 - const char * NodeName = "" ; - const char * InputParamName = "" ; - if ( theNode ) { - NodeName = theNode->Name() ; - } - if ( anInputParam ) { - InputParamName = anInputParam ; - } - MESSAGE( RetVal->length() << " Links of Node " << NodeName << " and of InPort " << InputParamName ) ; - for ( i = 0 ; i < (int ) RetVal->length() ; i++ ) { - MESSAGE( "Link " << RetVal[i]->OutPort()->Node()->Name() << "(" - << RetVal[i]->OutPort()->Name() << ") --> " - << RetVal[i]->InPort()->Node()->Name() << "(" - << RetVal[i]->InPort()->Name() << ")" ) ; - } + const char * NodeName = "" ; + const char * InputParamName = "" ; + if ( theNode ) { + NodeName = theNode->Name() ; + } + if ( anInputParam ) { + InputParamName = anInputParam ; + } + MESSAGE( RetVal->length() << " Links of Node " << NodeName << " and of InPort " << InputParamName ) ; + for ( i = 0 ; i < (int ) RetVal->length() ; i++ ) { + MESSAGE( "Link " << RetVal[i]->OutPort()->Node()->Name() << "(" + << RetVal[i]->OutPort()->Name() << ") --> " + << RetVal[i]->InPort()->Node()->Name() << "(" + << RetVal[i]->InPort()->Name() << ")" ) ; + } #endif - if ( !begin ) { - endService( "Graph_Impl::Links" ); + if ( !begin ) { + endService( "Graph_Impl::Links" ); + } } return ( RetVal._retn() ) ; } Engines::Component_ptr Graph_Impl::ComponentRef( const char * aComputerContainer , const char * aComponentName ) { - Engines::Container_var myContainer ; - Engines::Component_var objComponent ; - DataFlowEditor()->Graph()->StartComponent( 0 , aComputerContainer , aComponentName , - myContainer , objComponent ) ; + Engines::Component_var objComponent = Engines::Component::_nil() ; + if ( !IsMacro() ) { + Engines::Container_var myContainer ; + DataFlowEditor()->Graph()->StartComponent( 0 , aComputerContainer , aComponentName , + myContainer , objComponent ) ; + } return Engines::Component::_duplicate( objComponent ) ; } bool Graph_Impl::IsValid() { // beginService( "Graph_Impl::IsValid" ); - bool RetVal = DataFlowEditor()->IsValid() ; + bool RetVal = false ; + if ( !IsMacro() ) { + RetVal = DataFlowEditor()->IsValid() ; + } // endService( "Graph_Impl::IsValid" ); return RetVal ; } bool Graph_Impl::IsExecutable() { // beginService( "Graph_Impl::IsExecutable" ); - bool RetVal = DataFlowEditor()->IsExecutable() ; + bool RetVal = false ; + if ( !IsMacro() ) { + RetVal = DataFlowEditor()->IsExecutable() ; + } // endService( "Graph_Impl::IsExecutable" ); return RetVal ; } bool Graph_Impl::IsEditing() { // beginService( "Graph_Impl::IsEditing" ); - bool RetVal = DataFlowEditor()->IsEditing() ; + bool RetVal = false ; + if ( !IsMacro() ) { + RetVal = DataFlowEditor()->IsEditing() ; + } // endService( "Graph_Impl::IsEditing" ); return RetVal ; } bool Graph_Impl::IsExecuting() { // beginService( "Graph_Impl::IsExecuting" ); - bool RetVal = !DataFlowEditor()->IsEditing() ; + bool RetVal = false ; + if ( !IsMacro() ) { + RetVal = !DataFlowEditor()->IsEditing() ; + } // endService( "Graph_Impl::IsExecuting" ); return RetVal ; } bool Graph_Impl::IsReadOnly() { // beginService( "Graph_Impl::IsExecuting" ); - bool RetVal = DataFlowEditor()->IsReadOnly() ; + bool RetVal = false ; + if ( !IsMacro() ) { + RetVal = DataFlowEditor()->IsReadOnly() ; + } // endService( "Graph_Impl::IsExecuting" ); return RetVal ; } long Graph_Impl::LevelMax() { // beginService( "Graph_Impl::LevelMax" ); - long RetVal = DataFlowEditor()->LevelMax() ; + long RetVal = 0 ; + if ( !IsMacro() ) { + RetVal = DataFlowEditor()->LevelMax() ; + } // endService( "Graph_Impl::LevelMax" ); return RetVal ; } SUPERV::ListOfNodes * Graph_Impl::LevelNodes(long aLevel ) { // beginService( "Graph_Impl::LevelNodes" ); SUPERV::ListOfNodes_var RetVal = new SUPERV::ListOfNodes; - int i ; - SUPERV::ListOfStrings_var Nodes = DataFlowEditor()->LevelNodes( aLevel ) ; + if ( !IsMacro() ) { + int i ; + SUPERV::ListOfStrings_var Nodes = DataFlowEditor()->LevelNodes( aLevel ) ; // RetVal->length( Nodes->length() ); - for ( i = 0 ; i < (int ) Nodes->length() ; i++ ) { + for ( i = 0 ; i < (int ) Nodes->length() ; i++ ) { // char * aNode = Nodes[ i ] ; - GraphBase::ComputingNode * aNode = DataFlowEditor()->Graph()->GetChangeGraphNode( Nodes[ i ] ) ; - RetVal = SetNode( RetVal , aNode ) ; + GraphBase::ComputingNode * aNode = DataFlowEditor()->Graph()->GetChangeGraphNode( Nodes[ i ] ) ; + RetVal = SetNode( RetVal , aNode ) ; // cout << "Graph_Impl::LevelNodes( " << aLevel << " ) " << aNode->Name() << endl ; // CNode_Impl * myNode = new CNode_Impl( _Orb , _Poa , _ContId , // instanceName() , interfaceName() , @@ -975,25 +1628,35 @@ SUPERV::ListOfNodes * Graph_Impl::LevelNodes(long aLevel ) { // SUPERV::CNode_var iobject ; // iobject = SUPERV::CNode::_narrow(obj) ; // RetVal[i] = SUPERV::CNode::_duplicate( iobject ) ; + } } // endService( "Graph_Impl::LevelNodes" ); return ( RetVal._retn() ) ; } long Graph_Impl::ThreadsMax() { // beginService( "Graph_Impl::ThreadsMax" ); - long RetVal = DataFlowEditor()->ThreadsMax() ; + long RetVal = 0 ; + if ( !IsMacro() ) { + RetVal = DataFlowEditor()->ThreadsMax() ; + } // endService( "Graph_Impl::ThreadsMax" ); return RetVal ; } long Graph_Impl::Threads() { // beginService( "Node_Impl::Threads" ); - long RetVal = _DataFlowExecutor->Threads() ; + long RetVal = false ; + if ( !IsMacro() ) { + RetVal = DataFlowExecutor()->Threads() ; + } // endService( "Node_Impl::Threads" ); return RetVal ; } long Graph_Impl::SuspendedThreads() { // beginService( "Node_Impl::SuspendedThreads" ); - long RetVal = _DataFlowExecutor->SuspendedThreads() ; + long RetVal = false ; + if ( !IsMacro() ) { + RetVal = DataFlowExecutor()->SuspendedThreads() ; + } // endService( "Node_Impl::SuspendedThreads" ); return RetVal ; } @@ -1005,34 +1668,46 @@ bool Graph_Impl::Begin() { perror("pthread_mutex_lock _MutexExecutorWait") ; exit( 0 ) ; } - if ( _DataFlowExecutor ) { - MESSAGE( "Graph_Impl::Begin " << _DataFlowExecutor->Threads() << " threads" ) - if ( _DataFlowExecutor->Threads() ) { - _DataFlowExecutor->JoinedWait() ; + if ( DataFlowExecutor() ) { + MESSAGE( "Graph_Impl::Begin " << DataFlowExecutor()->Threads() << " threads" ) + if ( DataFlowExecutor()->Threads() ) { + DataFlowExecutor()->JoinedWait() ; } - delete _DataFlowExecutor ; - _DataFlowExecutor = NULL ; + delete DataFlowExecutor() ; + DataFlowExecutor( NULL ) ; DataFlowEditor()->Executor( NULL ) ; } - DataFlowEditor()->EditedAfterExecution( false ) ; - int _ExecNumber = theAutomaton->ExecNumber() ; - char ExecNumber[30] ; - sprintf( ExecNumber , "_%d" , _ExecNumber ) ; - int len = strlen( _DebugFileName ) ; - char * DebugFileName = new char [ len + strlen( ExecNumber ) + 6 ] ; - strncpy( DebugFileName , _DebugFileName , len - 4 ) ; - DebugFileName[ len - 4 ] = '\0' ; - strcat( DebugFileName , ExecNumber ) ; - strcat( DebugFileName , "_Exec.log" ) ; - GraphBase::SGraph * myGraph = DataFlowEditor()->GetDataFlow() ; - _DataFlowExecutor = new GraphExecutor::DataFlow( _Orb , _NamingService , - myGraph->Info.theName.c_str() , - DebugFileName , Kind() ) ; - MESSAGE( "Graph_Impl::Begin : DataFlowExecutor created" ); - RetVal = _DataFlowExecutor->LoadDataFlow( *myGraph ) ; - if ( RetVal ) { - _DataFlowExecutor->Graph()->SetObjImpl( DataFlowEditor()->Graph()->ObjImpl() ) ; - DataFlowEditor()->Executor( _DataFlowExecutor ) ; + if ( DataFlowEditor()->IsExecutable() ) { + DataFlowEditor()->EditedAfterExecution( false ) ; + int _ExecNumber = theAutomaton->ExecNumber() ; + char ExecNumber[30] ; + sprintf( ExecNumber , "_%d" , _ExecNumber ) ; + int len = strlen( _DebugFileName ) ; + char * DebugFileName = new char [ len + strlen( ExecNumber ) + 6 ] ; + strncpy( DebugFileName , _DebugFileName , len - 4 ) ; + DebugFileName[ len - 4 ] = '\0' ; + strcat( DebugFileName , ExecNumber ) ; + strcat( DebugFileName , "_Exec.log" ) ; + GraphExecutor::DataFlow * aDataFlowExecutor ; + GraphBase::ListOfSGraphs * myListOfGraphs = DataFlowEditor()->GetDataFlows() ; + int i ; + for ( i = 0 ; i < (int ) myListOfGraphs->size() ; i++ ) { + GraphEditor::DataFlow * aDataFlowEditor ; + aDataFlowEditor = theAutomaton->MapGraph( (*myListOfGraphs)[ i ].Info.theName.c_str() )->GraphEditor() ; + MESSAGE("myListOfGraphs" << i << " " << (*myListOfGraphs)[ i ].Info.theName.c_str() << " " + << aDataFlowEditor << " IsEditing " << aDataFlowEditor->IsEditing() ) ; + + } + aDataFlowExecutor = new GraphExecutor::DataFlow( _Orb , _NamingService , + (*myListOfGraphs)[ 0 ].Info.theName.c_str() , + DebugFileName , Kind() ) ; + DataFlowExecutor( aDataFlowExecutor ) ; + MESSAGE( "Graph_Impl::Begin : DataFlowExecutor created" ); + RetVal = LoadDataFlows( DataFlowExecutor() , myListOfGraphs , 0 ) ; + if ( RetVal ) { + DataFlowExecutor()->Graph()->SetObjImpl( DataFlowEditor()->Graph()->ObjImpl() ) ; + DataFlowEditor()->Executor( DataFlowExecutor() ) ; + } } if ( pthread_mutex_unlock( &_MutexExecutorWait ) ) { perror("pthread_mutex_unlock _MutexExecutorWait") ; @@ -1044,16 +1719,28 @@ bool Graph_Impl::Begin() { bool Graph_Impl::Run() { beginService( "Graph_Impl::Run" ); bool RetVal = false ; - if ( DataFlowEditor()->IsEditing() ) { - MESSAGE( "Graph_Impl::Run IsEditing" ); - RetVal = Begin() ; + if ( DataFlowEditor()->IsEditing() && !IsMacro() ) { + MESSAGE( "Graph_Impl::Run " << DataFlowEditor()->Graph()->Name() << " " << DataFlowEditor() << " IsEditing" ); + if ( DataFlowEditor()->Graph()->GraphMacroLevel() ) { + MESSAGE( "Graph_Impl::Run " << DataFlowEditor()->Graph()->Name() << " GraphMacroLevel " + << DataFlowEditor()->Graph()->GraphMacroLevel() ) ; + RetVal = true ; + } + else { + MESSAGE( "Graph_Impl::Run " << DataFlowEditor()->Graph()->Name() << " GraphMacroLevel " + << DataFlowEditor()->Graph()->GraphMacroLevel() << " --> Begin()" ) ; + RetVal = Begin() ; + } if ( RetVal ) { - MESSAGE( "Graph_Impl::(Re)Run " ); + MESSAGE( "Graph_Impl::Run " ); + DataFlowEditor()->Executing() ; RetVal = CNode_Impl::Run() ; } } - else { - MESSAGE( "Graph_Impl::(Re)Run " ); + else if ( !IsMacro() ) { + MESSAGE( "Graph_Impl::Run " << DataFlowEditor()->Graph()->Name() << " " << DataFlowEditor() + << " IsNOTEditing --> CNode_Impl::ReRun" ); + DataFlowEditor()->Executing() ; RetVal = CNode_Impl::ReRun() ; } endService( "Graph_Impl::Run" ); @@ -1062,16 +1749,21 @@ bool Graph_Impl::Run() { bool Graph_Impl::Start() { beginService( "Graph_Impl::Start" ); bool RetVal = false ; - if ( DataFlowEditor()->IsEditing() ) { - MESSAGE( "Graph_Impl::Start IsEditing" ); - RetVal = Begin() ; - } - else { - RetVal = true ; - } - if ( RetVal ) { - MESSAGE( "Graph_Impl::(Re)Start " ); - RetVal = ReStart() ; + if ( !IsMacro() ) { + if ( DataFlowEditor()->IsEditing() ) { + MESSAGE( "Graph_Impl::Start IsEditing" ); + RetVal = Begin() ; + } + else { + RetVal = true ; + } + if ( RetVal ) { + MESSAGE( "Graph_Impl::(Re)Start " ); + // Added by NKV to fix PAL6222 --> to be confirm by JR + DataFlowEditor()->Executing() ; + // End of NKV's correction + RetVal = ReStart() ; + } } endService( "Graph_Impl::Start" ); return RetVal ; @@ -1088,9 +1780,9 @@ bool Graph_Impl::EventNoW( SUPERV::CNode_out aNode , perror("pthread_mutex_lock _MutexExecutorWait") ; exit( 0 ) ; } - if ( _DataFlowExecutor && - ( _DataFlowExecutor->GetListSize() || !DataFlowEditor()->IsEditing() ) ) { - RetVal = _DataFlowExecutor->Event( & aNodeName , theEvent , theState , false ) ; + if ( DataFlowExecutor() && !IsMacro() && + ( DataFlowExecutor()->GetListSize() || !DataFlowEditor()->IsEditing() ) ) { + RetVal = DataFlowExecutor()->Event( & aNodeName , theEvent , theState , false ) ; // endService( "Graph_Impl::Event" ); if ( strlen( aNodeName ) ) { if ( strcmp( aNodeName , Name() ) ) { @@ -1103,10 +1795,10 @@ bool Graph_Impl::EventNoW( SUPERV::CNode_out aNode , else { aNode = SUPERV::Graph::_duplicate( SUPERV::Graph::_nil() ) ; } -// cout << "Graph_Impl::EventNoW " << aNode->Name() << " QSize " << _DataFlowExecutor->GetListSize() << endl ; +// cout << "Graph_Impl::EventNoW " << aNode->Name() << " QSize " << DataFlowExecutor()->GetListSize() << endl ; } else { -// cout << "Graph_Impl::EventNoW NO DataFlowExecutor or QSize=0 " << endl ; +// cout << "Graph_Impl::EventNoW NO DataFlowExecutor() or QSize=0 " << endl ; } if ( pthread_mutex_unlock( &_MutexExecutorWait ) ) { perror("pthread_mutex_unlock _MutexExecutorWait") ; @@ -1129,9 +1821,9 @@ bool Graph_Impl::Event( SUPERV::CNode_out aNode , perror("pthread_mutex_lock _MutexExecutorWait") ; exit( 0 ) ; } - if ( _DataFlowExecutor && - ( _DataFlowExecutor->GetListSize() || !DataFlowEditor()->IsEditing() ) ){ - RetVal = _DataFlowExecutor->Event( & aNodeName , theEvent , theState ) ; + if ( DataFlowExecutor() && !IsMacro() && + ( DataFlowExecutor()->GetListSize() || !DataFlowEditor()->IsEditing() ) ){ + RetVal = DataFlowExecutor()->Event( & aNodeName , theEvent , theState ) ; // endService( "Graph_Impl::Event" ); if ( strlen( aNodeName ) ) { if ( strcmp( aNodeName , Name() ) ) { @@ -1144,10 +1836,10 @@ bool Graph_Impl::Event( SUPERV::CNode_out aNode , else { aNode = SUPERV::Graph::_duplicate( SUPERV::Graph::_nil() ) ; } -// cout << "Graph_Impl::Event " << aNode->Name() << " QSize " << _DataFlowExecutor->GetListSize() << endl ; +// cout << "Graph_Impl::Event " << aNode->Name() << " QSize " << DataFlowExecutor()->GetListSize() << endl ; } else { -// cout << "Graph_Impl::Event NO DataFlowExecutor or QSize=0 " << endl ; +// cout << "Graph_Impl::Event NO DataFlowExecutor() or QSize=0 " << endl ; } if ( pthread_mutex_unlock( &_MutexExecutorWait ) ) { perror("pthread_mutex_unlock _MutexExecutorWait") ; @@ -1170,9 +1862,9 @@ bool Graph_Impl::EventW( SUPERV::CNode_out aNode , perror("pthread_mutex_lock _MutexExecutorWait") ; exit( 0 ) ; } - if ( _DataFlowExecutor && - ( _DataFlowExecutor->GetListSize() || !DataFlowEditor()->IsEditing() ) ) { - RetVal = _DataFlowExecutor->EventW( & aNodeName , theEvent , theState ) ; + if ( DataFlowExecutor() && !IsMacro() && + ( DataFlowExecutor()->GetListSize() || !DataFlowEditor()->IsEditing() ) ) { + RetVal = DataFlowExecutor()->EventW( & aNodeName , theEvent , theState ) ; if ( RetVal && strcmp( aNodeName , Name() ) ) { aNode = Node( aNodeName ) ; } @@ -1197,8 +1889,8 @@ long Graph_Impl::EventQSize() { perror("pthread_mutex_lock _MutexExecutorWait") ; exit( 0 ) ; } - if ( _DataFlowExecutor ) { - QSize = _DataFlowExecutor->EventQSize() ; + if ( DataFlowExecutor() && !IsMacro() ) { + QSize = DataFlowExecutor()->EventQSize() ; } if ( pthread_mutex_unlock( &_MutexExecutorWait ) ) { perror("pthread_mutex_unlock _MutexExecutorWait") ; @@ -1215,8 +1907,8 @@ long Graph_Impl::LastLevelDone() { exit( 0 ) ; } long RetVal = 0 ; - if ( _DataFlowExecutor ) { - RetVal = _DataFlowExecutor->LastLevelDone() ; + if ( DataFlowExecutor() && !IsMacro() ) { + RetVal = DataFlowExecutor()->LastLevelDone() ; } if ( pthread_mutex_unlock( &_MutexExecutorWait ) ) { perror("pthread_mutex_unlock _MutexExecutorWait") ; @@ -1229,7 +1921,7 @@ long Graph_Impl::LastLevelDone() { long Graph_Impl::SubGraphsNumber() { // beginService( "Graph_Impl::SubGraphsNumber" ); long RetVal = 0 ; - if ( DataFlowEditor()->IsExecutable() ) { + if ( DataFlowEditor()->IsExecutable() && !IsMacro() ) { RetVal = DataFlowEditor()->SubGraphsNumber() ; } // endService( "Graph_Impl::SubGraphsNumber" ); @@ -1239,7 +1931,7 @@ long Graph_Impl::SubGraphsNumber() { SUPERV::ListOfNodes * Graph_Impl::SubGraphsNodes( const long aSubGraphNumber ) { beginService( "Graph_Impl::SubGraphsNodes" ); SUPERV::ListOfNodes_var RetVal = new SUPERV::ListOfNodes ; - if ( DataFlowEditor()->IsEditing() ) { + if ( DataFlowEditor()->IsEditing() && !IsMacro() ) { SUPERV::ListOfNodes * aGraphNodes = Nodes() ; int i ; // ComputingNodes @@ -1306,8 +1998,10 @@ SUPERV::ListOfNodes * Graph_Impl::SubGraphsNodes( const long aSubGraphNumber ) { bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph ) { // beginService( "Graph_Impl::Merge" ); bool RetVal = true ; - map< string , int > aMapOfNodes ; - RetVal = Merge( aGraph , aMapOfNodes ) ; + if ( !IsMacro() ) { + map< string , int > aMapOfNodes ; + RetVal = Merge( aGraph , aMapOfNodes ) ; + } // endService( "Graph_Impl::Merge" ); return RetVal ; } @@ -1315,7 +2009,7 @@ bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph ) { bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph , map< string , int > & aMapOfNodes ) { beginService( "Graph_Impl::Merge" ); bool RetVal = true ; - if ( DataFlowEditor()->IsEditing() ) { + if ( DataFlowEditor()->IsEditing() && !IsMacro() ) { SUPERV::ListOfNodes * aGraphNodes = aGraph->Nodes() ; int i ; SUPERV::Port_ptr aPort ; @@ -1655,14 +2349,23 @@ bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph , map< string , int > & aM char * aPortName = aPort->Name() ; char * aNodeName = new char[ strlen( aPortName ) + 1 ] ; strcpy( aNodeName , aPortName ) ; - char * thePortName = strchr( aNodeName , '\\' ) ; - thePortName[ 0 ] = '\0' ; - bool hasinput = aGraph->Node( aNodeName )->Port( thePortName + 1 )->HasInput() ; +// char * thePortName = strchr( aNodeName , '\\' ) ; + char * thePortName = aNodeName ; + while ( ( thePortName = strchr( thePortName , '_' ) ) ) { + if ( thePortName[1] == '_' ) { + thePortName[ 0 ] = '\0' ; + break ; + } + else { + thePortName = &thePortName[2] ; + } + } + bool hasinput = aGraph->Node( aNodeName )->Port( thePortName + 2 )->HasInput() ; // cout << "Graph_Impl::Merge " << " aNodeName " << aNodeName << " aPort " << thePortName + 1 // << " HasInput " << hasinput << endl ; if ( hasinput ) { RetVal = DataFlowEditor()->AddInputData( DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aNodeName ] )->Name() , - thePortName + 1 , + thePortName + 2 , *(aPort->ToAny()) ) ; } delete [] aNodeName ; @@ -1682,7 +2385,7 @@ bool Graph_Impl::Merge(const SUPERV::Graph_ptr aGraph , map< string , int > & aM SUPERV::StreamGraph_ptr Graph_Impl::ToStreamGraph() { SUPERV::StreamGraph_var iobject = SUPERV::StreamGraph::_nil() ; beginService( "Graph_Impl::ToStreamGraph" ); - if ( IsStreamGraph() ) { + if ( IsStreamGraph() && !IsMacro() ) { // StreamGraph_Impl * myStreamGraph = new StreamGraph_Impl( _Orb , _Poa , _ContId , // instanceName() , interfaceName() ) ; // PortableServer::ObjectId * id = myStreamGraph->getId() ; @@ -1700,3 +2403,4 @@ SUPERV::StreamGraph_ptr Graph_Impl::ToStreamGraph() { } + diff --git a/src/Supervision/Graph_Impl.hxx b/src/Supervision/Graph_Impl.hxx index 0a3b874..66c29ba 100644 --- a/src/Supervision/Graph_Impl.hxx +++ b/src/Supervision/Graph_Impl.hxx @@ -48,8 +48,8 @@ #include "DataFlowEditor_DataFlow.hxx" #include "DataFlowExecutor_DataFlow.hxx" -class Graph_Impl :public INode_Impl , - public POA_SUPERV::Graph { +class Graph_Impl : public POA_SUPERV::Graph , + public GNode_Impl { private: CORBA::ORB_ptr _Orb ; @@ -60,7 +60,7 @@ class Graph_Impl :public INode_Impl , char * _DebugFileName ; pthread_mutex_t _MutexExecutorWait ; - GraphExecutor::DataFlow * _DataFlowExecutor ; +// GraphExecutor::DataFlow * _DataFlowExecutor ; SUPERV::Graph_var myServant; // mpv 23.12.2002: store servant of graph to get constant IOR @@ -73,11 +73,30 @@ class Graph_Impl :public INode_Impl , const char *interfaceName , const char *aDataFlowName , const SUPERV::KindOfNode aKindOfNode ) ; + Graph_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphEditor::DataFlow * DataFlowEditor , + GraphEditor::InNode * DataFlowNode ) ; + Graph_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphExecutor::DataFlow * DataFlowExecutor , + GraphExecutor::InNode * DataFlowExecutorNode ) ; virtual SUPERV::Graph_ptr Copy() ; virtual ~Graph_Impl() ; virtual void destroy() ; + void DebugFileName( char * aDebugFileName ) { + _DebugFileName = my_strdup( aDebugFileName ) ; } ; + char * DebugFileName() { + return _DebugFileName ; } ; + virtual char* getIOR(); virtual void ReadOnly() ; @@ -88,9 +107,9 @@ class Graph_Impl :public INode_Impl , // virtual char * DataNodeInfo() ; // virtual char * NodeInfo( const char * aNodeName ) ; - virtual GraphBase::SGraph * GetGraph() ; + virtual GraphBase::ListOfSGraphs * GetGraphs() ; - virtual bool LoadGraph(const GraphBase::SGraph *aGraph ) ; + virtual bool LoadGraphs( GraphBase::ListOfSGraphs *aListOfGraphs ) ; virtual bool Import(const char * aXmlFile ) ; virtual bool Export(const char * aXmlFile ) ; @@ -121,13 +140,30 @@ class Graph_Impl :public INode_Impl , const SUPERV::ListOfStrings & PythonFunction , SUPERV::INode_out anEndOfSwitch ) ; + bool LoadDataFlows( GraphEditor::DataFlow * aDataFlowEditor , + GraphBase::ListOfSGraphs * aListOfDataFlows , + int index ) ; + bool LoadDataFlows( GraphExecutor::DataFlow * aDataFlowExecutor , + GraphBase::ListOfSGraphs * aListOfDataFlows , + int index ) ; + virtual SUPERV::Graph_ptr MNode( const char * aXmlFileName ) ; + + virtual SUPERV::Graph_ptr MNode( GraphEditor::DataFlow * aDataFlowEditor , + GraphBase::ListOfSGraphs aListOfDataFlows ) ; + + virtual SUPERV::Graph_ptr GraphMNode( SUPERV::Graph_ptr aGraph ) ; + + virtual SUPERV::Graph_ptr FlowObjRef() ; + + virtual SUPERV::StreamGraph_ptr StreamObjRef() ; + virtual SUPERV::CNode_ptr Node( const char * NodeName ); virtual SUPERV::Link_ptr Link( SUPERV::Port_ptr OutPort , SUPERV::Port_ptr InPort ) ; virtual SUPERV::ListOfNodes_var Graph_Impl::SetNode( SUPERV::ListOfNodes_var RetVal , - GraphBase::ComputingNode * aNode ) ; + GraphBase::ComputingNode * aNode ) ; virtual SUPERV::ListOfNodes * Nodes() ; virtual void SetNodeObjRef( GraphEditor::InNode * anInNode ) ; diff --git a/src/Supervision/INode_Impl.cxx b/src/Supervision/INode_Impl.cxx index cd5e83e..a17f538 100644 --- a/src/Supervision/INode_Impl.cxx +++ b/src/Supervision/INode_Impl.cxx @@ -24,20 +24,21 @@ INode_Impl::INode_Impl( CORBA::ORB_ptr orb , PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - const char *aDataFlowName ) : + const char *aDataFlowName , + const SUPERV::KindOfNode aKindOfNode ) : // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { - CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowName ) { + CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowName , aKindOfNode ) { // MESSAGE("INode_Impl::INode_Impl activate object instanceName(" // << instanceName << ") interfaceName(" << interfaceName << ") --> " // << hex << (void *) this << dec ) // _thisObj = this ; // _id = _poa->activate_object(_thisObj); - MESSAGE( "INode_Impl::INode_Impl " << aDataFlowName ); - beginService( "INode_Impl::INode_Impl" ); +// MESSAGE( "INode_Impl::INode_Impl " << aDataFlowName ); +// beginService( "INode_Impl::INode_Impl" ); _Orb = CORBA::ORB::_duplicate(orb); _Poa = poa ; _ContId = contId ; - endService( "INode_Impl::INode_Impl" ); +// endService( "INode_Impl::INode_Impl" ); } INode_Impl::INode_Impl() { @@ -54,22 +55,22 @@ INode_Impl::INode_Impl( CORBA::ORB_ptr orb , const SUPERV::KindOfNode NodeKindOfNode ) : // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , SALOME_ModuleCatalog::Service() , FuncName , NodeKindOfNode , FuncName , aPythonFunction ) { - beginService( "INode_Impl::INode_Impl" ); +// beginService( "INode_Impl::INode_Impl" ); if ( FuncName ) { // cout << "INode_Impl::CNode_Impl " << (void *) FuncName << " " << FuncName // << " " << strlen( FuncName ) << endl ; } if ( NodeKindOfNode == SUPERV::InLineNode ) { - MESSAGE( "INode_Impl::INode_Impl " << FuncName << " _poa->activate_object" ); +// MESSAGE( "INode_Impl::INode_Impl " << FuncName << " _poa->activate_object" ); _thisObj = this ; _id = _poa->activate_object(_thisObj); } - MESSAGE("INode_Impl::INode_Impl " << FuncName << " " << strlen( FuncName ) ) ; +// MESSAGE("INode_Impl::INode_Impl " << FuncName << " " << strlen( FuncName ) ) ; _Orb = CORBA::ORB::_duplicate(orb); _Poa = poa ; _ContId = contId ; // DataFlowNode()->SetPythonFunction( FuncName , aPythonFunction ) ; - endService( "INode_Impl::INode_Impl" ); +// endService( "INode_Impl::INode_Impl" ); } INode_Impl::INode_Impl( CORBA::ORB_ptr orb , @@ -83,18 +84,18 @@ INode_Impl::INode_Impl( CORBA::ORB_ptr orb , const SUPERV::KindOfNode NodeKindOfNode ) : // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , SALOME_ModuleCatalog::Service() , FuncName[0].c_str() , NodeKindOfNode , FuncName , aPythonFunction ) { - beginService( "INode_Impl::INode_Impl" ); +// beginService( "INode_Impl::INode_Impl" ); if ( NodeKindOfNode == SUPERV::InLineNode ) { - MESSAGE( "INode_Impl::INode_Impl " << FuncName[0] << " _poa->activate_object" ); +// MESSAGE( "INode_Impl::INode_Impl " << FuncName[0] << " _poa->activate_object" ); _thisObj = this ; _id = _poa->activate_object(_thisObj); } - MESSAGE("INode_Impl::INode_Impl " << FuncName[0].c_str() << " " << strlen( FuncName[0].c_str() ) ) ; +// MESSAGE("INode_Impl::INode_Impl " << FuncName[0].c_str() << " " << strlen( FuncName[0].c_str() ) ) ; _Orb = CORBA::ORB::_duplicate(orb); _Poa = poa ; _ContId = contId ; // DataFlowNode()->SetPythonFunction( FuncName , aPythonFunction ) ; - endService( "INode_Impl::INode_Impl" ); +// endService( "INode_Impl::INode_Impl" ); } INode_Impl::INode_Impl( CORBA::ORB_ptr orb , @@ -106,18 +107,45 @@ INode_Impl::INode_Impl( CORBA::ORB_ptr orb , GraphEditor::InNode * aDataFlowNode ) : // Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) { - MESSAGE( DataFlowNode()->Name() << " " ); - beginService( "INode_Impl::INode_Impl" ); - if ( DataFlowNode()->IsInLineNode() ) { - MESSAGE( "INode_Impl::INode_Impl " << DataFlowNode()->PyFuncName() - << " _poa->activate_object" ); +// beginService( "INode_Impl::INode_Impl" ); + if ( DataFlowNode() && DataFlowNode()->IsInLineNode() ) { +// MESSAGE( "INode_Impl::INode_Impl " << DataFlowNode()->PyFuncName() +// << " _poa->activate_object" ); _thisObj = this ; _id = _poa->activate_object(_thisObj); } + else { +// MESSAGE( "INode_Impl::INode_Impl NO _poa->activate_object" ); + } + _Orb = CORBA::ORB::_duplicate(orb); + _Poa = poa ; + _ContId = contId ; +// endService( "INode_Impl::INode_Impl" ); +} + +INode_Impl::INode_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphExecutor::DataFlow * aDataFlowExecutor , + GraphExecutor::InNode * aDataFlowExecutorNode ) : +// Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) { + CNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowExecutor , aDataFlowExecutorNode ) { +// beginService( "INode_Impl::INode_Impl" ); + if ( DataFlowExecutorNode() && DataFlowExecutorNode()->IsInLineNode() ) { +// MESSAGE( "INode_Impl::INode_Impl " << DataFlowExecutorNode()->Name() +// << " _poa->activate_object" ); + _thisObj = this ; + _id = _poa->activate_object(_thisObj); + } + else { +// MESSAGE( "INode_Impl::INode_Impl NO _poa->activate_object" ); + } _Orb = CORBA::ORB::_duplicate(orb); _Poa = poa ; _ContId = contId ; - endService( "INode_Impl::INode_Impl" ); +// endService( "INode_Impl::INode_Impl" ); } INode_Impl::~INode_Impl() { @@ -142,6 +170,7 @@ bool INode_Impl::Delete() { // beginService( "INode_Impl::Delete" ); bool RetVal = false ; if ( DataFlowEditor()->IsEditing() ) { + DeletePorts() ; RetVal = DataFlowEditor()->RemoveNode( Name() ) ; if ( RetVal ) RetVal = DataFlowEditor()->UnValid() ; @@ -184,8 +213,8 @@ SUPERV::Port_ptr INode_Impl::InPort( const char *aParameterName , SUPERV::Port_ptr InEndobject = SUPERV::Port::_nil() ; Port_Impl * myInPort = NULL ; bool InPortCreated = false ; - MESSAGE( "CNode_Impl::InPort " << DataFlowNode()->Name() << "->AddInPort( " << aParameterName << " , " - << aParameterType << " )" ) ; +// MESSAGE( "CNode_Impl::InPort " << DataFlowNode()->Name() << "->AddInPort( " << aParameterName << " , " +// << aParameterType << " )" ) ; GraphBase::InPort * anInPort = DataFlowNode()->GetChangeInPort( aParameterName ) ; if ( anInPort == NULL ) { anInPort = DataFlowNode()->AddInPort( aParameterName , aParameterType , SUPERV::InLineParameter ) ; @@ -227,8 +256,8 @@ SUPERV::Port_ptr INode_Impl::OutPort( const char *aParameterName , const char *aParameterType ) { Port_Impl * myOutPort = NULL ; SUPERV::Port_ptr Outobject = SUPERV::Port::_nil() ; - MESSAGE( "CNode_Impl::OutPort " << DataFlowNode()->Name() << "->AddOutPort( " << aParameterName << " , " - << aParameterType << " )" ) ; +// MESSAGE( "CNode_Impl::OutPort " << DataFlowNode()->Name() << "->AddOutPort( " << aParameterName << " , " +// << aParameterType << " )" ) ; GraphBase::OutPort * anOutPort = DataFlowNode()->GetChangeOutPort( aParameterName ) ; if ( anOutPort == NULL ) { anOutPort = DataFlowNode()->AddOutPort( aParameterName , aParameterType , SUPERV::InLineParameter ) ; diff --git a/src/Supervision/INode_Impl.hxx b/src/Supervision/INode_Impl.hxx index fd7342f..f0324d4 100644 --- a/src/Supervision/INode_Impl.hxx +++ b/src/Supervision/INode_Impl.hxx @@ -42,7 +42,8 @@ class INode_Impl : public CNode_Impl , PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - const char *aDataFlowName ) ; + const char *aDataFlowName , + const SUPERV::KindOfNode aKindOfNode ) ; INode_Impl( CORBA::ORB_ptr orb , PortableServer::POA_ptr poa , PortableServer::ObjectId * contId , @@ -68,6 +69,13 @@ class INode_Impl : public CNode_Impl , const char *interfaceName , GraphEditor::DataFlow * DataFlowEditor , GraphEditor::InNode * DataFlowNode ) ; + INode_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphExecutor::DataFlow * DataFlowExecutor , + GraphExecutor::InNode * DataFlowExecutorNode ) ; virtual ~INode_Impl() ; virtual void destroy() ; virtual bool Delete() ; diff --git a/src/Supervision/LNode_Impl.cxx b/src/Supervision/LNode_Impl.cxx index 5e20dd8..ce4f467 100644 --- a/src/Supervision/LNode_Impl.cxx +++ b/src/Supervision/LNode_Impl.cxx @@ -98,6 +98,7 @@ bool LNode_Impl::Delete() { beginService( "LNode_Impl::Delete" ); bool RetVal = false ; if ( DataFlowEditor()->IsEditing() ) { + DeletePorts() ; RetVal = DataFlowEditor()->RemoveNode( Name() ) ; if ( RetVal ) { RetVal = DataFlowEditor()->IsValid() ; diff --git a/src/Supervision/Port_Impl.cxx b/src/Supervision/Port_Impl.cxx index cab7239..3593476 100644 --- a/src/Supervision/Port_Impl.cxx +++ b/src/Supervision/Port_Impl.cxx @@ -117,21 +117,27 @@ void Port_Impl::destroy() { if ( anInPort->GetOutPort() ) { anInPort->GetOutPort()->RemoveInPort( anInPort ) ; } - _DataFlowNode->DelInPort( _DataFlowPort->PortName() ) ; - if ( _DataFlowNode->IsLoopNode() ) { - _DataFlowNode->DelOutPort( _DataFlowPort->PortName() ) ; - _DataFlowNode->CoupledNode()->DelInPort( _DataFlowPort->PortName() ) ; - _DataFlowNode->CoupledNode()->DelOutPort( _DataFlowPort->PortName() ) ; + if ( _DataFlowNode->IsOneOfInLineNodes() ) { + _DataFlowNode->DelInPort( _DataFlowPort->PortName() ) ; + if ( _DataFlowNode->IsLoopNode() ) { + _DataFlowNode->DelOutPort( _DataFlowPort->PortName() ) ; + _DataFlowNode->CoupledNode()->DelInPort( _DataFlowPort->PortName() ) ; + _DataFlowNode->CoupledNode()->DelOutPort( _DataFlowPort->PortName() ) ; + } + } + else { } destroyed = true ; } - else if ( !_DataFlowNode->IsLoopNode() ) { + else if ( _DataFlowNode->IsOneOfInLineNodes() && !_DataFlowNode->IsLoopNode() ) { _DataFlowNode->DelOutPort( _DataFlowPort->PortName() ) ; destroyed = true ; } + else { + destroyed = true ; + } if ( destroyed ) { _DataFlowEditor->UnValid() ; -// _DataFlowEditor->IsValid() ; } } if ( destroyed ) { @@ -143,6 +149,15 @@ void Port_Impl::destroy() { endService( "Port_Impl::destroy" ); } +void Port_Impl::Remove() { + beginService( "Port_Impl::Remove" ); + _poa->deactivate_object(*_id) ; + CORBA::release(_poa) ; + delete(_id) ; + _thisObj->_remove_ref(); + endService( "Port_Impl::Remove" ); +} + bool Port_Impl::Input( const SUPERV::Value_ptr aValue ) { return Input( aValue->ToAny() ) ; } @@ -150,21 +165,23 @@ bool Port_Impl::Input( const SUPERV::Value_ptr aValue ) { bool Port_Impl::Input( const CORBA::Any * anAny ) { beginService( "Port_Impl::Input" ); bool RetVal = false ; - if ( _InputPort && _DataFlowEditor->IsEditing() ) { - RetVal = true ; - Value_Impl::Input( anAny ) ; - RetVal = _DataFlowEditor->AddInputData( _DataFlowNode->Name() , - _DataFlowPort->PortName() , - *anAny ) ; - } - else if ( _DataFlowEditor->IsExecuting() ) { - GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; -// if ( _DataFlowExecutor && ( _DataFlowExecutor->IsSuspended() || -// _DataFlowExecutor->IsSuspended( _DataFlowNode->Name() ) ) ) { - if ( _DataFlowExecutor ) { - RetVal = _DataFlowExecutor->ChangeInputData( _DataFlowNode->Name() , - _DataFlowPort->PortName() , - *anAny ) ; + if ( _DataFlowEditor->Graph()->GraphMacroLevel() == 0 ) { + if ( _InputPort && _DataFlowEditor->IsEditing() ) { + RetVal = true ; + Value_Impl::Input( anAny ) ; + RetVal = _DataFlowEditor->AddInputData( _DataFlowNode->Name() , + _DataFlowPort->PortName() , + *anAny ) ; + } + else if ( _DataFlowEditor->IsExecuting() ) { + GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ; +// if ( _DataFlowExecutor && ( _DataFlowExecutor->IsSuspended() || +// _DataFlowExecutor->IsSuspended( _DataFlowNode->Name() ) ) ) { + if ( _DataFlowExecutor ) { + RetVal = _DataFlowExecutor->ChangeInputData( _DataFlowNode->Name() , + _DataFlowPort->PortName() , + *anAny ) ; + } } } if ( !RetVal ) { diff --git a/src/Supervision/Port_Impl.hxx b/src/Supervision/Port_Impl.hxx index eddd426..dcf7bff 100644 --- a/src/Supervision/Port_Impl.hxx +++ b/src/Supervision/Port_Impl.hxx @@ -83,6 +83,8 @@ class Port_Impl : public Value_Impl , virtual ~Port_Impl() ; virtual void destroy() ; + virtual void Remove() ; + GraphEditor::DataFlow * DataFlowEditor() { return _DataFlowEditor ; } ; GraphEditor::InNode * DataFlowNode() { diff --git a/src/Supervision/SNode_Impl.cxx b/src/Supervision/SNode_Impl.cxx index 1d6b83e..d1d0275 100644 --- a/src/Supervision/SNode_Impl.cxx +++ b/src/Supervision/SNode_Impl.cxx @@ -95,6 +95,7 @@ bool SNode_Impl::Delete() { // beginService( "SNode_Impl::Delete" ); bool RetVal = false ; if ( DataFlowEditor()->IsEditing() ) { + DeletePorts() ; RetVal = DataFlowEditor()->RemoveNode( Name() ) ; if ( RetVal ) RetVal = DataFlowEditor()->IsValid() ; diff --git a/src/Supervision/StreamGraph_Impl.cxx b/src/Supervision/StreamGraph_Impl.cxx index 0319e26..315560d 100644 --- a/src/Supervision/StreamGraph_Impl.cxx +++ b/src/Supervision/StreamGraph_Impl.cxx @@ -35,8 +35,10 @@ StreamGraph_Impl::StreamGraph_Impl( CORBA::ORB_ptr orb , PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - const char *aDataFlowName ) : - Graph_Impl(orb, poa, contId, instanceName, interfaceName, aDataFlowName , SUPERV::DataStreamGraph ) { + const char *aDataFlowName , + const SUPERV::KindOfNode aKindOfGraphNode ) : +// Graph_Impl(orb, poa, contId, instanceName, interfaceName, aDataFlowName , SUPERV::DataStreamGraph ) { + Graph_Impl(orb, poa, contId, instanceName, interfaceName, aDataFlowName , aKindOfGraphNode ) { // MESSAGE("StreamGraph_Impl::StreamGraph_Impl activate object instanceName(" // << instanceName << ") interfaceName(" << interfaceName << ") --> " // << hex << (void *) this << dec ) @@ -50,6 +52,30 @@ StreamGraph_Impl::StreamGraph_Impl( CORBA::ORB_ptr orb , endService( "StreamGraph_Impl::StreamGraph_Impl" ); } +StreamGraph_Impl::StreamGraph_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphEditor::DataFlow * aDataFlowEditor , + GraphEditor::InNode * aDataFlowNode ) : + Graph_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , aDataFlowNode ) { + MESSAGE( aDataFlowNode->Name() << " " ); + beginService( "StreamGraph_Impl::StreamGraph_Impl" ); + if ( aDataFlowNode->IsMacroNode() ) { + MESSAGE( "StreamGraph_Impl::StreamGraph_Impl _poa->activate_object" ); + _thisObj = this ; + _id = _poa->activate_object(_thisObj); + } + else { + MESSAGE( "StreamGraph_Impl::StreamGraph_Impl NO _poa->activate_object " ); + } + _Orb = CORBA::ORB::_duplicate(orb); + _Poa = poa ; + _ContId = contId ; + endService( "StreamGraph_Impl::StreamGraph_Impl" ); +} + StreamGraph_Impl::StreamGraph_Impl() { } @@ -69,25 +95,99 @@ void StreamGraph_Impl::destroy() { SUPERV::StreamGraph_ptr StreamGraph_Impl::StreamCopy() { beginService( "StreamGraph_Impl::StreamCopy" ); - StreamGraph_Impl * myStreamGraph ; - myStreamGraph = new StreamGraph_Impl( _Orb , _Poa, _ContId, - instanceName() , interfaceName() , - DataFlowEditor()->Graph()->Name() ) ; - PortableServer::ObjectId * id = myStreamGraph->getId() ; - CORBA::Object_var obj = _poa->id_to_reference(*id); - SUPERV::StreamGraph_var iobject ; - iobject = SUPERV::StreamGraph::_narrow(obj) ; - GraphBase::SGraph * aSGraph = GetGraph() ; - myStreamGraph->LoadGraph( aSGraph ) ; + SUPERV::StreamGraph_var iobject = SUPERV::StreamGraph::_nil() ; + if ( !IsMacro() ) { + StreamGraph_Impl * myStreamGraph ; + myStreamGraph = new StreamGraph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + DataFlowEditor()->Graph()->Name() ) ; + PortableServer::ObjectId * id = myStreamGraph->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + iobject = SUPERV::StreamGraph::_narrow(obj) ; + GraphBase::ListOfSGraphs * aListOfSGraphs = GetGraphs() ; + myStreamGraph->LoadGraphs( aListOfSGraphs ) ; + } endService( "StreamGraph_Impl::StreamCopy" ); return SUPERV::StreamGraph::_duplicate(iobject) ; } +SUPERV::StreamGraph_ptr StreamGraph_Impl::StreamMNode( const char * aXmlFileName ) { + beginService( "StreamGraph_Impl::StreamMNode" ); + SUPERV::StreamGraph_var streamiobject = SUPERV::StreamGraph::_nil() ; + SUPERV::StreamGraph_var macroiobject = SUPERV::StreamGraph::_nil() ; +#if 0 + string dbgfile ; + GraphEditor::DataFlow * aDataFlowEditor ; + CreateEditor( _Orb , instanceName() , aXmlFileName , SUPERV::DataStreamGraph , + dbgfile , &aDataFlowEditor ) ; + int lenname = strlen( aXmlFileName ) ; + bool created = false ; + if ( lenname > 4 && !strcmp( &aXmlFileName[ lenname - 4 ] , ".xml" ) ) { + created = aDataFlowEditor->LoadXml( aXmlFileName ) ; + } + if ( created ) { + StreamGraph_Impl * myStreamGraph ; + myStreamGraph = new StreamGraph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + aDataFlowEditor , NULL ) ; + PortableServer::ObjectId * id = myStreamGraph->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + streamiobject = SUPERV::StreamGraph::_narrow( obj ) ; + myStreamGraph->SetObjRef( SUPERV::StreamGraph::_duplicate( streamiobject ) ) ; + + StreamGraph_Impl * myStreamMacroNode ; + myStreamMacroNode = new StreamGraph_Impl( _Orb , _Poa, _ContId, + instanceName() , interfaceName() , + aXmlFileName , SUPERV::StreamMacroNode ) ; + id = myStreamMacroNode->getId() ; + obj = _poa->id_to_reference(*id); + macroiobject = SUPERV::StreamGraph::_narrow( obj ) ; + myStreamMacroNode->DataFlowEditor( DataFlowEditor() ) ; + myStreamMacroNode->DataFlowEditor()->Graph()->SetObjImpl( this ) ; + myStreamMacroNode->SetObjRef( SUPERV::CNode::_duplicate( SUPERV::CNode::_narrow( obj ) ) ) ; + char * aMacroNodeName = myStreamGraph->Name() ; + GraphBase::ListOfFuncName aFuncName ; + aFuncName.resize( 1 ) ; + aFuncName[0] = "" ; + SUPERV::ListOfStrings aListOfStrings ; + aListOfStrings.length( 1 ) ; + aListOfStrings[0] = "" ; + GraphBase::ListOfPythonFunctions aPythonFunction ; + aPythonFunction.resize( 1 ) ; + aPythonFunction[0] = &aListOfStrings ; + SALOME_ModuleCatalog::Service * aMacroNodeService = myStreamGraph->Service() ; + GraphEditor::InNode * aDataFlowNode = DataFlowEditor()->AddNode( *aMacroNodeService , "" , "" , + aMacroNodeName , SUPERV::StreamMacroNode , + aFuncName , aPythonFunction ) ; + myStreamMacroNode->DataFlowNode( aDataFlowNode ) ; + myStreamGraph->MacroObject( SUPERV::StreamGraph::_duplicate( macroiobject ) ) ; + myStreamMacroNode->MacroObject( SUPERV::StreamGraph::_duplicate( streamiobject ) ) ; + MESSAGE( "DataFlowNode Graph " << this << " DataFlowEditor " << DataFlowEditor() << " aDataFlowNode " + << aDataFlowNode << " " << aDataFlowNode->Name() + << " created" ) ; + } + else { + delete aDataFlowEditor ; + } +#endif + endService( "StreamGraph_Impl::StreamMNode" ); + return SUPERV::StreamGraph::_duplicate( macroiobject ) ; +} + +SUPERV::StreamGraph_ptr StreamGraph_Impl::StreamGraphMNode( SUPERV::StreamGraph_ptr myMacroStreamGraph ) { + SUPERV::StreamGraph_var iobject = myMacroStreamGraph ; +// GraphBase::Graph * myMacroGraph = aGraph; + SUPERV::StreamGraph_var macroiobject = SUPERV::StreamGraph::_nil() ; + beginService( "StreamGraph_Impl::StreamGraphMNode" ) ; + endService( "StreamGraph_Impl::StreamGraphMNode" ) ; + return SUPERV::StreamGraph::_duplicate( macroiobject ) ; +} + SUPERV::StreamLink_ptr StreamGraph_Impl::StreamLink( SUPERV::StreamPort_ptr OutStreamPort , SUPERV::StreamPort_ptr InStreamPort ) { beginService( "StreamGraph_Impl::StreamLink" ); SUPERV::StreamLink_var iobject = SUPERV::StreamLink::_nil() ; - if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && + if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() && OutStreamPort->IsDataStream() && InStreamPort->IsDataStream() ) { GraphBase::InPort * anInPort = DataFlowEditor()->GetNode( InStreamPort->Node()->Name() )->ComputingNode()->GetChangeInPort( InStreamPort->Name() ) ; GraphBase::OutPort * anOutPort = DataFlowEditor()->GetNode( OutStreamPort->Node()->Name() )->ComputingNode()->GetChangeOutPort( OutStreamPort->Name() ) ; @@ -131,64 +231,134 @@ SUPERV::ListOfStreamLinks * StreamGraph_Impl::StreamLinks( GraphBase::ComputingN const char * anInputParam ) { bool begin = true ; SUPERV::ListOfStreamLinks_var RetVal = new SUPERV::ListOfStreamLinks ; - int i , j , countlink ; - countlink = 0 ; - for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) { - GraphEditor::InNode * aNode = NULL ; - aNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GraphNodes( i )->GetInNode() ; - bool ToProcess = false ; - if ( theNode == NULL ) { - ToProcess = true ; - } - else { - if ( !strcmp( theNode->Name() , aNode->Name() ) ) { - if ( !theNode->IsEndSwitchNode() ) { + if ( !IsMacro() ) { + int i , j , countlink ; + countlink = 0 ; + for ( i = 0 ; i < DataFlowEditor()->Graph()->GraphNodesSize() ; i++ ) { + GraphEditor::InNode * aNode = NULL ; + aNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GraphNodes( i )->GetInNode() ; + bool ToProcess = false ; + if ( theNode == NULL ) { + ToProcess = true ; + } + else { + if ( !strcmp( theNode->Name() , aNode->Name() ) ) { + if ( !theNode->IsEndSwitchNode() ) { + ToProcess = true ; + } + } + else if ( theNode->IsEndSwitchNode() ) { ToProcess = true ; - } + } } - else if ( theNode->IsEndSwitchNode() ) { - ToProcess = true ; + if ( ToProcess ) { + for ( j = 0 ; j < aNode->GetNodeInPortsSize() ; j++ ) { + GraphBase::InPort * anInPort = NULL ; + anInPort = aNode->GetChangeNodeInPort( j ) ; + if ( anInputParam == NULL || + !strcmp( anInPort->PortName() , anInputParam ) ) { + GraphBase::OutPort * anOutPort = NULL ; + anOutPort = anInPort->GetOutPort() ; + if ( anOutPort && anOutPort->IsDataStream() ) { + if ( strcmp( anOutPort->NodeName() , Name() ) ) { + MESSAGE("StreamGraph_Impl::StreamLinks " << anOutPort->NodeName() << "(" + << anOutPort->PortName() << ") --> " << aNode->Name() << "(" + << anInPort->PortName() << ")" ) ; + if ( theNode == NULL || + ( theNode != NULL && !theNode->IsEndSwitchNode() && + !strcmp( theNode->Name() , aNode->Name() ) ) ) { + if ( anInPort->IsLoop() || anOutPort->IsLoop() || + ( aNode->IsEndLoopNode() && !strcmp( aNode->CoupledNode()->Name() , + anOutPort->NodeName() ) ) ) { + MESSAGE( "StreamLink " << anOutPort->NodeName() << "(" + << anOutPort->PortName() << ") --> " << aNode->Name() << "(" + << anInPort->PortName() << ")" << " ignored" ) ; + } + else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { + if ( begin ) { + beginService( "StreamGraph_Impl::StreamLinks" ); + begin = false ; + } + GraphEditor::InNode * anOutNode = NULL ; + anOutNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anOutPort->NodeName() )->GetInNode() ; + if ( anOutNode ) { + bool Success ; + StreamLink_Impl * myStreamLink = new StreamLink_Impl( + _Orb , _Poa , _ContId , + instanceName() , interfaceName() , + DataFlowEditor() , + aNode , + anInPort->PortName() , + anOutNode , + anOutPort->PortName() , + false , Success ) ; + if ( Success ) { + PortableServer::ObjectId * id = myStreamLink->getId() ; + CORBA::Object_var obj = _poa->id_to_reference(*id); + SUPERV::StreamLink_var iobject ; + iobject = SUPERV::StreamLink::_narrow(obj) ; + RetVal->length( countlink + 1 ) ; + RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( iobject ) ; + anOutPort->AddInPortObjRef( anInPort , SUPERV::StreamLink::_duplicate( iobject ) ) ; + MESSAGE( "Link" << countlink-1 << " " + << RetVal[countlink-1]->OutStreamPort()->Node()->Name() << "(" + << RetVal[countlink-1]->OutStreamPort()->Name() << ") --> " + << RetVal[countlink-1]->InStreamPort()->Node()->Name() << "(" + << RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ; + } + } + } + else { + RetVal->length( countlink + 1 ) ; + RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( SUPERV::StreamLink::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ; + MESSAGE( "Link" << countlink-1 << " " + << RetVal[countlink-1]->OutStreamPort()->Node()->Name() << "(" + << RetVal[countlink-1]->OutStreamPort()->Name() << ") --> " + << RetVal[countlink-1]->InStreamPort()->Node()->Name() << "(" + << RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ; + } + } + } + } + } + } } - } - if ( ToProcess ) { - for ( j = 0 ; j < aNode->GetNodeInPortsSize() ; j++ ) { - GraphBase::InPort * anInPort = NULL ; - anInPort = aNode->GetChangeNodeInPort( j ) ; - if ( anInputParam == NULL || - !strcmp( anInPort->PortName() , anInputParam ) ) { - GraphBase::OutPort * anOutPort = NULL ; - anOutPort = anInPort->GetOutPort() ; - if ( anOutPort && anOutPort->IsDataStream() ) { - if ( strcmp( anOutPort->NodeName() , Name() ) ) { - MESSAGE("StreamGraph_Impl::StreamLinks " << anOutPort->NodeName() << "(" - << anOutPort->PortName() << ") --> " << aNode->Name() << "(" - << anInPort->PortName() << ")" ) ; - if ( theNode == NULL || - ( theNode != NULL && !theNode->IsEndSwitchNode() && - !strcmp( theNode->Name() , aNode->Name() ) ) ) { - if ( anInPort->IsLoop() || anOutPort->IsLoop() || - ( aNode->IsEndLoopNode() && !strcmp( aNode->CoupledNode()->Name() , - anOutPort->NodeName() ) ) ) { + for ( j = 0 ; j < aNode->GetNodeOutPortsSize() ; j++ ) { + GraphBase::OutPort * anOutPort = aNode->GetChangeNodeOutPort( j ) ; + int k ; + for ( k = 0 ; k < anOutPort->InPortsSize() ; k++ ) { + GraphBase::InPort * anInPort = anOutPort->ChangeInPorts( k ) ; + GraphEditor::InNode * toNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ; + if ( theNode == NULL || + !strcmp( theNode->Name() , aNode->Name() ) ) { + if ( anInPort->IsDataStream() ) { + if ( theNode || ( toNode->IsEndSwitchNode() && !aNode->IsSwitchNode() ) ) { + if ( anInputParam == NULL || + !strcmp( anInPort->PortName() , anInputParam ) ) { MESSAGE( "StreamLink " << anOutPort->NodeName() << "(" - << anOutPort->PortName() << ") --> " << aNode->Name() << "(" - << anInPort->PortName() << ")" << " ignored" ) ; - } - else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { - if ( begin ) { - beginService( "StreamGraph_Impl::StreamLinks" ); - begin = false ; - } - GraphEditor::InNode * anOutNode = NULL ; - anOutNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anOutPort->NodeName() )->GetInNode() ; - if ( anOutNode ) { + << anOutPort->PortName() << ") --> " << toNode->Name() << "(" + << anInPort->PortName() << ")" ) ; + MESSAGE( " IOR " << DataFlowEditor()->ObjectToString( anOutPort->InPortObjRef( anInPort ) ) ) ; + if ( anInPort->IsLoop() || anOutPort->IsLoop() || + ( toNode->IsEndLoopNode() && !strcmp( toNode->CoupledNode()->Name() , + anOutPort->NodeName() ) ) ) { + MESSAGE( "StreamLink " << anOutPort->NodeName() << "(" + << anOutPort->PortName() << ") --> " << toNode->Name() << "(" + << anInPort->PortName() << ")" << " ignored" ) ; + } + else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { + if ( begin ) { + beginService( "Graph_Impl::StreamLinks" ); + begin = false ; + } bool Success ; StreamLink_Impl * myStreamLink = new StreamLink_Impl( _Orb , _Poa , _ContId , instanceName() , interfaceName() , DataFlowEditor() , - aNode , + toNode , anInPort->PortName() , - anOutNode , + aNode , anOutPort->PortName() , false , Success ) ; if ( Success ) { @@ -206,115 +376,47 @@ SUPERV::ListOfStreamLinks * StreamGraph_Impl::StreamLinks( GraphBase::ComputingN << RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ; } } - } - else { - RetVal->length( countlink + 1 ) ; - RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( SUPERV::StreamLink::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ; - MESSAGE( "Link" << countlink-1 << " " - << RetVal[countlink-1]->OutStreamPort()->Node()->Name() << "(" - << RetVal[countlink-1]->OutStreamPort()->Name() << ") --> " - << RetVal[countlink-1]->InStreamPort()->Node()->Name() << "(" - << RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ; - } - } - } - } - } - } - } - for ( j = 0 ; j < aNode->GetNodeOutPortsSize() ; j++ ) { - GraphBase::OutPort * anOutPort = aNode->GetChangeNodeOutPort( j ) ; - int k ; - for ( k = 0 ; k < anOutPort->InPortsSize() ; k++ ) { - GraphBase::InPort * anInPort = anOutPort->ChangeInPorts( k ) ; - GraphEditor::InNode * toNode = (GraphEditor::InNode * ) DataFlowEditor()->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ; - if ( theNode == NULL || - !strcmp( theNode->Name() , aNode->Name() ) ) { - if ( anInPort->IsDataStream() ) { - if ( theNode || ( toNode->IsEndSwitchNode() && !aNode->IsSwitchNode() ) ) { - if ( anInputParam == NULL || - !strcmp( anInPort->PortName() , anInputParam ) ) { - MESSAGE( "StreamLink " << anOutPort->NodeName() << "(" - << anOutPort->PortName() << ") --> " << toNode->Name() << "(" - << anInPort->PortName() << ")" ) ; - MESSAGE( " IOR " << DataFlowEditor()->ObjectToString( anOutPort->InPortObjRef( anInPort ) ) ) ; - if ( anInPort->IsLoop() || anOutPort->IsLoop() || - ( toNode->IsEndLoopNode() && !strcmp( toNode->CoupledNode()->Name() , - anOutPort->NodeName() ) ) ) { - MESSAGE( "StreamLink " << anOutPort->NodeName() << "(" - << anOutPort->PortName() << ") --> " << toNode->Name() << "(" - << anInPort->PortName() << ")" << " ignored" ) ; - } - else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) { - if ( begin ) { - beginService( "Graph_Impl::StreamLinks" ); - begin = false ; - } - bool Success ; - StreamLink_Impl * myStreamLink = new StreamLink_Impl( - _Orb , _Poa , _ContId , - instanceName() , interfaceName() , - DataFlowEditor() , - toNode , - anInPort->PortName() , - aNode , - anOutPort->PortName() , - false , Success ) ; - if ( Success ) { - PortableServer::ObjectId * id = myStreamLink->getId() ; - CORBA::Object_var obj = _poa->id_to_reference(*id); - SUPERV::StreamLink_var iobject ; - iobject = SUPERV::StreamLink::_narrow(obj) ; + else { RetVal->length( countlink + 1 ) ; - RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( iobject ) ; - anOutPort->AddInPortObjRef( anInPort , SUPERV::StreamLink::_duplicate( iobject ) ) ; + RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( SUPERV::StreamLink::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ; MESSAGE( "Link" << countlink-1 << " " << RetVal[countlink-1]->OutStreamPort()->Node()->Name() << "(" << RetVal[countlink-1]->OutStreamPort()->Name() << ") --> " << RetVal[countlink-1]->InStreamPort()->Node()->Name() << "(" << RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ; - } + } } else { - RetVal->length( countlink + 1 ) ; - RetVal[ countlink++ ] = SUPERV::StreamLink::_duplicate( SUPERV::StreamLink::_narrow( anOutPort->InPortObjRef( anInPort ) ) ) ; - MESSAGE( "Link" << countlink-1 << " " - << RetVal[countlink-1]->OutStreamPort()->Node()->Name() << "(" - << RetVal[countlink-1]->OutStreamPort()->Name() << ") --> " - << RetVal[countlink-1]->InStreamPort()->Node()->Name() << "(" - << RetVal[countlink-1]->InStreamPort()->Name() << ")" ) ; + MESSAGE( "StreamLink " << anOutPort->NodeName() << "(" + << anOutPort->PortName() << ") --> " << toNode->Name() << "(" + << anInPort->PortName() << ")" << " skipped" ) ; } } - else { - MESSAGE( "StreamLink " << anOutPort->NodeName() << "(" - << anOutPort->PortName() << ") --> " << toNode->Name() << "(" - << anInPort->PortName() << ")" << " skipped" ) ; - } } } - } + } } } - } //#if 0 - const char * NodeName = "" ; - const char * InputParamName = "" ; - if ( theNode ) { - NodeName = theNode->Name() ; - } - if ( anInputParam ) { - InputParamName = anInputParam ; - } - MESSAGE( RetVal->length() << " StreamLinks of Node " << NodeName << " and of InPort " << InputParamName ) ; - for ( i = 0 ; i < (int ) RetVal->length() ; i++ ) { - MESSAGE( "Link" << i << " " << RetVal[i]->OutStreamPort()->Node()->Name() << "(" - << RetVal[i]->OutStreamPort()->Name() << ") --> " - << RetVal[i]->InStreamPort()->Node()->Name() << "(" - << RetVal[i]->InStreamPort()->Name() << ")" ) ; - } + const char * NodeName = "" ; + const char * InputParamName = "" ; + if ( theNode ) { + NodeName = theNode->Name() ; + } + if ( anInputParam ) { + InputParamName = anInputParam ; + } + MESSAGE( RetVal->length() << " StreamLinks of Node " << NodeName << " and of InPort " << InputParamName ) ; + for ( i = 0 ; i < (int ) RetVal->length() ; i++ ) { + MESSAGE( "Link" << i << " " << RetVal[i]->OutStreamPort()->Node()->Name() << "(" + << RetVal[i]->OutStreamPort()->Name() << ") --> " + << RetVal[i]->InStreamPort()->Node()->Name() << "(" + << RetVal[i]->InStreamPort()->Name() << ")" ) ; + } //#endif - if ( !begin ) { - endService( "StreamGraph_Impl::StreamLinks" ); + if ( !begin ) { + endService( "StreamGraph_Impl::StreamLinks" ); + } } return ( RetVal._retn() ) ; } @@ -322,9 +424,12 @@ SUPERV::ListOfStreamLinks * StreamGraph_Impl::StreamLinks( GraphBase::ComputingN bool StreamGraph_Impl::SetStreamParams( const long Timeout , const SUPERV::KindOfDataStreamTrace DataStreamTrace , const double DeltaTime ) { - bool sts = DataFlowEditor()->StreamGraph()->SetStreamParams( Timeout , DataStreamTrace , DeltaTime ) ; - if ( sts ) { - DataFlowEditor()->UnValid() ; + bool sts = false ; + if ( !IsMacro() ) { + sts = DataFlowEditor()->StreamGraph()->SetStreamParams( Timeout , DataStreamTrace , DeltaTime ) ; + if ( sts ) { + DataFlowEditor()->UnValid() ; + } } return sts ; } @@ -332,13 +437,15 @@ bool StreamGraph_Impl::SetStreamParams( const long Timeout , void StreamGraph_Impl::StreamParams( long & Timeout , SUPERV::KindOfDataStreamTrace & DataStreamTrace , double & DeltaTime ) { - DataFlowEditor()->StreamGraph()->StreamParams( Timeout , DataStreamTrace , DeltaTime ) ; + if ( !IsMacro() ) { + DataFlowEditor()->StreamGraph()->StreamParams( Timeout , DataStreamTrace , DeltaTime ) ; + } } long StreamGraph_Impl::SubStreamGraphsNumber() { // beginService( "StreamGraph_Impl::StreamGraphsNumber" ); long RetVal = 0 ; - if ( DataFlowEditor()->IsExecutable() ) { + if ( DataFlowEditor()->IsExecutable() && !IsMacro() ) { RetVal = DataFlowEditor()->SubStreamGraphsNumber() ; } // endService( "StreamGraph_Impl::SubStreamGraphsNumber" ); @@ -348,7 +455,7 @@ long StreamGraph_Impl::SubStreamGraphsNumber() { SUPERV::ListOfNodes * StreamGraph_Impl::SubStreamGraphsNodes( const long aSubStreamGraphNumber ) { beginService( "StreamGraph_Impl::SubStreamGraphsNodes" ); SUPERV::ListOfNodes_var RetVal = new SUPERV::ListOfNodes ; - if ( DataFlowEditor()->IsEditing() ) { + if ( DataFlowEditor()->IsEditing() && !IsMacro() ) { SUPERV::ListOfNodes * aGraphNodes = Nodes() ; int i ; // ComputingNodes @@ -415,12 +522,14 @@ SUPERV::ListOfNodes * StreamGraph_Impl::SubStreamGraphsNodes( const long aSubStr SUPERV::Graph_ptr StreamGraph_Impl::ToFlowGraph() { SUPERV::Graph_var iobject = SUPERV::Graph::_nil() ; beginService( "StreamGraph_Impl::ToFlowGraph" ); -// Graph_Impl * myFlowGraph = new Graph_Impl( _Orb , _Poa , _ContId , -// instanceName() , interfaceName() ) ; -// PortableServer::ObjectId * id = myFlowGraph->getId() ; -// CORBA::Object_var obj = _poa->id_to_reference(*id); - if ( !CORBA::is_nil( DataFlowEditor()->StreamGraph()->ObjRef() ) ) { - iobject = SUPERV::Graph::_narrow( DataFlowEditor()->StreamGraph()->ObjRef() ) ; + if ( !IsMacro() ) { +// Graph_Impl * myFlowGraph = new Graph_Impl( _Orb , _Poa , _ContId , +// instanceName() , interfaceName() ) ; +// PortableServer::ObjectId * id = myFlowGraph->getId() ; +// CORBA::Object_var obj = _poa->id_to_reference(*id); + if ( !CORBA::is_nil( DataFlowEditor()->StreamGraph()->ObjRef() ) ) { + iobject = SUPERV::Graph::_narrow( DataFlowEditor()->StreamGraph()->ObjRef() ) ; + } } endService( "StreamGraph_Impl::ToFlowGraph" ); return SUPERV::Graph::_duplicate( iobject ) ; @@ -428,74 +537,78 @@ SUPERV::Graph_ptr StreamGraph_Impl::ToFlowGraph() { bool StreamGraph_Impl::StreamMerge(const SUPERV::StreamGraph_ptr aStreamGraph ) { beginService( "StreamGraph_Impl::StreamMerge" ); - map< string , int > aMapOfNodes ; - bool RetVal = Merge( aStreamGraph , aMapOfNodes ) ; - if ( RetVal ) { - SUPERV::ListOfStreamLinks * aGraphLinks = aStreamGraph->GStreamLinks() ; - SUPERV::ListOfStreamPorts * aGraphPorts = aStreamGraph->StreamPorts() ; - cout << "Graph_Impl::Merge " << aGraphLinks->length() << " links " << aGraphPorts->length() << " GraphPorts" - << endl ; - int i ; - for ( i = 0 ; i < (int ) aGraphLinks->length() ; i++ ) { - SUPERV::StreamLink_var aLink = (*aGraphLinks)[ i ] ; - SUPERV::StreamPort_var OutPort = aLink->OutStreamPort() ; - SUPERV::StreamPort_var InPort = aLink->InStreamPort() ; - string * aLinkFromNodeName = new string( OutPort->Node()->Name() ) ; - string * aLinkToNodeName = new string( InPort->Node()->Name() ) ; - cout << "Graph_Impl::Merge " << aLinkFromNodeName << "(" << OutPort->Name() << ") ---> " - << aLinkToNodeName << "(" << InPort->Name() << ")" << endl ; - RetVal = DataFlowEditor()->AddLink( DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() , - OutPort->Name() , - DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() , - InPort->Name() ) ; - cout << "Graph_Impl::Merge " << aLinkFromNodeName << "(" << OutPort->Name() << ") ---> " - << aLinkToNodeName << "(" << InPort->Name() << ") RetVal" << RetVal << endl ; - if ( RetVal ) { - int j ; - for ( j = 1 ; j <= aLink->CoordsSize() ; j++ ) { - long X , Y ; - RetVal = aLink->Coords( j , X , Y ) ; - if ( !RetVal ) - break ; - RetVal = DataFlowEditor()->AddLinkCoord( DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() , - OutPort->Name() , - DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() , - InPort->Name() , - j , X , Y ) ; - if ( !RetVal ) { - break ; - } - } - } - delete aLinkFromNodeName ; - delete aLinkToNodeName ; - if ( !RetVal ) { - break ; - } - } + bool RetVal = false ; + if ( !IsMacro() ) { + map< string , int > aMapOfNodes ; + RetVal = Merge( aStreamGraph , aMapOfNodes ) ; if ( RetVal ) { - for ( i = 0 ; i < (int ) aGraphPorts->length() ; i++ ) { - SUPERV::StreamPort_var aPort = (*aGraphPorts)[ i ] ; - if ( !aPort->IsGate() ) { - MESSAGE( "Graph_Impl::Merge " << i << ". " << aPort->Node()->Name() << " " << aPort->Name() ) ; - char * aPortName = aPort->Name() ; - char * aNodeName = new char[ strlen( aPortName ) + 1 ] ; - strcpy( aNodeName , aPortName ) ; - char * thePortName = strchr( aNodeName , '\\' ) ; - thePortName[ 0 ] = '\0' ; - bool hasinput = aStreamGraph->Node( aNodeName )->Port( thePortName + 1 )->HasInput() ; -// cout << "Graph_Impl::Merge " << " aNodeName " << aNodeName << " aPort " << thePortName + 1 -// << " HasInput " << hasinput << endl ; - if ( hasinput ) { - RetVal = DataFlowEditor()->AddInputData( DataFlowEditor()->StreamGraph()->GetGraphNode( aMapOfNodes[ aNodeName ] )->Name() , - thePortName + 1 , - *(aPort->ToAny()) ) ; - } - delete [] aNodeName ; - if ( !RetVal ) { - break ; + SUPERV::ListOfStreamLinks * aGraphLinks = aStreamGraph->GStreamLinks() ; + SUPERV::ListOfStreamPorts * aGraphPorts = aStreamGraph->StreamPorts() ; + //cout << "Graph_Impl::StreamMerge " << aGraphLinks->length() << " links " << aGraphPorts->length() +// << " GraphPorts" << endl ; + int i ; + for ( i = 0 ; i < (int ) aGraphLinks->length() ; i++ ) { + SUPERV::StreamLink_var aLink = (*aGraphLinks)[ i ] ; + SUPERV::StreamPort_var OutPort = aLink->OutStreamPort() ; + SUPERV::StreamPort_var InPort = aLink->InStreamPort() ; + string * aLinkFromNodeName = new string( OutPort->Node()->Name() ) ; + string * aLinkToNodeName = new string( InPort->Node()->Name() ) ; + //cout << "Graph_Impl::StreamMerge " << aLinkFromNodeName << "(" << OutPort->Name() << ") ---> " +// << aLinkToNodeName << "(" << InPort->Name() << ")" << endl ; + RetVal = DataFlowEditor()->AddLink( DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() , + OutPort->Name() , + DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() , + InPort->Name() ) ; + //cout << "Graph_Impl::StreamMerge " << aLinkFromNodeName << "(" << OutPort->Name() << ") ---> " +// << aLinkToNodeName << "(" << InPort->Name() << ") RetVal" << RetVal << endl ; + if ( RetVal ) { + int j ; + for ( j = 1 ; j <= aLink->CoordsSize() ; j++ ) { + long X , Y ; + RetVal = aLink->Coords( j , X , Y ) ; + if ( !RetVal ) + break ; + RetVal = DataFlowEditor()->AddLinkCoord( DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkFromNodeName->c_str() ] )->Name() , + OutPort->Name() , + DataFlowEditor()->Graph()->GetGraphNode( aMapOfNodes[ aLinkToNodeName->c_str() ] )->Name() , + InPort->Name() , + j , X , Y ) ; + if ( !RetVal ) { + break ; + } } - } + } + delete aLinkFromNodeName ; + delete aLinkToNodeName ; + if ( !RetVal ) { + break ; + } + } + if ( RetVal ) { + for ( i = 0 ; i < (int ) aGraphPorts->length() ; i++ ) { + SUPERV::StreamPort_var aPort = (*aGraphPorts)[ i ] ; + if ( !aPort->IsGate() ) { + MESSAGE( "Graph_Impl::StreamMerge " << i << ". " << aPort->Node()->Name() << " " << aPort->Name() ) ; + char * aPortName = aPort->Name() ; + char * aNodeName = new char[ strlen( aPortName ) + 1 ] ; + strcpy( aNodeName , aPortName ) ; +// char * thePortName = strchr( aNodeName , '\\' ) ; + char * thePortName = strchr( aNodeName , '_' ) ; + thePortName[ 0 ] = '\0' ; + bool hasinput = aStreamGraph->Node( aNodeName )->Port( thePortName + 1 )->HasInput() ; +// cout << "Graph_Impl::StreamMerge " << " aNodeName " << aNodeName << " aPort " << thePortName + 1 +// << " HasInput " << hasinput << endl ; + if ( hasinput ) { + RetVal = DataFlowEditor()->AddInputData( DataFlowEditor()->StreamGraph()->GetGraphNode( aMapOfNodes[ aNodeName ] )->Name() , + thePortName + 1 , + *(aPort->ToAny()) ) ; + } + delete [] aNodeName ; + if ( !RetVal ) { + break ; + } + } + } } } } diff --git a/src/Supervision/StreamGraph_Impl.hxx b/src/Supervision/StreamGraph_Impl.hxx index c3ea3bd..58bca48 100644 --- a/src/Supervision/StreamGraph_Impl.hxx +++ b/src/Supervision/StreamGraph_Impl.hxx @@ -39,8 +39,8 @@ #include "Graph_Impl.hxx" -class StreamGraph_Impl : public Graph_Impl , - public POA_SUPERV::StreamGraph { +class StreamGraph_Impl : public POA_SUPERV::StreamGraph , + public Graph_Impl { private: CORBA::ORB_ptr _Orb ; @@ -54,34 +54,45 @@ class StreamGraph_Impl : public Graph_Impl , PortableServer::ObjectId * contId , const char *instanceName , const char *interfaceName , - const char *aDataFlowName ) ; + const char *aDataFlowName , + const SUPERV::KindOfNode aKindOfGraphNode = SUPERV::DataStreamGraph ) ; + StreamGraph_Impl( CORBA::ORB_ptr orb , + PortableServer::POA_ptr poa , + PortableServer::ObjectId * contId , + const char *instanceName , + const char *interfaceName , + GraphEditor::DataFlow * DataFlowEditor , + GraphEditor::InNode * DataFlowNode ) ; + + virtual ~StreamGraph_Impl() ; + virtual void destroy() ; - virtual ~StreamGraph_Impl() ; - virtual void destroy() ; + virtual SUPERV::StreamGraph_ptr StreamCopy() ; - virtual SUPERV::StreamGraph_ptr StreamCopy() ; + virtual SUPERV::StreamGraph_ptr StreamMNode( const char * aXmlFileName ) ; + virtual SUPERV::StreamGraph_ptr StreamGraphMNode( SUPERV::StreamGraph_ptr aStreamGraph ) ; - virtual SUPERV::StreamLink_ptr StreamLink( SUPERV::StreamPort_ptr OutStreamPort , - SUPERV::StreamPort_ptr InStreamPort ) ; + virtual SUPERV::StreamLink_ptr StreamLink( SUPERV::StreamPort_ptr OutStreamPort , + SUPERV::StreamPort_ptr InStreamPort ) ; - virtual SUPERV::ListOfStreamLinks * GStreamLinks() ; + virtual SUPERV::ListOfStreamLinks * GStreamLinks() ; - virtual SUPERV::ListOfStreamLinks * StreamLinks( GraphBase::ComputingNode * aNode , - const char * anInputParam ) ; + virtual SUPERV::ListOfStreamLinks * StreamLinks( GraphBase::ComputingNode * aNode , + const char * anInputParam ) ; - virtual bool SetStreamParams( const long Timeout , - const SUPERV::KindOfDataStreamTrace DataStreamTrace , - const double DeltaTime ) ; - virtual void StreamParams( long & Timeout , - SUPERV::KindOfDataStreamTrace & DataStreamTrace , - double & DeltaTime ) ; + virtual bool SetStreamParams( const long Timeout , + const SUPERV::KindOfDataStreamTrace DataStreamTrace , + const double DeltaTime ) ; + virtual void StreamParams( long & Timeout , + SUPERV::KindOfDataStreamTrace & DataStreamTrace , + double & DeltaTime ) ; - virtual long SubStreamGraphsNumber() ; - virtual SUPERV::ListOfNodes * SubStreamGraphsNodes( const long aSubStreamGraphNumber ) ; + virtual long SubStreamGraphsNumber() ; + virtual SUPERV::ListOfNodes * SubStreamGraphsNodes( const long aSubStreamGraphNumber ) ; - virtual SUPERV::Graph_ptr ToFlowGraph() ; + virtual SUPERV::Graph_ptr ToFlowGraph() ; - bool StreamMerge( const SUPERV::StreamGraph_ptr aStreamGraph ) ; + bool StreamMerge( const SUPERV::StreamGraph_ptr aStreamGraph ) ; }; diff --git a/src/Supervision/SuperV.py b/src/Supervision/SuperV.py index 76e33d7..7055d82 100644 --- a/src/Supervision/SuperV.py +++ b/src/Supervision/SuperV.py @@ -448,6 +448,12 @@ class CNode: return self.N.IsStreamGraph() def IsGraph( self ): return self.N.IsGraph() + def IsMacro( self ): + return self.N.IsMacro() + def IsFlowMacro( self ): + return self.N.IsFlowMacro() + def IsStreamMacro( self ): + return self.N.IsStreamMacro() def IsComputing( self ): return self.N.IsComputing() def IsFactory( self ): @@ -464,6 +470,8 @@ class CNode: return self.N.IsSwitch() def IsEndSwitch( self ): return self.N.IsEndSwitch() + def GraphLevel( self ) : + return self.N.GraphLevel() def SubGraph( self ): return self.N.SubGraph() def SubStreamGraph( self ): @@ -484,8 +492,6 @@ class CNode: return self.N.Control() def ControlClear( self ): return self.N.ControlClear() - def AutoState( self ): - return self.N.AutoState() def ReadyW( self ): return self.N.ReadyW() def RunningW( self ): @@ -708,7 +714,7 @@ class ESNode(GNode): # self.Parametername = aServicesParameter.Parametername ########################################################## -class Graph(INode): +class Graph(GNode): ########################################################## def __init__( self , aName ): try: @@ -717,7 +723,7 @@ class Graph(INode): try: graph = aName.G.Copy() except: - graph = None + graph = aName if graph != None : if graph.IsStreamGraph() : aGraph = graph.ToStreamGraph() @@ -803,6 +809,36 @@ class Graph(INode): if self.G.Verbose : print ErrMsg return aNode + def MNode( self , aGraphXml ): + aMNode = self.G.MNode( aGraphXml ) + if aMNode != None : + myMNode = MNode( aMNode , self.G.Verbose ) + return myMNode + ErrMsg = "Failed to create a MNode" + if self.G.Verbose : + print ErrMsg + return aMNode + def GraphMNode( self , aGraph ): + aGraphMNode = self.G.GraphMNode( aGraph.G ) + if aGraphMNode != None : + myMNode = MNode( aGraphMNode , self.G.Verbose ) + return myMNode + ErrMsg = "Failed to create a MNode" + if self.G.Verbose : + print ErrMsg + return aGraphMNode + def FlowObjRef( self ) : + aGraph = self.G.FlowObjRef() + if aGraph != None : + myGraph = Graph( aGraph ) + return myGraph + return aGraph + def StreamObjRef( self ) : + aGraph = self.G.StreamObjRef() + if aGraph != None : + myGraph = StreamGraph( aGraph ) + return myGraph + return aGraph def PrintService( self , aComponent , anInterface , aService ): NodeComponent = modulecatalog.GetComponent( aComponent ) aService = NodeComponent.GetService( anInterface , aService ) @@ -957,6 +993,12 @@ class Graph(INode): pynodes.append( GNode( nodes.ESNodes[i] , self.G.Verbose ) ) i = i + 1 j = j + 1 + n = len( nodes.Graphs ) + i = 0 + while i < n : + pynodes.append( MNode( nodes.Graphs[i] , self.G.Verbose ) ) + i = i + 1 + j = j + 1 return pynodes def ListNodes( self , *args ): nodes = self.Nodes() @@ -989,7 +1031,7 @@ class Graph(INode): nodes = self.Nodes() i = 0 while i < len( nodes ) : - print nodes[i].Name(),nodes[i].Thread(),nodes[i].State(),nodes[i].Control(),nodes[i].AutoState() + print nodes[i].Name(),nodes[i].Thread(),nodes[i].State(),nodes[i].Control(),nodes[i] i = i + 1 def GLinks( self ): links = self.G.GLinks() @@ -1051,8 +1093,8 @@ class Graph(INode): while i < len( links ) : links[ i ].Print() i = i + 1 - def Graphs( self ): - graphs = self.G.Graphs() + def SubGraphsNodes( self , ): + graphs = self.G.SubGraphsNodes() outgraphs = graphs i = 0 while i < len( graphs ) : @@ -1097,6 +1139,15 @@ class GraphE(Graph): return StreamGraphE( aGraph ) return None +########################################################## +class MNode(Graph): +########################################################## + def __init__( self , aMNode , Verbose ): + self.G = aMNode + self.G.Verbose = Verbose + self.N = aMNode + self.N.Verbose = Verbose + ########################################################## class StreamGraph(Graph): ########################################################## diff --git a/src/Supervision/Value_Impl.cxx b/src/Supervision/Value_Impl.cxx index 95a89a1..28ea393 100644 --- a/src/Supervision/Value_Impl.cxx +++ b/src/Supervision/Value_Impl.cxx @@ -63,9 +63,17 @@ Value_Impl::Value_Impl( CORBA::ORB_ptr orb , if ( ParameterName != NULL ) { _ParameterName = new char[ strlen( ParameterName ) + 1 ] ; strcpy( _ParameterName , ParameterName ) ; + if ( DataFlowNode ) { + _NodeName = new char[ strlen( DataFlowNode->Name() ) + 1 ] ; + strcpy( _NodeName , DataFlowNode->Name() ) ; + } + else { + _NodeName = NULL ; + } } else { _ParameterName = NULL ; + _NodeName = NULL ; } _InputValue = false ; _Any = new CORBA::Any( *anAny ) ; @@ -96,9 +104,17 @@ Value_Impl::Value_Impl( CORBA::ORB_ptr orb , if ( ParameterName != NULL ) { _ParameterName = new char[ strlen( ParameterName ) + 1 ] ; strcpy( _ParameterName , ParameterName ) ; + if ( DataFlowNode ) { + _NodeName = new char[ strlen( DataFlowNode->Name() ) + 1 ] ; + strcpy( _NodeName , DataFlowNode->Name() ) ; + } + else { + _NodeName = NULL ; + } } else { _ParameterName = NULL ; + _NodeName = NULL ; } _InputValue = false ; _Any = new CORBA::Any() ; diff --git a/src/Supervision/Value_Impl.hxx b/src/Supervision/Value_Impl.hxx index da02747..0e55ee5 100644 --- a/src/Supervision/Value_Impl.hxx +++ b/src/Supervision/Value_Impl.hxx @@ -50,6 +50,7 @@ class Value_Impl : public POA_SUPERV::Value , GraphEditor::DataFlow * _DataFlowEditor ; GraphEditor::InNode * _DataFlowNode ; + char * _NodeName ; char * _ParameterName ; bool _InputPort ; bool _InputValue ; diff --git a/src/SyrComponent/SyrComponent_Impl.cxx b/src/SyrComponent/SyrComponent_Impl.cxx deleted file mode 100755 index 3c93ed7..0000000 --- a/src/SyrComponent/SyrComponent_Impl.cxx +++ /dev/null @@ -1,398 +0,0 @@ -// SuperVisionTest SyrComponent : example of component performing some mathinatical operations -// -// 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 : SyrComponent_Impl.cxx -// Author : Jean Rahuel, CEA -// Module : SuperVisionTest - -using namespace std; -#include -#include -#include -#include -#include - -//#include "utilities.h" - -#include "SyrComponent_Impl.hxx" -#include "Adder_Impl.hxx" - -SyrComponent_Impl::SyrComponent_Impl( CORBA::ORB_ptr orb , - PortableServer::POA_ptr poa , - PortableServer::ObjectId * contId , - const char *instanceName , - const char *interfaceName , - const bool kactivate ) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) { - MESSAGE("SyrComponent_Impl::SyrComponent_Impl this " << hex << this << dec - << "activate object instanceName(" - << instanceName << ") interfaceName(" << interfaceName << ")" ) - if ( kactivate ) { - _thisObj = this ; - _id = _poa->activate_object(_thisObj); - } -} - -SyrComponent_Impl::SyrComponent_Impl() { -} - -SyrComponent_Impl::~SyrComponent_Impl() { -} - -long SyrComponent_Impl::C_ISEVEN( const long anInteger ) { - bool RetVal ; - beginService( " SyrComponent_Impl::C_ISEVEN" ); - sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_ISEVEN is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - RetVal = ( anInteger & 1 ) == 0 ; - endService( " SyrComponent_Impl::C_ISEVEN" ); - return RetVal ; -} - -long SyrComponent_Impl::C_ISONE( const long anOddInteger ) { - bool RetVal ; - beginService( " SyrComponent_Impl::C_ISONE" ); - sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_ISONE is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - RetVal = ( anOddInteger == 1 ) ; - endService( " SyrComponent_Impl::C_ISONE" ); - return RetVal ; -} - -long SyrComponent_Impl::C_M3( const long anOddInteger ) { - beginService( " SyrComponent_Impl::C_M3" ); - sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_M3 is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - endService( " SyrComponent_Impl::C_M3" ); - if ( C_ISEVEN( anOddInteger ) ) - return 0 ; - return ( 3*anOddInteger ) ; -} - -long SyrComponent_Impl::C_M3P1( const long anOddInteger ) { - beginService( " SyrComponent_Impl::C_M3P1" ); - sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_M3P1 is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - endService( " SyrComponent_Impl::C_M3P1" ); - if ( C_ISEVEN( anOddInteger ) ) - return 0 ; - return ( 3*anOddInteger + 1 ) ; -} - -long SyrComponent_Impl::C_DIV2( const long anEvenInteger ) { - beginService( " SyrComponent_Impl::C_DIV2" ); - sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_DIV2 is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - endService( " SyrComponent_Impl::C_DIV2" ); - if ( !C_ISEVEN( anEvenInteger ) ) - return 0 ; - return ( anEvenInteger >> 1 ) ; -} - -long SyrComponent_Impl::C_INCR( const long aCount ) { - beginService( " SyrComponent_Impl::C_INCR" ); - sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_INCR is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - endService( " SyrComponent_Impl::C_INCR" ); - return ( aCount + 1 ) ; -} - -long SyrComponent_Impl::C_MIN( const long aMinVal , const long anInteger ) { - beginService( " SyrComponent_Impl::C_MIN" ); - sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_MIN is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - int min = aMinVal ; - if ( anInteger < min || aMinVal == 0 ) { - min = anInteger ; - } - string trace = "SyrComponent_Impl::C_MIN : " ; - char cmin[ 30 ] ; - sprintf( cmin , "%d" , min ) ; - trace += cmin ; - sendMessage(NOTIF_TRACE, trace.c_str() ); - endService( " SyrComponent_Impl::C_MIN" ); - return min ; -} - -long SyrComponent_Impl::C_MAX( const long aMaxVal , const long anInteger ) { - beginService( " SyrComponent_Impl::C_MAX" ); - sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_MAX is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - int max = aMaxVal ; - if ( anInteger > max ) { - max = anInteger ; - } - string trace = "SyrComponent_Impl::C_MAX : " ; - char cmax[ 30 ] ; - sprintf( cmax , "%d" , max ) ; - trace += cmax ; - sendMessage(NOTIF_TRACE, trace.c_str() ); - endService( " SyrComponent_Impl::C_MAX" ); - return max ; -} - -SuperVisionTest::ListOfSyr_ptr SyrComponent_Impl::C_LISTOFSYR() { - beginService( " SyrComponent_Impl::C_LISTOFSYR" ); - sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_LISTOFSYR is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - ListOfSyr_Impl * aNewListOfSyr = new ListOfSyr_Impl( _orb , _poa, _contId, - instanceName() , interfaceName() , - graphName() , nodeName() ) ; - SuperVisionTest::ListOfSyr_var iobject = (SuperVisionTest::ListOfSyr_var ) NULL ; - PortableServer::ObjectId * id = aNewListOfSyr->getId() ; - CORBA::Object_var obj = _poa->id_to_reference(*id); - iobject = SuperVisionTest::ListOfSyr::_narrow(obj) ; - endService( " SyrComponent_Impl::C_LISTOFSYR" ); - return SuperVisionTest::ListOfSyr::_duplicate( iobject ) ; -// return ( aNewListOfSyr._retn() ) ; -} - -SuperVisionTest::ListOfSyr_ptr SyrComponent_Impl::C_AVERAGE( - const SuperVisionTest::ListOfSyr_ptr aListOfSyr , - const long anInteger , - const long aCount , - double & anAverage ) { - beginService( " SyrComponent_Impl::C_AVERAGE" ); - sendMessage(NOTIF_STEP, "SyrComponent_Impl::C_AVERAGE is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - SuperVisionTest::SeqOfSyr * aSeqOfSyr = aListOfSyr->GetSeqOfSyr() ; - int len = aSeqOfSyr->length() ; - aSeqOfSyr->length( len + 1 ) ; - (*aSeqOfSyr)[ len ] = anInteger ; - aListOfSyr->SetSeqOfSyr( *aSeqOfSyr ) ; - anAverage = 0 ; - int i ; - for ( i = 0 ; i < len + 1 ; i++ ) { - anAverage += (*aSeqOfSyr)[ i ] ; - } - anAverage = anAverage / ( len + 1 ) ; - string end = " SyrComponent_Impl::C_AVERAGE " ; - char caverage[ 30 ] ; - sprintf( caverage , "%fd" , anAverage ) ; - end += caverage ; - endService( end.c_str() ); - return SuperVisionTest::ListOfSyr::_duplicate( aListOfSyr ) ; -} - -SuperVisionTest::Syr_ptr SyrComponent_Impl::Init( const long anOddInteger ) { - beginService( "SyrComponent_Impl::Init" ); - sendMessage(NOTIF_STEP, "SyrComponent_Impl creates Syr_Impl"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - Syr_Impl * mySyr ; - mySyr = new Syr_Impl( _orb , _poa, _contId, - instanceName() , interfaceName() , - graphName() , nodeName() , anOddInteger ) ; - SuperVisionTest::Syr_var iobject = (SuperVisionTest::Syr_var ) NULL ; - PortableServer::ObjectId * id = mySyr->getId() ; - CORBA::Object_var obj = _poa->id_to_reference(*id); - iobject = SuperVisionTest::Syr::_narrow(obj) ; - endService( "SyrComponent_Impl::Init" ); - return SuperVisionTest::Syr::_duplicate(iobject) ; -} - -ListOfSyr_Impl::ListOfSyr_Impl( CORBA::ORB_ptr orb , - PortableServer::POA_ptr poa , - PortableServer::ObjectId * contId , - const char * instanceName , - const char * interfaceName , - const char * graphName , - const char * nodeName ) : - Engines_Component_i(orb, poa, contId, instanceName, interfaceName,1,true) { - Names( graphName , nodeName ) ; - MESSAGE("ListOfSyr_Impl::ListOfSyr_Impl activate object instanceName(" - << instanceName << ") interfaceName(" << interfaceName << ") --> " - << hex << (void *) this << dec ) - beginService( "ListOfSyr_Impl::ListOfSyr_Impl" ); - _thisObj = this ; - _id = _poa->activate_object(_thisObj); - sendMessage(NOTIF_STEP, "ListOfSyr_Impl is Created"); - endService( "ListOfSyr_Impl::ListOfSyr_Impl" ); -} - -ListOfSyr_Impl::ListOfSyr_Impl() { -} - -ListOfSyr_Impl::~ListOfSyr_Impl() { - beginService( "ListOfSyr_Impl::~ListOfSyr_Impl" ); - endService( "ListOfSyr_Impl::~ListOfSyr_Impl" ); -} - -SuperVisionTest::SeqOfSyr * ListOfSyr_Impl::GetSeqOfSyr() { - SuperVisionTest::SeqOfSyr_var aSeqOfSyr = new SuperVisionTest::SeqOfSyr( _SeqOfSyr ) ; - return ( aSeqOfSyr._retn() ) ; -} - -void ListOfSyr_Impl::SetSeqOfSyr( const SuperVisionTest::SeqOfSyr & aSeqOfSyr ) { - _SeqOfSyr = aSeqOfSyr ; - return ; -} - -extern "C" -{ - PortableServer::ObjectId * SyrComponentEngine_factory - (CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) - { - MESSAGE("SyrComponentEngine_factory SyrComponentEngine (" - << instanceName << "," << interfaceName << "," << getpid() << ")"); - SyrComponent_Impl * mySyrComponent - = new SyrComponent_Impl(orb, poa, contId, instanceName, interfaceName); - return mySyrComponent->getId() ; - } -} - -Syr_Impl::Syr_Impl( CORBA::ORB_ptr orb , - PortableServer::POA_ptr poa , - PortableServer::ObjectId * contId , - const char * instanceName , - const char * interfaceName , - const char * graphName , - const char * nodeName , - const long anOddInteger ) : - SyrComponent_Impl(orb, poa, contId, instanceName, interfaceName,false) { - Names( graphName , nodeName ) ; - MESSAGE("Syr_Impl::Syr_Impl activate object instanceName(" - << instanceName << ") interfaceName(" << interfaceName << ") --> " - << hex << (void *) this << dec ) - beginService( "Syr_Impl::Syr_Impl" ); - _thisObj = this ; - _id = _poa->activate_object(_thisObj); - _InitialInteger = anOddInteger ; - _CurrentInteger = anOddInteger ; - _Count = 0 ; - sendMessage(NOTIF_STEP, "Syr_Impl is Created"); - endService( "Syr_Impl::Syr_Impl" ); -} - -Syr_Impl::Syr_Impl() { -} - -Syr_Impl::~Syr_Impl() { - beginService( "Syr_Impl::~Syr_Impl" ); - endService( "Syr_Impl::~Syr_Impl" ); -} - -long Syr_Impl::Initial() { - beginService( " Syr_Impl::Initial" ); - sendMessage(NOTIF_STEP, "Syr_Impl::Initial is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - endService( " Syr_Impl::Initial" ); - return _InitialInteger ; -} - -long Syr_Impl::Current() { - beginService( " Syr_Impl::Current" ); - sendMessage(NOTIF_STEP, "Syr_Impl::Current is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - endService( " Syr_Impl::Current" ); - return _CurrentInteger ; -} - -long Syr_Impl::IsEven() { - bool RetVal ; - beginService( " Syr_Impl::IsEven" ); - sendMessage(NOTIF_STEP, "Syr_Impl::IsEven is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - RetVal = ( _CurrentInteger & 1 ) == 0 ; - MESSAGE( " Syr_Impl::IsEven " << _CurrentInteger << " " << RetVal ); - endService( " Syr_Impl::IsEven" ); - return RetVal ; -} - -long Syr_Impl::IsOne() { - bool RetVal ; - beginService( " Syr_Impl::IsOne" ); - sendMessage(NOTIF_STEP, "Syr_Impl::IsOne is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - RetVal = ( _CurrentInteger == 1 ) ; - MESSAGE( " Syr_Impl::IsOne " << _CurrentInteger << " " << RetVal ); - endService( " Syr_Impl::IsOne" ); - return RetVal ; -} - -long Syr_Impl::Count() { - beginService( " Syr_Impl::Count" ); - sendMessage(NOTIF_STEP, "Syr_Impl::Count is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - MESSAGE( " Syr_Impl::Count " << _Count ); - endService( " Syr_Impl::Count" ); - return _Count ; -} - -void Syr_Impl::M3p1() { - beginService( " Syr_Impl::M3p1" ); - sendMessage(NOTIF_STEP, "Syr_Impl::M3p1 is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - if ( IsEven() ) - _CurrentInteger = 0 ; - else - _CurrentInteger = 3*_CurrentInteger + 1 ; - MESSAGE( " Syr_Impl::M3p1 " << _CurrentInteger ); - endService( " Syr_Impl::M3p1" ); -} - -void Syr_Impl::Div2() { - beginService( " Syr_Impl::Div2" ); - sendMessage(NOTIF_STEP, "Syr_Impl::Div2 is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - if ( !IsEven() ) - _CurrentInteger = 0 ; - else - _CurrentInteger = ( _CurrentInteger >> 1 ) ; - MESSAGE( " Syr_Impl::Div2 " << _CurrentInteger ); - endService( " Syr_Impl::Div2" ); -} - -void Syr_Impl::Incr() { - beginService( " Syr_Impl::Incr" ); - sendMessage(NOTIF_STEP, "Syr_Impl::Incr is Computing"); - int S = 1+(int) (2.0*rand()/(RAND_MAX+1.0)); - sleep(S); - _Count = _Count + 1 ; - MESSAGE( " Syr_Impl::Incr " << _Count ); - endService( " Syr_Impl::Incr" ); -} - - - -- 2.39.2