]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Debug of MacroNodes : developpement of missing code for Gate management of MacroNodes
authorrahuel <rahuel@opencascade.com>
Fri, 14 Oct 2005 11:44:04 +0000 (11:44 +0000)
committerrahuel <rahuel@opencascade.com>
Fri, 14 Oct 2005 11:44:04 +0000 (11:44 +0000)
src/GraphExecutor/DataFlowExecutor_DataFlow.cxx

index a1da842bc21d9ca7bbbabe357dd0d7f6b71beb7a..82cb5fc0bee4d2c33807e6d27275efb3a76e8d2b 100644 (file)
@@ -183,6 +183,18 @@ bool GraphExecutor::DataFlow::OutputOfAny( const char * aNodeName ,
   RetVal = Graph()->AddOutputData( aNodeName , ToServiceParameterName , aValue ) ;
   GraphBase::OutPort * anOutPort = aMacroNode->GetChangeOutPort( ToServiceParameterName ) ;
   int i ;
+  for ( i = 0 ; i < aMacroNode->GetNodeOutPortsSize() ; i++ ) {
+    cdebug << "Out" << i << " " << aMacroNode->GetNodeOutPort( i )->PortName() << " "
+           << aMacroNode->GetChangeNodeOutPort( i )->State() << " Done="
+           << aMacroNode->GetChangeNodeOutPort( i )->Done() << " " ;
+    if ( GraphBase::Base::_prof_debug ) {
+      aMacroNode->GetNodeOutPort( i )->StringValue( *GraphBase::Base::_fdebug ) ;
+    }
+    if ( aMacroNode->GetChangeNodeOutPort( i )->IsGate() ) {
+      cdebug << " BoolValue " << aMacroNode->GetChangeNodeOutPort( i )->BoolValue() ;
+    }
+    cdebug << endl ;
+  }
 // Loop over Inports linked to that OutPort of the MacroNode
   for ( i = 0 ; i < anOutPort->InPortsSize() ; i++ ) {
     const char * ToNodeName = anOutPort->ChangeInPorts( i )->NodeName() ;
@@ -204,11 +216,21 @@ bool GraphExecutor::DataFlow::OutputOfAny( const char * aNodeName ,
              << "->SendSomeDataReady( " << aNodeName << " ) sts " << sts << " " << aLinkedNode->State() << endl ;
       if ( sts ) {
         if ( aLinkedNode->State() == GraphExecutor::DataReadyState ) {
-          aLinkedNode->CreateNewThreadIf( true ) ;
+          cdebug << pthread_self() << "/" << aLinkedNode->ThreadNo()
+                 << "GraphExecutor::DataFlow::OutputOfAny SendEvent(ExecuteEvent) to "
+                 << aLinkedNode->Name() << endl ;
+//JR 29.09.2005 Debug :
+//          aLinkedNode->CreateNewThreadIf( true ) ;
+          aLinkedNode->CreateNewThread( true ) ;
           aLinkedNode->UnLockDataWait() ;
 //          aLinkedNode->DataUndef_AllDataReadyAction() ;
           aLinkedNode->SendEvent( GraphExecutor::ExecuteEvent ) ;
         }
+        else {
+          cdebug << pthread_self() << "/" << aLinkedNode->ThreadNo()
+                 << "GraphExecutor::DataFlow::OutputOfAny NO SendEvent(ExecuteEvent) to "
+                 << aLinkedNode->Name() << endl ;
+        }
       }
     }
     else if ( Graph()->GraphMacroLevel() != 0 ) {