return true ;
}
+// mkr : PAL12575
+bool GraphBase::Graph::ValidGOTO() {
+ cdebug_in << "GraphBase::Graph::ValidGOTO" << endl;
+ bool RetVal = true ;
+ int i, j ;
+ GraphBase::ComputingNode * aNode ;
+ for ( i = 0 ; i < GraphNodesSize() ; i++ ) {
+ aNode = GraphNodes( i ) ;
+ if ( aNode->IsGOTONode() ) {
+ GraphBase::GOTONode * aGoToNode = (GraphBase::GOTONode * ) aNode ;
+ GraphBase::InLineNode * aCoupledNode ;
+ aCoupledNode = (GraphBase::InLineNode * ) aGoToNode->CoupledNode() ;
+ if ( aCoupledNode ) {
+ ostringstream ErrorMessage ;
+ // 1. Check the number of ports (the number of OutPorts of a GOTONode and of InPorts of its linked
+ // InLine node must be the same)
+ if ( aNode->GetNodeOutPortsSize() != aCoupledNode->GetNodeInPortsSize() ) {
+ cdebug << "GraphBase::Graph::ValidGOTO : Different ports number!" << endl ;
+ ReSetMessages() ;
+ ErrorMessage << "Different ports number : the number of OutPorts of a " << aNode->Name()
+ << " node (GoTo node) and of InPorts of its linked " << aCoupledNode->Name()
+ << " node (InLine node) must be the same!\n" ;
+ SetMessages( ErrorMessage.str() ) ;
+ RetVal = false ;
+ }
+ // 2. Check ports names (the names of OutPorts of a GOTONode and of InPorts of its linked
+ // InLine node must be the same)
+ else {
+ for ( j = 0 ; j < aNode->GetNodeOutPortsSize() ; j++ ) {
+ GraphBase::OutPort * aBusParamOutPort = aNode->GetChangeNodeOutPort( j ) ;
+ if ( !aBusParamOutPort->IsGate() ) {
+ GraphBase::InPort * aBusParamChangeInPort = NULL ;
+ aBusParamChangeInPort = aCoupledNode->GetChangeInPort( aBusParamOutPort->PortName() ) ;
+ if ( !aBusParamChangeInPort ) {
+ cdebug << "GraphBase::Graph::ValidGOTO : Different names of ports!" << endl ;
+ ReSetMessages() ;
+ ErrorMessage << "Different names of ports : there is no input port of " << aCoupledNode->Name()
+ << " node (InLine node) coupled to " << aBusParamOutPort->PortName()
+ << " output port of a " << aNode->Name()
+ << " node (GoTo node)\n" ;
+ SetMessages( ErrorMessage.str() ) ;
+ RetVal = false ;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ cdebug_out << "GraphBase::Graph::ValidGOTO RetVal " << RetVal << endl;
+ return RetVal ;
+}
+
bool GraphBase::Graph::ValidLoops() const {
cdebug_in << "GraphBase::Graph::ValidLoops" << endl;
bool RetVal = true ;
Graph()->ComputingNodes() ;
#endif
+ if ( !Graph()->ValidGOTO() ) { // mkr : PAL12575
+ cdebug << "Editor::OutNode::Valid This DataFlow have not valid GOTO(ValidGOTO)." << endl ;
+ RetVal = false ;
+ }
+
if ( RetVal ) {
_Valid = true ;
}
StreamGraph()->SubStreamGraphsNumber( SubStreamGraphsNumber ) ;
Graph()->InLineServices() ;
-
+
// if ( kLoopSwitch ) {
if ( !Graph()->ValidLoops() ) {
cdebug << "Editor::OutNode::Executable This DataFlow have not valid Loops(ValidLoops)." << endl ;
<< " Successed_SuccessAction # number of ports " << GetNodeOutPortsSize()
<< " != " << aLabelNode-> GetNodeInPortsSize() << endl ;
SendEvent( GraphExecutor::ErrorEvent ) ;
- aLabelNode->State( GraphExecutor::ErroredState ) ; // PAL12575
return 0 ;
}
else {
<< " Successed_SuccessAction # names of ports "
<< aBusParamOutPort->PortName() << endl ;
SendEvent( GraphExecutor::ErrorEvent ) ;
- aLabelNode->State( GraphExecutor::ErroredState ) ; // PAL12575
return 0 ;
}
}
IgnoreForDefaultSwitch = true ;
}
}
-
-// PAL12575 -->
- if ( IsInLineNode() && !IsEndSwitchNode() ) {
- GraphBase::InPort *toInGatePort = GetChangeNodeInGate() ;
- GraphBase::OutPort *fromOutPort = toInGatePort->GetOutPort() ;
- if ( fromOutPort && fromOutPort->IsGate() ) {
- GraphExecutor::InNode * fromNode = (GraphExecutor::InNode *) _OutNode->Graph()->GetChangeGraphNode( fromOutPort->NodeName() )->GetInNode() ;
- if ( fromNode && fromNode->IsGOTONode() && fromOutPort->PortState() != SUPERV::ReadyState ) {
- cdebug << pthread_self() << "/" << ThreadNo()
- << " Successed_SuccessAction # problem with connection of GoTo node with its coupled node!" << endl ;
- State( GraphExecutor::ErroredState ) ;
- SendEvent( GraphExecutor::ErrorEvent ) ;
- return 0 ;
- }
- }
- }
-// PAL12575 <--
-
//Loop of LinkedNodes for SendSomeDataReady :
for ( i = 0 ; i < LinkedNodesSize() ; i++ ) {
GraphBase::ComputingNode * aComputingNode ;