Salome HOME
Debug omniORB4
authorrahuel <rahuel@opencascade.com>
Tue, 30 Aug 2005 07:51:57 +0000 (07:51 +0000)
committerrahuel <rahuel@opencascade.com>
Tue, 30 Aug 2005 07:51:57 +0000 (07:51 +0000)
src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.cxx
src/GraphExecutor/DataFlowExecutor_FiniteStateMachine.hxx

index 0ed6762eb25cf89f5e8ad24d0271dc4a64c6258b..f43eb79f471679a6b37b18e9939950a66dcb90a4 100644 (file)
@@ -229,7 +229,8 @@ GraphExecutor::FiniteStateMachine::FiniteStateMachine() {
   _ActionName[ Executing_StopAction ] = "Executing_StopAction" ;
 
   _ActionName[ Executing_SuccessAction ] = "Executing_SuccessAction" ;
-  _ActionName[ Executing_ErrorAction ] = "Executing_ErrorAction" ;
+//  _ActionName[ Executing_ErrorAction ] = "Executing_ErrorAction" ;
+  _ActionName[ Errored_ExecutingAction ] = "Errored_ExecutingAction" ;
   _ActionName[ Successed_SuccessAction ] = "Successed_SuccessAction" ;
   _ActionName[ Errored_ErrorAction ] = "Errored_ErrorAction" ;
 
@@ -358,13 +359,16 @@ GraphExecutor::FiniteStateMachine::FiniteStateMachine() {
 //JR 24.03.2005 : Debug for PAL8176 : abort of GOTONode
 // ErrorEvent
   _TransitionTable[ SuccessedState ][ ErrorEvent ] = ErroredExecutingState ;
-  _ActionTable[ ErroredExecutingState ][ ErrorEvent ] = Executing_ErrorAction;
+//  _ActionTable[ ErroredExecutingState ][ ErrorEvent ] = Executing_ErrorAction;
+  _ActionTable[ ErroredExecutingState ][ ErrorEvent ] = Errored_ExecutingAction;
 // ErrorEvent
   _TransitionTable[ ExecutingState ][ ErrorEvent ] = ErroredExecutingState ;
-  _ActionTable[ ErroredExecutingState ][ ErrorEvent ] = Executing_ErrorAction;
+//  _ActionTable[ ErroredExecutingState ][ ErrorEvent ] = Executing_ErrorAction;
+  _ActionTable[ ErroredExecutingState ][ ErrorEvent ] = Errored_ExecutingAction;
 // SuspendedExecutingState : NO ResumeEvent 13-03-2003
   _TransitionTable[ SuspendedExecutingState ][ ErrorEvent ] = ErroredExecutingState ;
-  _ActionTable[ ErroredExecutingState ][ ErrorEvent ] = Executing_ErrorAction;
+//  _ActionTable[ ErroredExecutingState ][ ErrorEvent ] = Executing_ErrorAction;
+  _ActionTable[ ErroredExecutingState ][ ErrorEvent ] = Errored_ExecutingAction;
 
 // DONE-CONTROL :
 // SuccessedExecutingState - SuccessEvent
@@ -457,6 +461,10 @@ GraphExecutor::FiniteStateMachine::FiniteStateMachine() {
     perror( msg ) ;
   }
 
+#if omniORB_4_0_5
+  _SuperVisionComponent = SUPERV::SuperG::_nil() ;
+#endif
+
   pthread_mutex_init( &_MutexPythonWait , NULL ) ;
   _MutexPythonLocked = false ;
   _ExecNumber = 0 ;
@@ -551,6 +559,7 @@ void GraphExecutor::FiniteStateMachine::PyLockReset() {
   }
 }
 
+#define PyFunctionTrace 1
 PyObject * GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncName ) {
   
   PyObject * RetVal = NULL ;
@@ -558,6 +567,7 @@ PyObject * GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncNa
   PyObject * PyFunctionMapped = _MapOfPyFunctions[ aPyFuncName ] ;
   if ( _GraphExecutingNumber > 1 && !PyObjRefIor ) {
     RetVal = PyFunctionMapped ;
+#if PyFunctionTrace
     MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ) ;
     if ( RetVal ) {
       MESSAGE( RetVal << " ob_refcnt " << RetVal->ob_refcnt ) ;
@@ -565,9 +575,11 @@ PyObject * GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncNa
     else {
       MESSAGE( " NULL" ) ;
     }
+#endif
   }
   else {
     RetVal = PyFunctionMapped ;
+#if PyFunctionTrace
     MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) --> " ) ;
     if ( RetVal && PyObjRefIor ) {
       MESSAGE( RetVal << " " << RetVal->ob_refcnt ) ;
@@ -578,6 +590,7 @@ PyObject * GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncNa
     else {
       MESSAGE( " NULL" ) ;
     }
+#endif
   }
   
   return RetVal ;
@@ -587,15 +600,19 @@ bool GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncName , P
   
   bool RetVal = false ;
   if ( _MapOfPyFunctions[ aPyFuncName ] != NULL ) {
+#if PyFunctionTrace
     PyObject * aPyFunc = _MapOfPyFunctions[ aPyFuncName ] ;
     MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' , aPyFunction "
              << aPyFunction << " ) ob_refcnt " << aPyFunction->ob_refcnt << " already mapped : "
              << aPyFunc << " ob_refcnt " << aPyFunc->ob_refcnt ) ;
+#endif
   }
   else {
     _MapOfPyFunctions[ aPyFuncName ] = aPyFunction ;
+#if PyFunctionTrace
     MESSAGE( "GraphExecutor::FiniteStateMachine::PyFunction( '" << aPyFuncName << "' ) " << aPyFunction
              << " ) ob_refcnt " << aPyFunction->ob_refcnt << " mapped" ) ;
+#endif
     RetVal = true ;
   }
   
