From 4e35eea73015f81c8a86baa6591cd1e26e4b39e5 Mon Sep 17 00:00:00 2001 From: rahuel Date: Fri, 14 Oct 2005 11:44:04 +0000 Subject: [PATCH] Debug of MacroNodes : developpement of missing code for Gate management of MacroNodes --- .../DataFlowExecutor_DataFlow.cxx | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx b/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx index a1da842..82cb5fc 100644 --- a/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx +++ b/src/GraphExecutor/DataFlowExecutor_DataFlow.cxx @@ -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 ) { -- 2.39.2