72 Enter_Method(
"receiveAllocateRequest()");
78 EV <<
"Cannot allocate flow which is not in pending state" << endl;
85 EV <<
"invokeNewFlowPolicy() failed" << endl;
93 EV <<
"createEFCP() failed" << endl;
101 EV <<
"createBindings() failed" << endl;
123 Enter_Method(
"receiveAllocateResponsePositive()");
129 EV <<
"Cannot continue allocation of flow which is not in pending state" << endl;
137 EV <<
"createEFCP() failed" << endl;
147 EV <<
"createBindings() failed" << endl;
168 Enter_Method(
"receiveAllocateResponseNegative()");
173 EV <<
"Cannot continue allocation of flow which is not in pending state" << endl;
185 Enter_Method(
"receiveCreateRequest()");
191 EV <<
"Cannot allocate flow which is not in pending state" << endl;
198 EV <<
"invokeNewFlowPolicy() failed" << endl;
216 Enter_Method(
"receiveDeallocateRequest()");
222 EV <<
"Cannot deallocate flow which is not in deallocate pending state" << endl;
236 Enter_Method(
"receiveDeleteRequest()");
242 EV <<
"Cannot deallocate flow which is not in transfer state" << endl;
265 Enter_Method(
"receiveCreResNegative()");
276 EV <<
"invokeAllocateRetryPolicy() failed" << endl;
285 Enter_Method(
"receiveCreResPositive()");
315 Enter_Method(
"receiveDeleteResponse()");
321 EV <<
"Cannot deallocate flow which is not in deallocatre pending state" << endl;
345 std::stringstream os;
354 return os << fai.
info();
358 EV << this->getFullPath() <<
" attempts to create EFCP instance" << endl;
361 return efcpi ?
true :
false;
365 EV << this->getFullPath() <<
" attempts to bind EFCP and RMT" << endl;
367 cModule* IPCModule =
FaModule->getModuleByPath(
"^.^");
369 std::ostringstream nameEfcpNorth;
371 cModule* efcpModule = getRINAModule<cModule*>(IPCModule, 0, {
MOD_EFCP});
372 cGate* gateEfcpUpIn = efcpModule->gateHalf(nameEfcpNorth.str().c_str(), cGate::INPUT);
373 cGate* gateEfcpUpOut = efcpModule->gateHalf(nameEfcpNorth.str().c_str(), cGate::OUTPUT);
377 std::ostringstream ribdName;
379 cModule* ribdModule = getRINAModule<cModule*>(IPCModule, 0, {
MOD_RIBDAEMON});
380 cModule* ribdSplitterModule =
383 if (!ribdModule->hasGate(ribdName.str().c_str()))
386 cGate* gateRibdIn = ribdModule->gateHalf(ribdName.str().c_str(), cGate::INPUT);
387 cGate* gateRibdOut = ribdModule->gateHalf(ribdName.str().c_str(), cGate::OUTPUT);
388 cGate* gateRibdSplitIn = ribdSplitterModule->gateHalf(ribdName.str().c_str(), cGate::INPUT);
389 cGate* gateRibdSplitOut = ribdSplitterModule->gateHalf(ribdName.str().c_str(), cGate::OUTPUT);
392 gateEfcpUpOut->connectTo(gateRibdIn);
393 gateRibdIn->connectTo(gateRibdSplitIn);
394 gateRibdSplitOut->connectTo(gateRibdOut);
395 gateRibdOut->connectTo(gateEfcpUpIn);
399 std::ostringstream nameIpcDown;
404 if (!IPCModule->hasGate(nameIpcDown.str().c_str()))
407 cGate* gateIpcDownIn = IPCModule->gateHalf(nameIpcDown.str().c_str(), cGate::INPUT);
408 cGate* gateIpcDownOut = IPCModule->gateHalf(nameIpcDown.str().c_str(), cGate::OUTPUT);
411 gateEfcpUpOut->connectTo(gateIpcDownOut);
412 gateIpcDownIn->connectTo(gateEfcpUpIn);
419 std::ostringstream nameRmtUp;
421 cGate* gateRmtUpIn = rmtModule->getParentModule()->gateHalf(nameRmtUp.str().c_str(), cGate::INPUT);
422 cGate* gateRmtUpOut = rmtModule->getParentModule()->gateHalf(nameRmtUp.str().c_str(), cGate::OUTPUT);
424 std::ostringstream nameEfcpDown;
426 cGate* gateEfcpDownIn = efcpModule->gateHalf(nameEfcpDown.str().c_str(), cGate::INPUT);
427 cGate* gateEfcpDownOut = efcpModule->gateHalf(nameEfcpDown.str().c_str(), cGate::OUTPUT);
430 gateRmtUpOut->connectTo(gateEfcpDownIn);
431 gateEfcpDownOut->connectTo(gateRmtUpIn);
433 return gateEfcpDownIn->isConnected() && gateEfcpDownOut->isConnected()
434 && gateEfcpUpIn->isConnected() && gateEfcpUpOut->isConnected()
435 && gateRmtUpIn->isConnected() && gateRmtUpOut->isConnected();
440 EV << this->getFullPath() <<
" attempts to disconnect bindings between EFCP, IPC and RMT" << endl;
447 std::ostringstream ribdName;
449 cModule* ribdModule = getRINAModule<cModule*>(
this, 2, {
MOD_RIBDAEMON});
452 cGate* gateRibdIn = ribdModule->gateHalf(ribdName.str().c_str(), cGate::INPUT);
453 cGate* gateRibdOut = ribdModule->gateHalf(ribdName.str().c_str(), cGate::OUTPUT);
454 cGate* gateRibdSplitIn = ribdSplitterModule->gateHalf(ribdName.str().c_str(), cGate::INPUT);
455 cGate* gateRibdSplitOut = ribdSplitterModule->gateHalf(ribdName.str().c_str(), cGate::OUTPUT);
457 gateRibdIn->disconnect();
458 gateRibdOut->disconnect();
459 gateRibdSplitIn->disconnect();
460 gateRibdSplitOut->disconnect();
464 cModule* IPCModule =
FaModule->getModuleByPath(
"^.^");
465 std::ostringstream nameIpcDown;
467 cGate* gateIpcDownIn = IPCModule->gateHalf(nameIpcDown.str().c_str(), cGate::INPUT);
468 cGate* gateIpcDownOut = IPCModule->gateHalf(nameIpcDown.str().c_str(), cGate::OUTPUT);
471 gateIpcDownOut->disconnect();
472 gateIpcDownIn->disconnect();
476 std::ostringstream nameEfcpNorth;
478 cModule* efcpModule = getRINAModule<cModule*>(
this, 2, {
MOD_EFCP});
479 cGate* gateEfcpUpIn = efcpModule->gateHalf(nameEfcpNorth.str().c_str(), cGate::INPUT);
480 cGate* gateEfcpUpOut = efcpModule->gateHalf(nameEfcpNorth.str().c_str(), cGate::OUTPUT);
481 gateEfcpUpIn->disconnect();
482 gateEfcpUpOut->disconnect();
487 std::ostringstream nameRmtUp;
489 cGate* gateRmtUpIn = rmtModule->getParentModule()->gateHalf(nameRmtUp.str().c_str(), cGate::INPUT);
490 cGate* gateRmtUpOut = rmtModule->getParentModule()->gateHalf(nameRmtUp.str().c_str(), cGate::OUTPUT);
492 std::ostringstream nameEfcpDown;
494 cGate* gateEfcpDownIn = efcpModule->gateHalf(nameEfcpDown.str().c_str(), cGate::INPUT);
495 cGate* gateEfcpDownOut = efcpModule->gateHalf(nameEfcpDown.str().c_str(), cGate::OUTPUT);
498 gateRmtUpOut->disconnect();
499 gateRmtUpIn->disconnect();
500 gateEfcpDownIn->disconnect();
501 gateEfcpDownOut->disconnect();
515 cModule* catcher2 = this->getModuleByPath(
"^.^");
516 cModule* catcher3 = this->getModuleByPath(
"^.^.^");
647 std::ostringstream ribdName;
649 cModule* ribdModule = getRINAModule<cModule*>(
this, 2, {
MOD_RIBDAEMON});
650 cModule* ribdSplitterModule =
652 ribdModule->addGate(ribdName.str().c_str(), cGate::INOUT,
false);
653 ribdSplitterModule->addGate(ribdName.str().c_str(), cGate::INOUT,
false);
657 std::ostringstream nameIpcDown;
659 cModule* IPCModule =
FaModule->getModuleByPath(
"^.^");
660 IPCModule->addGate(nameIpcDown.str().c_str(), cGate::INOUT,
false);
666 Enter_Method(
"receiveCreFlowResPositiveFromNminusOne()");
std::ostream & operator<<(std::ostream &os, const FAI &fai)
virtual void receiveDeleteRequest(Flow *flow)
Class representing flow object with attributes from specs.
AllocateRetryBase * AllocRetryPolicy
const char * MOD_RESALLOC
const APNamingInfo & getSrcApni() const
Gets read-only source APNamingInfo.
NFlowTableEntry::EAllocateStatus getAllocateStatus() const
const char * SIG_FAI_DeallocateRequest
int getRemotePortId() const
void signalizeDeleteFlowRequest()
simsignal_t sigFAIDeallocReq
const char * SIG_AERIBD_AllocateResponsePositive
const char * SIG_FAI_CreateFlowRequest
const int VAL_UNDEF_PORTID
ConnectionId & getConnectionId()
Gets Flow's ConnectionId.
int getLocalPortId() const
const char * SIG_RIBD_DeleteRequestFlow
void signalizeAllocateResponsePositive()
void signalizeCreateFlowRequest()
void signalizeCreateFlowResponsePositive()
void signalizeDeallocateResponseFromFai()
virtual bool receiveAllocateResponsePositive()
const char * SIG_RIBD_DeleteResponseFlow
const char * SIG_FAI_CreateFlowResponseNegative
void setRemotePortId(int remotePortId)
EFCPInstance * createEFCPI(const Flow *flow, int cepId, int portId)
void initSignalsAndListeners()
const char * SIG_toFAI_AllocateRequest
virtual void handleMessage(cMessage *msg)
bool invokeAllocateRetryPolicy()
const char * GATE_NORTHIO_
void changeAllocStatus(Flow *flow, NFlowTableEntry::EAllocateStatus status)
const char * SIG_FAI_DeleteFlowRequest
void setDstPortId(int dstPortId)
Sets destination PortId.
LisFAIAllocResNega * lisAllocResNega
void deleteEfcpiGate(unsigned int efcpiId)
LisFAIAllocReq * lisAllocReq
const char * MOD_RIBDSPLITTER
const char * SIG_FAI_AllocateResponseNegative
virtual void receiveDeleteResponse()
const char * MOD_RIBDAEMON
void setDstCepId(int destCepId)
Setter of destination Connection-Endpoint identifier.
LisFAICreResNega * lisCreResNega
const int VAL_UNDEF_CEPID
int getDstPortId() const
Gets destination PortId.
int getLocalCepId() const
const char * SIG_FAI_DeleteFlowResponse
const char * SIG_FAI_DeallocateResponse
virtual void receiveAllocateResponseNegative()
LisFAICreResNegaNminusOne * lisCreResNegaNmO
virtual bool receiveCreateResponseNegative()
virtual bool bindNFlowToNM1Flow(Flow *flow)=0
LisFAICreResPosiNminusOne * lisCreResPosiNmO
const char * MOD_RELAYANDMUX
void setTimeDeleted(const simtime_t &timDel)
simsignal_t sigFAIAllocResPosi
virtual void receiveCreateFlowResponsePositiveFromNminusOne()
virtual bool receiveAllocateRequest()
const char * SIG_FAI_CreateFlowResponsePositive
void setLocalPortId(int localPortId)
virtual bool receiveCreateRequest()
simsignal_t sigFAICreResPosi
LisFAIAllocResPosi * lisAllocResPosi
int getDstCepId() const
Getter of destination Connection-Endpoint identifier.
bool isDegenerateDataTransfer() const
simsignal_t sigFAIAllocResNega
void setLocalCepId(int localCepId)
bool degenerateDataTransfer
simsignal_t sigFAIDeallocRes
void signalizeDeleteFlowResponse()
virtual void receiveCreateFlowResponseNegativeFromNminusOne()
virtual bool receiveCreateResponsePositive(Flow *flow)
int getRemoteCepId() const
void setRemoteCepId(int remoteCepId)
void createEfcpiGate(unsigned int efcpiId)
NFlowTable * getNFlowTable() const
const char * SIG_FAI_AllocateResponsePositive
const char * SIG_AERIBD_AllocateResponseNegative
const ConnectionId & getConId() const
Gets read-only Flow's ConnectionId.
const char * TIM_CREREQ
FlowAllocatorInstance class.
LisFAICreResPosi * lisCreResPosi
const char * SIG_RIBD_CreateFlowResponsePositive
const char * PAR_LOCALPORTID
const char * PAR_LOCALCEPID
bool deleteEFCPI(Flow *flow)
void signalizeAllocationRequestFromFai()
const char * PAR_REMOTECEPID
const char * PAR_REMOTEPORTID
virtual void initialize()
void postInitialize(FABase *fa, Flow *fl, EFCP *efcp)
const char * GATE_EFCPIO_
virtual bool invokeNewFlowRequestPolicy(Flow *flow)=0
simsignal_t sigFAIAllocReq
void signalizeCreateFlowResponseNegative()
void signalizeAllocateResponseNegative()
void signalizeDeallocateRequestFromFai()
bool isManagementFlowLocalToIPCP() const
virtual bool receiveDeallocateRequest()
const char * MOD_ALLOCRETRYPOLICY
const char * SIG_FAI_AllocateRequest
const char * SIG_RIBD_CreateFlowResponseNegative
NFlowTableEntry * findEntryByFlow(const Flow *flow)
virtual bool run(Flow &flow)
void setDeallocInvokeId(long deallocInvokeId)
Sets deallocation InvokeId.
simsignal_t sigFAICreResNega
long getDeallocInvokeId() const
Gets deallocation InvokeId Used inside M_DELETE(_R)(flow) messages.