-// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// Copyright (C) 2003-2007 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton
// File : DataFlowExecutor_DataFlow.cxx
// Module : SUPERV
-
+//
using namespace std;
#include "DataFlowExecutor_DataFlow.hxx"
#include "DataFlowEditor_DataFlow.hxx"
for ( i = 0 ; i < anOutPort->InPortsSize() ; i++ ) {
const char * ToNodeName = anOutPort->ChangeInPorts( i )->NodeName() ;
const char * ToParameterName = anOutPort->ChangeInPorts( i )->PortName() ;
- GraphBase::ComputingNode * aComputingNode = Graph()->GetChangeGraphNode( ToNodeName ) ;
if ( strcmp( ToNodeName , Name() ) ) {
+ GraphBase::ComputingNode * aComputingNode = Graph()->GetChangeGraphNode( ToNodeName ) ;
GraphExecutor::InNode * aLinkedNode = (GraphExecutor::InNode * ) aComputingNode->GetInNode() ;
cdebug << pthread_self() << "/" << aLinkedNode->ThreadNo()
<< "GraphExecutor::DataFlow::OutputOfAny to Node "
anOutPort->Value() ) ;
}
else {
- cdebug << "GraphExecutor::DataFlow::OutputOfAny to Graph " << ToNodeName
- << "(" << ToParameterName << ") ignored" << endl ;
+ cdebug << pthread_self() << "GraphExecutor::DataFlow::OutputOfAny to Node "
+ << ToNodeName << "(" << ToParameterName << ") from MacroNode " << aNodeName
+ << ") ignored" << endl ;
}
}
cdebug_out << pthread_self() << "/" << ThreadNo() << " GraphExecutor::DataFlow::OutputOfAny " << RetVal
return RetVal ;
}
+//JR NPAL14110 09.02.2007 : SetWaitingStates was missing in SubGraph of MacroNode !...
+bool GraphExecutor::DataFlow::SetWaitingStates( const char * ToServiceParameterName ) {
+ cdebug_in << pthread_self() << "/" << ThreadNo() << "GraphExecutor::DataFlow::SetWaitingStates( "
+ << ToServiceParameterName << " ) MacroGraph " << Name() << endl ;
+ bool RetVal = true ;
+ State( GraphExecutor::DataWaitingState ) ;
+ Done( false ) ;
+ GraphBase::OutPort * anOutPort ;
+ anOutPort = Graph()->GetChangeInDataNodePort( ToServiceParameterName ) ;
+ anOutPort->PortState( SUPERV::WaitingState ) ;
+ anOutPort->PortDone( false ) ;
+ cdebug << pthread_self() << "GraphExecutor::DataFlow::SetWaitingStates " << Name()
+ << " " << State() << " " << ToServiceParameterName << " " << anOutPort->PortState()
+ << " Done : " << anOutPort->PortDone() << endl ;
+ if ( ! anOutPort->IsGate() ) {
+ GraphExecutor::InNode * anInNode = (GraphExecutor::InNode * ) Graph()->GetChangeGraphNode( anOutPort->InPorts( 0 )->NodeName() )->GetInNode() ;
+ cdebug << pthread_self() << "GraphExecutor::DataFlow::SetWaitingStates : "
+ << anInNode->Name() << "->SetWaitingStates( NULL ) for Port "
+ << anOutPort->InPorts( 0 )->PortName() << endl ;
+ anInNode->SetWaitingStates( NULL ) ;
+ }
+ cdebug_out << "GraphExecutor::DataFlow::SetWaitingStates() " << RetVal << endl;
+ return RetVal ;
+}
+
bool GraphExecutor::DataFlow::Kill() {
cdebug_in << "GraphExecutor::DataFlow::Kill()" << endl;
bool RetVal = GraphExecutor::OutNode::Kill() ;