From: rahuel Date: Mon, 17 Jan 2005 13:03:43 +0000 (+0000) Subject: Execution of graphs with GOTONodes X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3b25cf0a5b1fa9db349b3c8091bbcf35fadadb1b;p=modules%2Fsuperv.git Execution of graphs with GOTONodes --- diff --git a/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx b/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx index 0192a5d..b33fa38 100644 --- a/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx +++ b/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx @@ -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 ; }