#define NumberOfEvents GraphExecutor::NumberOfEvents
GraphExecutor::FiniteStateMachine::FiniteStateMachine() {
-// cdebug_in << "FiniteStateMachine::FiniteStateMachine" << endl;
+ MESSAGE( "FiniteStateMachine::FiniteStateMachine" ) ;
_ControlStateName[ VoidState ] = "VoidState" ;
_ControlStateName[ ToSuspendStartState ]= "ToSuspendStartState" ;
// SuspendedExecutingState : NO ResumeEvent 13-03-2003
_TransitionTable[ SuspendedExecutingState ][ SuccessEvent ] = SuccessedExecutingState ;
_ActionTable[ SuccessedExecutingState ][ SuccessEvent ] = Executing_SuccessAction;
+//JR 24.03.2005 : Debug for PAL8176 : abort of GOTONode
+// ErrorEvent
+ _TransitionTable[ SuccessedState ][ ErrorEvent ] = ErroredExecutingState ;
+ _ActionTable[ ErroredExecutingState ][ ErrorEvent ] = Executing_ErrorAction;
// ErrorEvent
_TransitionTable[ ExecutingState ][ ErrorEvent ] = ErroredExecutingState ;
_ActionTable[ ErroredExecutingState ][ ErrorEvent ] = Executing_ErrorAction;
_GraphExecutingNumber = 0 ;
_PyInitModule = false ;
_DbgFileNumber = 0 ;
-// cdebug_out << "FiniteStateMachine::FiniteStateMachine _TransitionTable "
-// << endl;
+ MESSAGE( "FiniteStateMachine::FiniteStateMachine _TransitionTable " ) ;
}
void * start_function( void *p ) {
for ( aPyFunction = _MapOfPyFunctions.begin() ; aPyFunction != _MapOfPyFunctions.end() ; aPyFunction++ ) {
if ( !strcmp( aPyFunction->first.c_str() , "PyObjRef" ) ||
!strcmp( aPyFunction->first.c_str() , "PyObjIor" ) ) {
- //cout << "GraphExecutor::FiniteStateMachine::Executed " << aPyFunction->first << " keeped ..."<< endl ;
+ MESSAGE( "GraphExecutor::FiniteStateMachine::Executed " << aPyFunction->first << " keeped ..."
+ ) ;
}
else {
- //cout << "GraphExecutor::FiniteStateMachine::Executed " << aPyFunction->first << " erased ..."<< endl ;
+ MESSAGE( "GraphExecutor::FiniteStateMachine::Executed " << aPyFunction->first << " erased ..."
+ ) ;
_MapOfPyFunctions.erase( aPyFunction->first ) ;
}
}
}
else {
- //cout << "GraphExecutor::FiniteStateMachine::Executed _GraphExecutingNumber " << _GraphExecutingNumber
- // << " != 0 ==> no erase" << endl ;
+ MESSAGE( "GraphExecutor::FiniteStateMachine::Executed _GraphExecutingNumber "
+ << _GraphExecutingNumber << " != 0 ==> no erase" ) ;
}
PyUnLock() ;
return ;
PyObject * PyFunctionMapped = _MapOfPyFunctions[ aPyFuncName ] ;
if ( _GraphExecutingNumber > 1 && !PyObjRefIor ) {
RetVal = PyFunctionMapped ;
- //cout << "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ;
+ MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ) ;
if ( RetVal ) {
- //cout << RetVal << " ob_refcnt " << RetVal->ob_refcnt ;
+ MESSAGE( RetVal << " ob_refcnt " << RetVal->ob_refcnt ) ;
}
else {
- //cout << " NULL" ;
+ MESSAGE( " NULL" ) ;
}
- //cout << endl ;
}
else {
RetVal = PyFunctionMapped ;
- //cout << "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ;
+ MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ) ;
if ( RetVal && PyObjRefIor ) {
- //cout << RetVal << " " << RetVal->ob_refcnt << endl ;
+ MESSAGE( RetVal << " " << RetVal->ob_refcnt ) ;
}
else if ( RetVal ) {
- //cout << RetVal << " " << RetVal->ob_refcnt << endl ;
-// _MapOfPyFunctions.erase( aPyFuncName ) ;
-// cout << "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) erased --> NULL" << endl ;
+ MESSAGE( RetVal << " " << RetVal->ob_refcnt ) ;
}
else {
- //cout << " NULL" << endl ;
+ MESSAGE( " NULL" ) ;
}
}
bool RetVal = false ;
if ( _MapOfPyFunctions[ aPyFuncName ] != NULL ) {
- //PyObject * aPyFunc = _MapOfPyFunctions[ aPyFuncName ] ;
- //cout << "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' , " << aPyFunction
- // << " ) ob_refcnt " << aPyFunction->ob_refcnt << " already mapped : " << aPyFunc << " ob_refcnt "
- // << aPyFunc->ob_refcnt << endl ;
+ PyObject * aPyFunc = _MapOfPyFunctions[ aPyFuncName ] ;
+ MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' , aPyFunction "
+ << aPyFunction << " ) ob_refcnt " << aPyFunction->ob_refcnt << " already mapped : "
+ << aPyFunc << " ob_refcnt " << aPyFunc->ob_refcnt ) ;
}
else {
_MapOfPyFunctions[ aPyFuncName ] = aPyFunction ;
- //cout << "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' , " << aPyFunction
- // << " ) ob_refcnt " << aPyFunction->ob_refcnt << " mapped" << endl ;
+ MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) " << aPyFunction
+ << " ) ob_refcnt " << aPyFunction->ob_refcnt << " mapped" ) ;
RetVal = true ;
}
bool GraphExecutor::FiniteStateMachine::ErasePyFunction( const char * aPyFuncName ) {
+ MESSAGE( "GraphExecutor::FiniteStateMachine::ErasePyFunction( '" << aPyFuncName << "' )" ) ;
if ( _MapOfPyFunctions[ aPyFuncName ] != NULL ) {
_MapOfPyFunctions.erase( aPyFuncName ) ;
return true ;
exit( 0 ) ;
}
else {
- MESSAGE( pthread_self() << " FiniteStateMachine:JoinThread pthread_joined : " << _Thread );
+// MESSAGE( pthread_self() << " FiniteStateMachine:JoinThread pthread_joined : " << _Thread );
_ThreadList.pop_front() ;
}
}