--- a/src/DIF/FA/FAITableEntry.cc
+++ b/src/DIF/FA/FAITableEntry.cc
@@ -25,7 +25,7 @@
this->timeLastActive = simTime();
}
-FAITableEntry::FAITableEntry(FAI* nfai): flow(NULL), allocStatus(this->UNKNOWN) {
+FAITableEntry::FAITableEntry(FAIBase* nfai): flow(NULL), allocStatus(this->UNKNOWN) {
this->fai = nfai;
this->timeCreated = simTime();
this->timeLastActive = simTime();
@@ -40,14 +40,18 @@
}
std::string FAITableEntry::info() const {
- std::stringstream os;
- os << "status: " << this->getAllocateStatusString() <<
- "\tcreated: " << this->getTimeCreated() << "\tlastActive: " << this->getTimeLastActive() << endl;
- if ( this->getFlow() )
- os << *(this->getFlow()) << endl;
- //os << this->getFlow()->getQosParameters();
+ std::ostringstream os;
+ os << "STATUS: " << this->getAllocateStatusString() << endl;
if ( this->getFai() )
- os << *(this->getFai()) << endl;
+ os << "FAI> " << *(this->getFai()) << endl;
+ if ( this->getCFlow() ) {
+ os << this->getCFlow()->infoSource() << endl;
+ os << this->getCFlow()->infoDestination() << endl;
+ os << this->getCFlow()->infoOther() << endl;
+ os << this->getCFlow()->infoQoS() << endl;
+ }
+ os << "Created at: " << this->getTimeCreated()
+ << "\tLast active at: " << this->getTimeLastActive() << endl;
return os.str();
}
@@ -55,7 +59,7 @@
return os << fte.info();
}
-FAI* FAITableEntry::getFai() const {
+FAIBase* FAITableEntry::getFai() const {
return fai;
}
@@ -76,6 +80,9 @@
case ALLOC_ERR: return "allocation error";
case DEALLOC_PEND: return "deallocation pending";
case DEALLOCATED: return "deallocated";
+ case DEINST_PEND: return "deinstantiation pending";
+ case DEINSTANTIATED:return "deinstantiated";
+ case FORWARDED: return "allocation forwarded";
default: return "UNKNOWN";
}
// static std::string AllocateStatusStrings[] = {"Pending", "Allocation Positive", "Allocation Negative"};
@@ -90,10 +97,25 @@
this->timeLastActive = timeLastActive;
}
-void FAITableEntry::setFai(FAI* nfai) {
+void FAITableEntry::setFai(FAIBase* nfai) {
this->fai = nfai;
}
-const Flow* FAITableEntry::getFlow() const {
+const Flow* FAITableEntry::getCFlow() const {
return flow;
}
+
+bool FAITableEntry::operator ==(const FAITableEntry& other) const {
+ return this->fai == other.fai
+ && this->flow == other.flow
+ && this->allocStatus == other.allocStatus
+ && this->timeCreated == other.timeCreated;
+}
+
+FAITableEntry::AllocateStatus FAITableEntry::getAllocateStatus() const {
+ return allocStatus;
+}
+
+Flow* FAITableEntry::getFlow() {
+ return flow;
+}