#if SendEventTrace
cdebug << pthread_self() << "/" << ThreadNo() << " SendedEvent Node " << Name()
<< " will exit : a node was aborted ..." << endl ;
+ State( _NextState ) ;
#endif
}
else {
#endif
if ( IsComputingNode() ) {
ObjInterface( true ) ;
+//JR 05.08.2005 DEBUG : that code runs with SALOME_3 (OMNIOrb4) ...
+#if OMNIORB_VERSION >= 4
+ CORBA::Object * obj ;
+ InParametersList[0].Value >>= obj ;
+ myObjComponent = Engines::Component::_narrow( obj ) ;
//JR 05.08.2005 DEBUG : the folowing code runs with OMNIOrb3 but gives
// unpredictable results with SALOME_3 (OMNIOrb4) ...
-#if !omniORB_4_0_5
+#else
CORBA::Object_ptr obj ;
InParametersList[0].Value >>= obj ;
CORBA::Object_var objvar = CORBA::Object_var( obj ) ;
myObjComponent = Engines::Component::_duplicate( Engines::Component::_narrow( objvar ) ) ;
-//JR 05.08.2005 DEBUG : that code runs with SALOME_3 (OMNIOrb4) ...
-#else
- CORBA::Object * obj ;
- InParametersList[0].Value >>= obj ;
- Engines::Component_var theObjComponent ;
- myObjComponent = Engines::Component::_narrow( obj ) ;
#endif
}
else {
<< " Node(Component) Dynamic Call Exception catched ERROR"
<< endl ;
//Reset of _ThreadId in the Container ...
- try {
- myObjComponent->Kill_impl() ;
- }
- catch( ... ) {
- }
+// try {
+// myObjComponent->Kill_impl() ;
+// }
+// catch( ... ) {
+// }
}
}
}
else {
GraphExecutor::DataFlow * aMacroGraph = GraphMacroNode()->CoupledNode()->GraphEditor()->Executor() ;
#if TraceDataReady_ExecuteAction
+ int i ;
+ for ( i = 0 ; i < GraphMacroNode()->GetNodeOutPortsSize() ; i++ ) {
+ cdebug << "Out" << i << " " << GraphMacroNode()->GetNodeOutPort( i )->PortName() << " "
+ << GraphMacroNode()->GetChangeNodeOutPort( i )->PortState() << " Done="
+ << GraphMacroNode()->GetChangeNodeOutPort( i )->PortDone() << " " ;
+ if ( GraphBase::Base::_prof_debug ) {
+ GraphMacroNode()->GetNodeOutPort( i )->StringValue( *GraphBase::Base::_fdebug ) ;
+ }
+ if ( GraphMacroNode()->GetChangeNodeOutPort( i )->IsGate() ) {
+ cdebug << " BoolValue " << GraphMacroNode()->GetChangeNodeOutPort( i )->BoolValue() ;
+ }
+ cdebug << endl ;
+ }
cdebug << ThreadNo() << " DataReady_ExecuteAction " << aMacroGraph << " "
<< aMacroGraph->Name() << " ->DoneWait()"
<< " State " << aMacroGraph->State() << endl;
#endif
aMacroGraph->DoneWait() ;
#if TraceDataReady_ExecuteAction
+ cdebug << ThreadNo() << " DataReady_ExecuteAction " << Name() << " State "
+ << aMacroGraph->State() << endl;
+#endif
+
+//JR 29.09.2005 Debug for CEA (examples/GraphMacroNodes1) :
+// Set of value of the OutGate of the corresponding MacroNode was missing
+ CORBA::Any anAny = CORBA::Any() ;
+ anAny <<= (long ) 1 ;
+ GraphMacroNode()->GraphEditor()->Executor()->OutputOfAny( Name() , "Gate" , anAny ) ;
+#if TraceDataReady_ExecuteAction
+ cdebug << "DataReady_ExecuteAction OutputOfAny( " << Name() << " , Gate , 1 )" << endl ;
+
+ for ( i = 0 ; i < GraphMacroNode()->GetNodeOutPortsSize() ; i++ ) {
+ cdebug << "Out" << i << " " << GraphMacroNode()->GetNodeOutPort( i )->PortName() << " "
+ << GraphMacroNode()->GetChangeNodeOutPort( i )->PortState() << " Done="
+ << GraphMacroNode()->GetChangeNodeOutPort( i )->PortDone() << " " ;
+ if ( GraphBase::Base::_prof_debug ) {
+ GraphMacroNode()->GetNodeOutPort( i )->StringValue( *GraphBase::Base::_fdebug ) ;
+ }
+ if ( GraphMacroNode()->GetChangeNodeOutPort( i )->IsGate() ) {
+ cdebug << " BoolValue " << GraphMacroNode()->GetChangeNodeOutPort( i )->BoolValue() ;
+ }
+ cdebug << endl ;
+ }
cdebug << ThreadNo() << " DataReady_ExecuteAction " << Name() << " State " << aMacroGraph->State() << endl;
#endif
if ( aMacroGraph->State() == SUPERV::DoneState ) {
return 1 ;
}
-#define SetWaitingStatesTrace 1
+#define SetWaitingStatesTrace 0
// Set SUPERV::WaitingState to all InPorts
void GraphExecutor::InNode::SetWaitingStates(GraphExecutor::InNode * EndNode ) {
int i ;
if ( IsMacroNode() ) {
#if SuccessActionTrace
- cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name() << " LinkedNodes->SomeDataReady already done"
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name() << " LinkedNodes->SomeDataReady already done for that MacroNode"
<< endl ;
#endif
return 1;
CORBA::Object_ptr ObjRef ;
char * retstr ;
try {
+#if OMNIORB_VERSION >= 4
+ D.Value >>= (CORBA::Any::to_object ) ObjRef ;
+#else
D.Value >>= ObjRef ;
+#endif
retstr = ObjectToString( ObjRef ) ;
D.Value <<= retstr ;
// theOutPort->Value( D.Value ) ;
CORBA::Object_ptr obj ;
char * retstr ;
try {
+#if OMNIORB_VERSION >= 4
+ D.Value >>= (CORBA::Any::to_object ) obj ;
+#else
D.Value >>= obj ;
+#endif
retstr = ObjectToString( obj ) ;
#if InParametersSetTrace
cdebug << retstr << endl ;
try {
CORBA::Object_ptr obj ;
char * retstr ;
+#if OMNIORB_VERSION >= 4
+ D.Value >>= (CORBA::Any::to_object ) obj ;
+#else
D.Value >>= obj ;
+#endif
retstr = ObjectToString( obj ) ;
cdebug << ThreadNo() << retstr << endl ;
}
case CORBA::tk_objref: {
try {
CORBA::Object_ptr obj ;
+#if OMNIORB_VERSION >= 4
+ D.Value >>= (CORBA::Any::to_object ) obj ;
+#else
D.Value >>= obj ;
+#endif
#if OutParametersSetTrace
char * retstr ;
retstr = ObjectToString( obj ) ;
cdebug << "OutParametersSet ToNodeName " << _OutNode->Name() << " CoupledNode "
<< _OutNode->Graph()->CoupledNodeName() << _OutNode->Graph()->CoupledNode()
<< endl ;
- cdebug << " GraphExecutor " << _OutNode->Graph()->CoupledNode()->GraphEditor()->Executor() << endl ;
+ cdebug << "OutParametersSet GraphExecutor " << _OutNode->Graph()->CoupledNode()->GraphEditor()->Executor() << endl ;
#endif
_OutNode->Graph()->CoupledNode()->GraphEditor()->Executor()->OutputOfAny( _OutNode->Graph()->CoupledNodeName() ,
anOutPort->ChangeInPorts( j )->PortName() ,
//JR 30.03.2005 *anOutPort->Value() ) ;
anOutPort->Value() ) ;
+#if OutParametersSetTrace
+ cdebug << "OutParametersSet OutputOfAny( "
+ << _OutNode->Graph()->CoupledNodeName() << " , "
+ << anOutPort->ChangeInPorts( j )->PortName() << " , value )" << endl ;
+#endif
+
}
else {
GraphBase::ComputingNode * ToNode = _OutNode->Graph()->GetChangeGraphNode( ToNodeName ) ;
//JR 02.08.2005 Debug SEGV anOutPort->Value() >>= obj ;
CORBA::Any anAny ;
anAny = anOutPort->Value() ;
+#if OMNIORB_VERSION >= 4
+ anAny >>= (CORBA::Any::to_object ) obj ;
+#else
anAny >>= obj ;
+#endif
retstr = ObjectToString( obj );
cdebug << ThreadNo() << " Out" << i << " : " << "ToString( object ) "
<< retstr << endl ;