bool _PyInitialized ;
bool _Valid ;
bool _Executable ;
- SUPERV::AutomatonState _State ;
+ GraphExecutor::AutomatonState _State ;
SUPERV::ControlState _ControlState ;
bool _Done ;
int _SuspendedThreads ;
list< char * > _EventNodes ;
list< GraphExecutor::NodeEvent > _Events ;
- list< SUPERV::AutomatonState > _States ;
+ list< GraphExecutor::AutomatonState > _States ;
bool Valid() ;
void UnValid() ;
bool Executable() ;
- bool LoadNodes( const GraphBase::ListOfNodes &aNodes ) ;
- bool LoadLinks( const GraphBase::ListOfLinks &aLinks ) ;
- bool LoadDatas( const GraphBase::ListOfLinks &aDatas ) ;
+ bool LoadNodes( const GraphBase::ListOfSNodes &aNodes ) ;
+ bool LoadLinks( const GraphBase::ListOfSLinks &aLinks ) ;
+ bool LoadDatas( const GraphBase::ListOfSLinks &aDatas ) ;
CORBA::ORB_ptr _Orb ;
+ // scan (reverse) the _EventNodes queue and leave only 1 (the last one that came)
+ // event for every node
+ void siftEvents();
+
public :
OutNode() ;
GraphBase::Graph * Graph() const {
return _Graph ; } ;
- bool LoadDataFlow( const GraphBase::SGraph &aDataFlow ) ;
- bool LoadXml( const char* myFileName ) ;
+ bool LoadDataFlow( const GraphBase::SGraph * aDataFlow ) ;
+// bool LoadXml( const char* myFileName ) ;
bool LoadInfo( const GraphBase::SNode &aDataFlowInfo ) ;
GraphExecutor::InNode * AddNode(
const int NodeX = 0 ,
const int NodeY = 0 ) ;
- bool AddInputData( const char* ToNodeName1 ,
- const char* ToParameterName1 ,
- const char* ToNodeName2 ,
- const char* ToParameterName2 ) ;
-
bool IsValid() { if ( !_Valid )
return Valid() ;
return _Valid ; } ;
void PyThreadUnLock() ;
void NewThread() ;
- void ExitThread() ;
+ void ExitThread( pthread_t ThreadNumber = 0 ) ;
void SuspendThread() ;
void ResumeThread() ;
long Threads() { return _Threads ; } ;
bool PushEvent( GraphExecutor::InNode * aNode ,
GraphExecutor::NodeEvent anEvent ,
- SUPERV::AutomatonState aState ) ;
+ GraphExecutor::AutomatonState aState ) ;
int GetListSize();
bool StateWait( SUPERV::GraphState aState ) ;
bool Event( char ** aNodeName ,
long EventQSize() ;
void EventList() ;
- void State(SUPERV::AutomatonState aState ) ;
- const char * StateName(SUPERV::AutomatonState aState ) {
+ void SendSomeDataReady( const char * aNodeName ) ;
+
+ void State(GraphExecutor::AutomatonState aState ) ;
+ const char * StateName(GraphExecutor::AutomatonState aState ) {
return theAutomaton->StateName( aState ) ; }
SUPERV::GraphState State() ;
const char * ServiceParameterName ) ;
SUPERV::GraphEvent AutomatonGraphEvent(GraphExecutor::NodeEvent anEvent) ;
- SUPERV::GraphState AutomatonGraphState(SUPERV::AutomatonState anAutomatonState) ;
+ SUPERV::GraphState AutomatonGraphState(GraphExecutor::AutomatonState anAutomatonState) ;
- SUPERV::AutomatonState AutomatonState() ;
- SUPERV::AutomatonState AutomatonState( const char * NodeName ) ;
+ GraphExecutor::AutomatonState AutomatonState() ;
+ GraphExecutor::AutomatonState AutomatonState( const char * NodeName ) ;
SUPERV::ControlState ControlState() ;
SUPERV::ControlState ControlState( const char * aNodeName ) ;