@@ -604,7 +621,9 @@ bool GraphExecutor::FiniteStateMachine::PyFunction( const char * aPyFuncName , P
 
 bool GraphExecutor::FiniteStateMachine::ErasePyFunction( const char * aPyFuncName ) {
   
+#if PyFunctionTrace
   MESSAGE( "GraphExecutor::FiniteStateMachine::ErasePyFunction( '" << aPyFuncName << "' )" ) ;
+#endif
   if ( _MapOfPyFunctions[ aPyFuncName ] != NULL ) {
     _MapOfPyFunctions.erase( aPyFuncName ) ;
     return true ;
index d79e0e41cd8ec0b22eaf8ae40185a403812a9ae2..1bed34ea968233746a40ce6a2bcc01e65e8288e6 100644 (file)
@@ -144,7 +144,8 @@ namespace GraphExecutor {
                           Executing_KillAction ,
                           Executing_StopAction ,
                           Executing_SuccessAction ,
-                          Executing_ErrorAction ,
+//                          Executing_ErrorAction ,
+                          Errored_ExecutingAction ,
                           Successed_SuccessAction ,
                           Errored_ErrorAction ,
                           Successed_SuspendAction ,
@@ -175,6 +176,10 @@ namespace GraphExecutor {
       GraphExecutor::StateEventAction _ActionTable[ GraphExecutor::NumberOfAutomatonStates ]
                                                   [ GraphExecutor::NumberOfEvents ] ;
 
+#if omniORB_4_0_5
+      SUPERV::SuperG_var _SuperVisionComponent ;
+#endif
+
       pthread_mutex_t            _MutexPythonWait ;
       bool                       _MutexPythonLocked ;
 // Map between FuncName and corresponding Python Object Function
@@ -200,6 +205,13 @@ namespace GraphExecutor {
       FiniteStateMachine() ;
       virtual ~FiniteStateMachine() {} ;
 
+#if omniORB_4_0_5
+      void SuperVisionComponent( SUPERV::SuperG_var mySuperVision ) {
+           _SuperVisionComponent = mySuperVision ; } ;
+      SUPERV::SuperG_var SuperVisionComponent() {
+                         return _SuperVisionComponent ; } ;
+#endif
+
       int ExecNumber() ;
       void Executed() ;
       void PyInitModule(bool) ;