cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " "
<< anInPort->PortName() << " Gate is Opened from Node "
<< anOutPort->NodeName() << "( " << anOutPort->PortName()
- << ") " ;
+ << " , Done=" << anOutPort->Done() << " ) " ;
#ifdef _DEBUG_
if ( GraphBase::Base::_prof_debug ) {
anOutPort->StringValue( *GraphBase::Base::_fdebug ) ;
// cdebug << ThreadNo() << "No Component : NO StartComponent & No Ping" << endl ;
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) ...
+#else
CORBA::Object_ptr obj ;
InParametersList[0].Value >>= obj ;
CORBA::Object_var objvar = CORBA::Object_var( obj ) ;
myObjComponent = Engines::Component::_narrow( objvar ) ;
+#endif
}
else {
}
CORBA::Object_ptr obj ;
char * retstr ;
try {
+#if OMNIORB_VERSION >= 4
+ InParametersList[i].Value >>= (CORBA::Any::to_object ) obj ;
+#else
InParametersList[i].Value >>= obj ;
+#endif
retstr = ObjectToString( obj );
cdebug << "ArgOut->In" << i << " : "
<< InParametersList[i].Name.c_str()
}
else {
GraphExecutor::DataFlow * aMacroGraph = GraphMacroNode()->CoupledNode()->GraphEditor()->Executor() ;
+ int i ;
+ for ( i = 0 ; i < GraphMacroNode()->GetNodeOutPortsSize() ; i++ ) {
+ cdebug << "Out" << i << " " << GraphMacroNode()->GetNodeOutPort( i )->PortName() << " "
+ << GraphMacroNode()->GetChangeNodeOutPort( i )->State() << " Done="
+ << GraphMacroNode()->GetChangeNodeOutPort( i )->Done() << " " ;
+ 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->Graph()->Name() << " ->DoneWait()"
<< " State " << aMacroGraph->State() << endl;
aMacroGraph->DoneWait() ;
- cdebug << ThreadNo() << " DataReady_ExecuteAction " << Name() << " State " << aMacroGraph->State() << endl;
+ cdebug << ThreadNo() << " DataReady_ExecuteAction " << Name() << " State "
+ << aMacroGraph->State() << endl;
+
+//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 ) ;
+ 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 )->State() << " Done="
+ << GraphMacroNode()->GetChangeNodeOutPort( i )->Done() << " " ;
+ 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 ;
+ }
if ( aMacroGraph->State() == SUPERV::DoneState ) {
PortState = SUPERV::ReadyState ;
NewState = GraphExecutor::DataReadyState ;
DoneAction() ;
if ( IsMacroNode() ) {
- cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name() << " LinkedNodes->SomeDataReady already done"
- << endl ;
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name()
+ << " LinkedNodes->SomeDataReady already done for that MacroNode" << endl ;
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 ) ;
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 ;
}
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 ;
}
for ( j = 0 ; j < anOutPort->InPortsSize() ; j++ ) {
bool fromGOTO = false ;
const char * ToNodeName = anOutPort->ChangeInPorts( j )->NodeName() ;
- if ( !strcmp( ToNodeName , _OutNode->Graph()->Name() ) && _OutNode->Graph()->GraphMacroLevel() != 0 ) {
+ if ( !strcmp( ToNodeName , _OutNode->Graph()->Name() ) &&
+ _OutNode->Graph()->GraphMacroLevel() != 0 ) {
cdebug << "OutParametersSet ToNodeName " << _OutNode->Graph()->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 ;
_OutNode->Graph()->CoupledNode()->GraphEditor()->Executor()->OutputOfAny( _OutNode->Graph()->CoupledNodeName() ,
anOutPort->ChangeInPorts( j )->PortName() ,
*anOutPort->Value() ) ;
+ cdebug << "OutParametersSet OutputOfAny( "
+ << _OutNode->Graph()->CoupledNodeName() << " , "
+ << anOutPort->ChangeInPorts( j )->PortName() << " , value )" << endl ;
}
else {
GraphBase::ComputingNode * ToNode = _OutNode->Graph()->GetChangeGraphNode( ToNodeName ) ;
CORBA::Object_ptr obj ;
char * retstr ;
try {
+#if OMNIORB_VERSION >= 4
+ (*anOutPort->Value()) >>= (CORBA::Any::to_object ) obj ;
+#else
(*anOutPort->Value()) >>= obj ;
+#endif
retstr = ObjectToString( obj );
cdebug << ThreadNo() << " Out" << i << " : " << "ToString( object ) "
<< retstr << endl ;