_OldState = State() ;
_NextState = Automaton()->NextState( _OldState , anEvent ) ;
if ( _NextState == _OldState ) {
+ string anErrorMessage = string( "Automaton error for node " ) +
+ string( Name() ) + " (SuperVision executor error)." ;
+ _OutNode->Graph()->SetMessages( anErrorMessage ) ;
cdebug << pthread_self() << "/" << ThreadNo() << " " << Name()
<< " GraphExecutor::InNodeThreads::SendEvent SameStates ERROR _OldState/_NextState "
<< _OldState << " Event " << Automaton()->EventName( anEvent ) << endl ;
int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() {
#if SomeDataReadyActionTrace
cdebug_in << pthread_self() << "/" << ThreadNo() << " " << Name()
- << " DataWaiting_SomeDataReadyAction from " << DataFromNode() << endl;
+ << " DataWaiting_SomeDataReadyAction from " << DataFromNode()
+ << " " << GetNodeInPortsSize() << " Inport(s)" << endl;
#endif
unsigned int k;
int InReady = 0 ;
anOutPort = anInPort->GetOutPort() ;
if ( anOutPort ) {
#if SomeDataReadyActionTrace
- cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " InPort "
+ cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " InPort"
+ << k << " "
<< anInPort->PortName() << " already setted to OutPort " << anOutPort->NodeName()
<< "( " << anOutPort->PortName() << " )" << endl ;
#endif
anOutPort = CoupledNode()->GetChangeOutPort( anInPort->PortName() ) ;
if ( anOutPort ) {
#if SomeDataReadyActionTrace
- cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " InPort "
+ cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " InPort"
+ << k << " "
<< anInPort->PortName() << " change of OutPort from "
<< anInPort->GetOutPort()->NodeName() << "( " << anInPort->GetOutPort()->PortName()
<< " ) to " << anOutPort->NodeName() << "( " << anOutPort->PortName() << " )"
#endif
}
else {
- cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " InPort "
+ cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " InPort"
+ << k << " "
<< anInPort->PortName() << " have NO OutPort ERROR " << endl ;
return 0 ;
}
anOutPort = anInPort->GetOutPort() ;
}
#if SomeDataReadyActionTrace
- cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " InPort "
+ cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " InPort"
+ << k << " "
<< anInPort->PortName() << " " << anInPort->PortState() << " "
<< anInPort->PortStatus() << " " << anInPort->Kind() ;
if ( anOutPort ) {
#endif
cdebug << endl ;
#endif
+//JR 30.01.2007 : wrong debug for PAL12455
+#if 0
// mkr : PAL12455 -->
// MacroNode : give immediately the value to the corresponding graph
if ( IsMacroNode() ) {
aMacroGraph->InputOfAny( anInPort->PortName() , anOutPort->Value() ) ;
}
// mkr : PAL12455 <--
+#endif
}
else if ( IsLoopNode() && anInPort->IsDataConnected() ) {
anInPort->PortState( SUPERV::ReadyState ) ;
cdebug << pthread_self() << "/" << ThreadNo() << " Node " << Name() << " HasAllDataReady"
<< endl ;
#endif
+//JR 30.01.2007 Right Debug PAL12455 --->
+//That must be done only for DataConnected ports and only once
+ if ( IsMacroNode() ) {
+ GraphExecutor::DataFlow * aMacroGraph = GraphMacroNode()->CoupledNode()->GraphEditor()->Executor() ;
+ for ( k = 0 ; k < (unsigned int ) GetNodeInPortsSize() ; k++ ) {
+ GraphBase::InPort * anInPort = GetChangeNodeInPort(k) ;
+ GraphBase::OutPort * anOutPort ;
+ anOutPort = anInPort->GetOutPort() ;
+ if ( anInPort->IsDataConnected() ) {
+ cdebug << "SomeDataReadyAction MacroNode " << aMacroGraph->Name()
+ << " --> InputOfAny " << InReady << "/" << GetNodeInPortsSize()
+ << " InPorts are Ready ( " << anInPort->PortName()
+ << " ) ===> InputOfAny" << endl ;
+ aMacroGraph->InputOfAny( anInPort->PortName() , anOutPort->Value() ) ;
+ }
+ }
+ }
+// <--- JR 30.01.2007 Right Debug PAL12455
HasAllDataReady( true ) ; // ==> Ready to execute
res = 1 ;
}
else { // At least one Flag == 0 :
+#if SomeDataReadyActionTrace
+ cdebug << pthread_self() << "/" << ThreadNo() << " Node " << Name() << " HasNOTAllDataReady "
+ << InReady << "/" << GetNodeInPortsSize() << " DoAllDataReadyIf " << DoAllDataReadyIf << endl ;
+#endif
HasAllDataReady( false ) ;
res = SendEvent( GraphExecutor::NotAllDataReadyEvent );
}
IgnoreForDefaultSwitch = true ;
}
}
+
//Loop of LinkedNodes for SendSomeDataReady :
for ( i = 0 ; i < LinkedNodesSize() ; i++ ) {
GraphBase::ComputingNode * aComputingNode ;