SUPERV::FNode_ptr Graph_Impl::FNode( const char * NodeComponentName ,
const char * NodeInterfaceName ,
- const SALOME_ModuleCatalog::Service &NodeService ) {
+ const SALOME_ModuleCatalog::Service &NodeService ,
+ bool isCimpl ) {
beginService( "Graph_Impl::FNode" );
SUPERV::FNode_var iobject = SUPERV::FNode::_nil() ;
if ( DataFlowEditor()->IsEditing() && !DataFlowEditor()->IsReadOnly() && !IsMacro() ) {
DataFlowEditor() ,
NodeService ,
NodeComponentName ,
- NodeInterfaceName ) ;
+ NodeInterfaceName ,
+ NULLSTRING ,
+ SUPERV::FactoryNode ,
+ isCimpl ) ;
if ( myNode->DataFlowNode() ) {
PortableServer::ObjectId * id = myNode->getId() ;
CORBA::Object_var obj = _poa->id_to_reference(*id);
bool Graph_Impl::Begin() {
bool RetVal = false ;
+ // mkr : IPAL11408 : "Run()" method returns "0" after trying to start graph execution.
+ // If we call Run() method from Python script two times for one graph, we have to be sure,
+ // that first execution of this graph ended (i.e. GraphEditor::DataFlow::Editing() method was called).
+ // Otherwise, the second call of Run() method will return 0. Therefore, we have to waiting for
+ // the first execution finish.
+ // NB! From GUI we cann't run dataflow if its previous execution not finished.
+ while ( !DataFlowEditor()->IsEditing() ) {} // waiting for the previous execution of this graph ended
if ( DataFlowEditor()->IsEditing() ) {
if ( pthread_mutex_lock( &_MutexExecutorWait ) ) {
perror("pthread_mutex_lock _MutexExecutorWait") ;
SUPERV::FNode_var aNode = (aGraphNodes->FNodes)[ i ] ;
SUPERV::FNode_ptr myNode = FNode( aNode->GetComponentName() ,
aNode->GetInterfaceName() ,
- *(aNode->Service()) ) ;
+ *(aNode->Service()) ,
+ aNode->IsCimpl() ) ; // mkr : PAL11273
if ( !CORBA::is_nil( myNode ) ) {
myNode->SetName( aNode->Name() ) ;
myNode->SetAuthor( aNode->Author() ) ;
myPorts = *(myEndOfSwitch->Ports()) ;
for ( j = 0 ; j < (int ) myPorts.length() ; j++ ) {
if ( myPorts[ j ]->IsInput() ) {
- aPort = myNode->InPort( myPorts[ j ]->Name() , myPorts[ j ]->Type() ) ;
+ aPort = anEndOfSwitch->InPort( myPorts[ j ]->Name() , myPorts[ j ]->Type() ) ; // mkr : IPAL11394 (add port to !EndSwitch! node)
}
else {
- aPort = myNode->OutPort( myPorts[ j ]->Name() , myPorts[ j ]->Type() ) ;
+ aPort = anEndOfSwitch->OutPort( myPorts[ j ]->Name() , myPorts[ j ]->Type() ) ; // mkr : IPAL11394 (add port to !EndSwitch! node)
}
}
if ( DataFlowEditor()->Graph()->IsDataStreamNode() ) {
SUPERV::ListOfStreamPorts myStreamSwitchPorts = *(myEndOfSwitch->StreamPorts()) ;
for ( j = 0 ; j < (int ) myStreamSwitchPorts.length() ; j++ ) {
if ( myStreamSwitchPorts[ j ]->IsInput() ) {
- aPort = myNode->InStreamPort( myStreamSwitchPorts[ j ]->Name() , StringToDataStreamType( myStreamSwitchPorts[ j ]->Type() ) , myStreamSwitchPorts[ j ]->Dependency() ) ;
+ aPort = anEndOfSwitch->InStreamPort( myStreamSwitchPorts[ j ]->Name() , StringToDataStreamType( myStreamSwitchPorts[ j ]->Type() ) , myStreamSwitchPorts[ j ]->Dependency() ) ; // mkr : IPAL11394 (add port to !EndSwitch! node)
}
else {
- aPort = myNode->OutStreamPort( myStreamSwitchPorts[ j ]->Name() , StringToDataStreamType( myStreamSwitchPorts[ j ]->Type() ) , myStreamSwitchPorts[ j ]->Dependency() ) ;
+ aPort = anEndOfSwitch->OutStreamPort( myStreamSwitchPorts[ j ]->Name() , StringToDataStreamType( myStreamSwitchPorts[ j ]->Type() ) , myStreamSwitchPorts[ j ]->Dependency() ) ; // mkr : IPAL11394 (add port to !EndSwitch! node)
}
}
}