]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Execution of graphs with GOTONodes
authorrahuel <rahuel@opencascade.com>
Mon, 17 Jan 2005 13:03:43 +0000 (13:03 +0000)
committerrahuel <rahuel@opencascade.com>
Mon, 17 Jan 2005 13:03:43 +0000 (13:03 +0000)
src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx

index 0192a5d5cbcbf02a326d1d3cb0fba363aa60e42f..b33fa38e40da9634d376e03872d1a9a5ce7ed8ae 100644 (file)
@@ -883,6 +883,25 @@ int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() {
         if ( GraphBase::Base::_prof_debug ) {
           anOutPort->StringValue( *GraphBase::Base::_fdebug ) ;
        }
+#endif
+        cdebug << endl ;
+      }
+      else if ( anInPort->IsGate() &&
+                _OutNode->Graph()->GetGraphNode( anOutPort->NodeName() )->IsGOTONode() ) {
+// GateOutPort of GOTONodes are always opened
+        anInPort->State( SUPERV::ReadyState ) ;
+        InReady += 1 ;
+        CORBA::Any * anAny = new CORBA::Any() ;
+        *anAny <<= (long ) 1 ;
+        _OutNode->Graph()->GetGraphNode( anOutPort->NodeName() )->GetChangeNodeOutGate()->Value( anAny ) ;
+        cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " "
+               << anInPort->PortName() << " Was Done from Node "
+               << anOutPort->NodeName() << "( " << anOutPort->PortName()
+               << ") GOTONode" ;
+#ifdef _DEBUG_
+        if ( GraphBase::Base::_prof_debug ) {
+          anOutPort->StringValue( *GraphBase::Base::_fdebug ) ;
+       }
 #endif
         cdebug << endl ;
       }
@@ -2807,7 +2826,8 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err ,
   int i ;
   GraphBase::OutPort * aGateOutPort = NULL ;
   bool OrSwitch = false ;
-  cdebug << "OutParametersSet " << Name() << " nOutParams " << nOutParams << " NewState " << NewState << endl ;
+  cdebug_in << "OutParametersSet " << Name() << " nOutParams " << nOutParams << " NewState "
+            << NewState << endl ;
 //  cout << "OutParametersSet " << Name() << " nOutParams " << nOutParams << " NewState " << NewState << endl ;
   if ( nOutParams && !IsMacroNode() ) {
     GraphBase::OutPort * anOutPort ;
@@ -2909,12 +2929,13 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err ,
             anOutPort->Value( OutParametersList[i].Value );
             if ( anOutPort->InPortsSize() && anOutPort->ChangeInPorts( 0 )->IsGate() ) {
               if ( OrSwitch && anOutPort->BoolValue() ) {
-                cdebug << "GraphExecutor::InNodeThreads::OutParameters more than one switch is true WARNING"
+                cdebug << "GraphExecutor::InNodeThreads::OutParameters more than one switch is true ERROR"
                        << endl ;
                 RetVal = false ;
              }
               else {
                 OrSwitch = OrSwitch | anOutPort->BoolValue() ;
+                cdebug << "InNodeThreads::OutParameters OrSwitch = true" << endl ;
              }
            }
             cdebug << "OutParametersSet OrSwitch " << OrSwitch ;
@@ -3055,5 +3076,7 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err ,
       }
     }
   }
+  cdebug_out << "OutParametersSet " << Name() << " nOutParams " << nOutParams << " NewState "
+             << NewState << " RetVal " << RetVal << endl ;
   return RetVal ;
 }