|
a/src/DAF/IRM/ConnectionTable.cc |
|
b/src/DAF/IRM/ConnectionTable.cc |
|
... |
|
... |
29 |
// insertNewAe(dynamic_cast<AEBase*>(submodp));
|
29 |
// insertNewAe(dynamic_cast<AEBase*>(submodp));
|
30 |
// }
|
30 |
// }
|
31 |
}
|
31 |
}
|
32 |
|
32 |
|
33 |
std::string ConnectionTable::info() const {
|
33 |
std::string ConnectionTable::info() const {
|
34 |
std::stringstream os;
|
34 |
std::ostringstream os;
|
35 |
os << "id=" << this->getId() << endl;
|
35 |
os << "id=" << this->getId() << endl;
|
36 |
/*
|
36 |
/*
|
37 |
for(TCTConstIter it = ConTable.begin(); it != ConTable.end(); ++it )
|
37 |
for(TCTConstIter it = ConTable.begin(); it != ConTable.end(); ++it )
|
38 |
{
|
38 |
{
|
39 |
ConnectionTableEntry cte = *it;
|
39 |
ConnectionTableEntry cte = *it;
|
|
... |
|
... |
64 |
ConnectionTableEntry* ConnectionTable::findEntryByFlow(Flow* flow) {
|
64 |
ConnectionTableEntry* ConnectionTable::findEntryByFlow(Flow* flow) {
|
65 |
for(TCTIter it = ConTable.begin(); it != ConTable.end(); ++it) {
|
65 |
for(TCTIter it = ConTable.begin(); it != ConTable.end(); ++it) {
|
66 |
//EV << "Comparing" << it->getFlowObject() << " and " << flow << endl;
|
66 |
//EV << "Comparing" << it->getFlowObject() << " and " << flow << endl;
|
67 |
//EV << "=========NOVY=========\n" << it->getFlowObject()->info() << endl;
|
67 |
//EV << "=========NOVY=========\n" << it->getFlowObject()->info() << endl;
|
68 |
//EV << "=========STARY=========\n" << flow->info() << endl;
|
68 |
//EV << "=========STARY=========\n" << flow->info() << endl;
|
69 |
if ( it->getFlowObject() == flow )
|
69 |
if ( *(it->getFlowObject()) == *flow )
|
70 |
return &(*it);
|
70 |
return &(*it);
|
71 |
}
|
71 |
}
|
72 |
return NULL;
|
72 |
return NULL;
|
73 |
}
|
73 |
}
|
74 |
|
74 |
|
|
... |
|
... |
112 |
return it->getNorthGateOut();
|
112 |
return it->getNorthGateOut();
|
113 |
}
|
113 |
}
|
114 |
return NULL;
|
114 |
return NULL;
|
115 |
}
|
115 |
}
|
116 |
|
116 |
|
|
|
117 |
bool ConnectionTable::setStatus(Flow* flow, ConnectionTableEntry::ConnectionStatus status) {
|
|
|
118 |
ConnectionTableEntry* cte = this->findEntryByFlow(flow);
|
|
|
119 |
if (cte) {
|
|
|
120 |
cte->setConStatus(status);
|
|
|
121 |
return true;
|
|
|
122 |
}
|
|
|
123 |
else
|
|
|
124 |
return false;
|
|
|
125 |
}
|
|
|
126 |
|
117 |
void ConnectionTable::handleMessage(cMessage *msg)
|
127 |
void ConnectionTable::handleMessage(cMessage *msg)
|
118 |
{
|
128 |
{
|
119 |
|
129 |
|
120 |
}
|
130 |
}
|
121 |
|
131 |
|