<< ToNode->_LinkedFromNodesSize << " " << Name() << " removed from "
<< " linkedFromnodes of " << ToNode->Name() << endl ;
int i ;
- for ( i = fromindex ; i < ToNode->_LinkedFromNodesSize ; i++ ) {
- ToNode->_LinkedFromNodes[ i ] = ToNode->_LinkedFromNodes[ i+1 ] ;
- ToNode->_LinkedFromInPortsNumber[ i ] = ToNode->_LinkedFromInPortsNumber[ i+1 ] ;
- ToNode->SetLinkedFromNodeIndex( ToNode->_LinkedFromNodes[ i ]->Name() , i ) ;
+ for ( i = 0 ; i < ToNode->_LinkedFromNodesSize ; i++ ) {
+ if ( i >= fromindex ) {
+ ToNode->_LinkedFromNodes[ i ] = ToNode->_LinkedFromNodes[ i+1 ] ;
+ ToNode->_LinkedFromInPortsNumber[ i ] = ToNode->_LinkedFromInPortsNumber[ i+1 ] ;
+ ToNode->SetLinkedFromNodeIndex( ToNode->_LinkedFromNodes[ i ]->Name() , i ) ;
+ }
+ cdebug << "StreamNode::RemoveLinkedFromNode" << i << " "
+ << ToNode->_LinkedFromNodes[ i ]->Name() << endl ;
}
ToNode->DelLinkedFromNodeIndex( Name() ) ;
ToNode->_LinkedFromNodes.resize( ToNode->_LinkedFromNodesSize+1 ) ;
}
}
else if ( DoLinkedFromNode ) {
- cdebug << "StreamNode::RemoveLinkedFromNode index Error " << ToNode->Name() << " --> " << Name() << " : " << fromindex
+ cdebug << "StreamNode::RemoveLinkedFromNode index Error " << ToNode->Name() << " --> "
+ << Name() << " : " << fromindex
<< " _LinkedFromNodesSize " << ToNode->_LinkedFromNodesSize << endl ;
}
else {
+ cdebug << "StreamNode::RemoveLinkedFromNode index " << ToNode->Name() << " --> " << Name()
+ << " : " << fromindex
+ << " _LinkedFromNodesSize " << ToNode->_LinkedFromNodesSize << endl ;
fromindex = 0 ; // No error in EndSwitchNodes
}
aMapOfLinkedNodesIterator1 != _MapOfLinkedNodes.end() ; aMapOfLinkedNodesIterator1++ ) {
cdebug << "_MapOfLinkedNodes" << ii++ << " of " << Name() << " : "
<< aMapOfLinkedNodesIterator1->first << " --> " << aMapOfLinkedNodesIterator1->second
- << endl ;
+ << " " << _LinkedNodes[ aMapOfLinkedNodesIterator1->second - 1 ]->Name() << endl ;
}
#endif
#if 1
aMapOfLinkedFromNodesIterator1 != ToNode->_MapOfLinkedFromNodes.end() ; aMapOfLinkedFromNodesIterator1++ ) {
cdebug << "_MapOfLinkedFromNodes" << iifrom++ << " of " << ToNode->Name() << " : "
<< aMapOfLinkedFromNodesIterator1->first << " --> "
- << aMapOfLinkedFromNodesIterator1->second << endl ;
+ << aMapOfLinkedFromNodesIterator1->second << " "
+ << ToNode->_LinkedFromNodes[ aMapOfLinkedFromNodesIterator1->second - 1 ]->Name()
+ << endl ;
}
#endif
cdebug_out << "StreamNode::RemoveLinkedNode between " << Name() << " and " << ToNode->Name()
DoneAction() ;
if ( IsMacroNode() ) {
- cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " LinkedNodes->SomeDataReady already done"
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name() << " LinkedNodes->SomeDataReady already done"
<< endl ;
return 1;
}
if ( IsGOTONode() ||
( IsEndLoopNode() && GetNodeInLoop()->GetOutPort()->BoolValue() ) ) {
- cdebug << ThreadNo() << " Successed_SuccessAction " << Name()
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name()
<< " SetWaitingStates " << endl ;
const GraphBase::OutPort * aGateOutPort ;
if ( IsGOTONode() ) {
aGateOutPort = GetNodeOutLoop() ;
}
if ( aGateOutPort->InPortsSize() != 1 ) {
- cdebug << ThreadNo() << " Successed_SuccessAction aGateOutPort->InPortsSize "
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction aGateOutPort->InPortsSize "
<< aGateOutPort->InPortsSize() << " != 1 ERROR " << Name() << endl ;
}
GraphExecutor::InNode * aLabelNode = NULL ;
for ( i = 0 ; i < aGateOutPort->InPortsSize() ; i++ ) {
const GraphBase::InPort * anInPort = aGateOutPort->InPorts( i ) ;
aLabelNode = (GraphExecutor::InNode *) _OutNode->Graph()->GetChangeGraphNode( anInPort->NodeName() )->GetInNode() ;
- cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " will Loop to HeadNode "
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name() << " will Loop to HeadNode "
<< aLabelNode->Name() << " from port " << anInPort->PortName() << endl ;
aLabelNode->SetWaitingStates( this ) ;
// JR 07.01.2005 Debug : Open the Gate of the coupledNode closed by SetWaitingStates
}
if ( aBusParamChangeInPort ) {
aBusParamChangeInPort->ChangeOutPort( aBusParamOutPort ) ;
- cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " ChangeOutPort to HeadNode "
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name() << " ChangeOutPort to HeadNode "
<< aLabelNode->Name() << "(" << aBusParamChangeInPort->PortName() << ") from port "
<< aBusParamOutPort->PortName() << endl ;
}
if ( firsttoNode == NULL &&
aLabelNode->ThreadNo() == pthread_self() ) {
firsttoNode = aLabelNode ;
- cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode "
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction firsttoNode "
<< aLabelNode->Name() << endl ;
}
else if ( firstzeroNode == NULL &&
}
else {
SomeDataNodes.push_back( aLabelNode ) ;
- cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
<< aLabelNode->Name() << " " << SomeDataNodes.size()
<< endl ;
}
if ( firsttoNode == NULL &&
aLabelNode->ThreadNo() == pthread_self() ) {
firsttoNode = aLabelNode ;
- cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode "
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction firsttoNode "
<< aLabelNode->Name() << endl ;
}
else if ( firstzeroNode == NULL &&
}
else {
SomeDataNodes.push_back( aLabelNode ) ;
- cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
<< aLabelNode->Name() << " " << SomeDataNodes.size()
<< endl ;
}
}
}
else {
- cdebug << ThreadNo() << " ERROR in Successed_SuccessAction of " << Name()
+ cdebug << pthread_self() << "/" << ThreadNo() << " ERROR in Successed_SuccessAction of " << Name()
<< " NO port " << aGateOutPort->PortName() << " in "
<< aLabelNode->Name() << endl;
}
GraphBase::ComputingNode * aComputingNode ;
aComputingNode = (GraphBase::ComputingNode * ) LinkedNodes( i ) ;
toNode = (GraphExecutor::InNode *) aComputingNode->GetInNode() ;
- cdebug << ThreadNo() << " Successed_SuccessAction of " << Name()
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction of " << Name()
<< " [" << i << "] " << LinkedNodes( i )->Name() << " toNode " << toNode << " IgnoreForEndLoop "
<< IgnoreForEndLoop ;
if ( toNode ) {
toNode->GetChangeNodeInPort( j )->InitialOutPort() ;
}
}
- cdebug << ThreadNo() << " Successed_SuccessAction " << toNode->Name() << "->SendSomeDataReady( "
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << toNode->Name() << "->SendSomeDataReady( "
<< Name() << " )" << endl ;
res = toNode->SendSomeDataReady( Name() ) ;
if ( res ) {
if ( firsttoNode == NULL &&
toNode->ThreadNo() == pthread_self() ) {
firsttoNode = toNode ;
- cdebug << ThreadNo() << " Successed_SuccessAction firsttoNode "
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction firsttoNode "
<< toNode->Name() << endl ;
}
else if ( firstzeroNode == NULL &&
}
else {
SomeDataNodes.push_back( toNode ) ;
- cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name() << " push "
<< toNode->Name() << " " << SomeDataNodes.size() << endl ;
}
}
if ( firsttoNode == NULL && firstzeroNode ) {
firsttoNode = firstzeroNode ;
- cdebug << ThreadNo()
+ cdebug << pthread_self() << "/" << ThreadNo()
<< " Successed_SuccessAction firsttoNode = firstzeroNode "
<< endl ;
}
else if ( firsttoNode && firstzeroNode ) {
SomeDataNodes.push_back( firstzeroNode ) ;
- cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " push firstzeroNode "
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name() << " push firstzeroNode "
<< firstzeroNode->Name() << " " << SomeDataNodes.size() << endl ;
}
else {
- cdebug << ThreadNo() << " Successed_SuccessAction " << Name() << " firsttoNode " << firsttoNode
+ cdebug << pthread_self() << "/" << ThreadNo() << " Successed_SuccessAction " << Name() << " firsttoNode " << firsttoNode
<< " firstzeroNode " << firstzeroNode << endl ;
}
OrSwitch = OrSwitch | anOutPort->BoolValue() ;
}
}
- cdebug << "OrSwitch " << OrSwitch ;
+ cdebug << "OutParametersSet OrSwitch " << OrSwitch ;
}
else {
cdebug << " Param " ;
}
if ( aGateOutPort && IsSwitchNode() ) {
if ( OrSwitch ) {
-// cdebug << ThreadNo() << " " << "Out0 " << Name() << " Close of "
-// << aGateOutPort->PortName() << " " << aGateOutPort->Kind() ;
+ cdebug << ThreadNo() << " " << "Out0 " << Name() << " Close of "
+ << aGateOutPort->PortName() << " " << aGateOutPort->Kind() ;
long l = 0;
OutParametersList[0].Value <<= l ;
aGateOutPort->Value( OutParametersList[0].Value ) ;
}
else {
-// cdebug << ThreadNo() << " " << "Out0 " << Name() << " Open of "
-// << aGateOutPort->PortName() << " " << aGateOutPort->Kind() ;
+ cdebug << ThreadNo() << " " << "Out0 " << Name() << " Open of "
+ << aGateOutPort->PortName() << " " << aGateOutPort->Kind() ;
long l = 1;
OutParametersList[0].Value <<= l ;
aGateOutPort->Value( OutParametersList[0].Value ) ;