73 bool isSelfEnrol =
false;
91 apName = this->getModuleByPath(
"^.^")->par(
"apName").stringValue();
92 apInstance = this->getModuleByPath(
"^.^")->par(
"apInstance").stringValue();
116 cModule* SocketMod = module->getModuleByPath(
"^.socket");
119 SocketMod->getOrCreateFirstUnconnectedGatePair(
"southIo",
false,
true, *&gSocketIn, *&gSocketOut);
128 cModule* aeMgmt = module->getModuleByPath(
"^");
131 aeMgmt->getOrCreateFirstUnconnectedGatePair(
"aeIo",
false,
true, *&gaeMgmtIn, *&gaeMgmtOut);
133 cModule* aeMgmtParent = module->getModuleByPath(
"^.^");
134 cGate* gaeMgmtParentIn;
135 cGate* gaeMgmtParentOut;
136 aeMgmtParent->getOrCreateFirstUnconnectedGatePair(
GATE_SOUTHIO,
false,
true, *&gaeMgmtParentIn, *&gaeMgmtParentOut);
141 Irm->getOrCreateFirstUnconnectedGatePair(
GATE_AEIO,
false,
true, *&gIrmIn, *&gIrmOut);
143 cModule* IrmMod =
Irm->getParentModule();
146 IrmMod->getOrCreateFirstUnconnectedGatePair(
GATE_NORTHIO,
false,
true, *&gIrmModIn, *&gIrmModOut);
148 cModule* ApMon = module->getModuleByPath(
"^.^.^");
151 ApMon->getOrCreateFirstUnconnectedGatePair(
GATE_SOUTHIO,
false,
true, *&gApIn, *&gApOut);
154 gIrmOut->connectTo(gIrmModOut);
155 gIrmModOut->connectTo(gApIn);
156 gApIn->connectTo(gaeMgmtParentIn);
157 gaeMgmtParentIn->connectTo(gaeMgmtIn);
158 gaeMgmtIn->connectTo(gSocketIn);
162 gSocketOut->connectTo(gaeMgmtOut);
163 gaeMgmtOut->connectTo(gaeMgmtParentOut);
164 gaeMgmtParentOut->connectTo(gApOut);
165 gApOut->connectTo(gIrmModIn);
166 gIrmModIn->connectTo(gIrmIn);
180 cModule* catcher1 = this->getModuleByPath(
"^.^");
181 cModule* catcher2 = this->getModuleByPath(
"^.^");
182 cModule* catcher3 = this->getModuleByPath(
"^.^.^");
389 Enter_Method(
"startDAFEnrollment()");
406 Enter_Method(
"receiveStartDAFEnrollmentResponse()");
439 Enter_Method(
"receiveStopDAFEnrollmentRequest()");
490 Enter_Method(
"receiveStartOperationRequest()");
497 Enter_Method(
"receiveStartDAFEnrollmentRequest()");
533 Enter_Method(
"receiveStopDAFEnrollmentResponse()");
562 Enter_Method(
"receiveStartOperationResponse()");
570 enrollObj->setIsImmediate(
true);
763 cXMLElement* mainTag = NULL;
764 if (config != NULL && config->hasChildren() && config->getFirstChildWithTag(
DAF_ELEM_PREENROL))
767 EV <<
"configData parameter not initialized!" << endl;
772 for (cXMLElementList::const_iterator it = enrll.begin(); it != enrll.end(); ++it) {
773 cXMLElement* m = *it;
776 EV <<
"\nSimTime tag is missing time attribute!" << endl;
785 scheduleAt(cas, cmsg);
791 scheduleAt(cas, cmsg);
794 cXMLElementList coms = m->getChildren();
795 for (cXMLElementList::const_iterator jt = coms.begin(); jt != coms.end(); ++jt) {
796 cXMLElement* n = *jt;
802 EV <<
"\nError when parsing Connect/Release record" << endl;
818 cModule* ipc = this->getParentModule()->getParentModule();
819 std::string ico, col;
824 default: {ico=
"status/cross"; col=
"red";
break;}
827 ipc->getDisplayString().setTagArg(
"i2", 0, ico.c_str());
828 ipc->getDisplayString().setTagArg(
"i2", 1, col.c_str());
833 if (msg->isSelfMessage()) {
837 while (!apnip->empty())
849 while (!apnip->empty())
868 Enter_Method(
"checkEnrolled()");
878 Enter_Method(
"createFlow()");
900 Enter_Method(
"receiveAllocationResponsePositive()");
916 cModuleType *moduleType = cModuleType::get(
"rina.src.DAF.AEManagement.AEmanagementModule");
919 std::ostringstream ostr;
923 cModule *module = moduleType->create(ostr.str().c_str(), this->getModuleByPath(
"^.^.aeManagement"));
925 module->finalizeParameters();
926 module->buildInside();
928 cModule *aemgmt = module->getSubmodule(
"aemgmt");
929 aemgmt->par(
"aeInstance") = std::to_string(currentMgmtAEInstanceId);
937 module->callInitialize();
939 currentMgmtAEInstanceId += 1;
948 Enter_Method(
"receiveAllocationRequestFromFai()");
961 EV <<
"IRM was unable to create bindings!" << endl;
969 EV <<
"QoS Requirement cannot be met, please check AE attributes!" << endl;
LisDAFEnrollmentStopOperationReq * lisDAFEnrollmentStartOperationReq
const APNamingInfo & getRemote() const
Class representing flow object with attributes from specs.
const char * SIG_RIBD_StartEnrollmentRequest
simsignal_t sigDAFEnrollmentStartEnrollReq
LisDAFEnrollmentStartOperationRes * lisDAFEnrollmentStartOperationRes
simsignal_t sigDAFEnrollmentStopEnrollReq
const char * DAF_ELEM_RELEASE
Define_Module(DAFEnrollment)
simsignal_t sigDAFEnrollmentStartEnrollRes
const APNamingInfo & getSrcApni() const
Gets read-only source APNamingInfo.
const char * DAF_MSG_ENRLCON
const char * SIG_ENROLLMENT_CACEDataSend
const char * SIG_RIBD_StartOperationResponse
const char * SIG_AERIBD_AllocateResponsePositive
LisDAFEnrollmentStopEnrollReq * lisDAFEnrollmentStopEnrollReq
LisDAFEnrollmentConReq * lisDAFEnrollmentConReq
Application Process Name class.
simsignal_t sigDAFEnrollmentStartOperReq
const char * DAF_ELEM_PREENROL
virtual void setFlow(Flow *flow)
void signalizeStartEnrollmentResponse(DAFEnrollmentObj *obj)
void signalizeStopEnrollmentRequest(DAFEnrollmentObj *obj)
DAFEnrollmentStateTableEntry * findEntryByDstAPN(const APN &apn)
simsignal_t sigDAFEnrollmentAllocResNega
virtual bool receiveMgmtAllocateRequest(Flow *mgmtflow)=0
const char * SIG_ENROLLMENT_Finished
simsignal_t sigDAFEnrollmentAllocResPosi
void signalizeStopEnrollmentResponse(DAFEnrollmentObj *obj)
const char * SIG_RIBD_StartEnrollmentResponse
const char * DAF_MSG_ENRLREL
void receiveStopEnrollmentResponse(CDAPMessage *msg)
LisDAFEnrollmentStartEnrollRes * lisDAFEnrollmentStartEnrollRes
simsignal_t sigDAFEnrollmentSendData
void signalizeAllocateResponseNegative(Flow *flow)
void setDAFEnrollmentStatus(DAFEnrollmentStateTableEntry::DAFEnrollmentStatus status)
virtual DAFEnrollmentObj * dup() const
DAFEnrollCommands PreenrollConnects
const char * DAF_ELEM_CONNECT
const char * DAF_PAR_AUTH_NAME
LisDAFEnrollmentAllResPosi * lisDAFEnrollmentAllResPosi
void createBindings(Flow *flow, DAFEnrollmentNotifier *module)
const char * SIG_ENROLLMENT_StartEnrollmentRequest
void receiveAllocationResponsePositive(Flow *flow)
const char * PAR_CONFIGDATA
bool receiveAllocationRequestFromAe(Flow *flow)
void parseConfig(cXMLElement *config)
DAFEnrollmentStateTable * StateTable
void signalizeStartEnrollmentRequest(DAFEnrollmentObj *obj)
const std::string & getAename() const
Getter of AE name.
void initSignalsAndListeners()
const APN & getApn() const
Getter of APN.
void insert(DAFEnrollmentStateTableEntry entry)
void receiveAllocationRequestFromFAI(Flow *flow)
LisDAFEnrollmentStopEnrollRes * lisDAFEnrollmentStopEnrollRes
LisDAFEnrollmentConResPosi * lisDAFEnrollmentConResPosi
LisDAFEnrollmentConResNega * lisDAFEnrollmentConResNega
bool isEnrolled(const APN &myApn)
const char * SIG_RIBD_StopEnrollmentResponse
APNamingInfo holds complete naming info for particular application process.
const QoSReq & getQosRequirements() const
Gets QoS parameters wanted by flow initiator.
const char * DAF_PAR_AUTH_TYPE
std::list< APNIPair > APNIPairs
DAFEnrollmentNotifier * createMgmtAE(Flow *flow)
bool getIsImmediate() const
DAFEnrollCommands PreenrollReleases
void checkEnrolled(APNIPair *apnip)
LisDAFEnrollmentRequest * lisDAFEnrollmentRequest
virtual object_t & getObjectItem()
const char * SIG_RIBD_StopEnrollmentRequest
const char * SIG_ENROLLMENT_DataSend
simsignal_t sigDAFEnrollmentStartOperRes
void createFlow(APNIPair *apnip)
void receiveStopEnrollmentRequest(CDAPMessage *msg)
simsignal_t sigDAFEnrollmentEnrollPosi
simsignal_t sigDAFEnrollmentStopEnrollRes
virtual object_t & getObjectItem()
void receiveStartEnrollmentResponse(CDAPMessage *msg)
void receiveStartOperationResponse(CDAPMessage *msg)
const char * DAF_PAR_AUTH_OTHER
const char * DAF_ATTR_TIME
void signalizeEnrollmentFinished(DAFEnrollmentStateTableEntry *entry)
void receiveStartEnrollmentRequest(CDAPMessage *msg)
const char * GATE_SOUTHIO
const char * DAF_ELEM_SIMTIME
void setIsImmediateDAFEnrollment(bool immediate)
void signalizeStartOperationRequest(DAFOperationObj *obj)
const char * SIG_ENROLLMENT_StartOperationRequest
const char * SIG_AE_Enrolled
void updateEnrollmentDisplay(DAFEnrollment::IconEnrolStatus status)
virtual void handleMessage(cMessage *msg)
const std::string & getAeinstance() const
Getter of AE-instance attribute.
const APNamingInfo & getLocal() const
void receiveStartOperationRequest(CDAPMessage *msg)
const Address & getSrcAddress() const
const char * SIG_RIBD_ConnectionResponsePositive
const char * GATE_NORTHIO
const char * SIG_ENROLLMENT_StartEnrollmentResponse
const std::string & getApinstance() const
Getter of AP-instance id.
int currentMgmtAEInstanceId
LisDAFEnrollmentStartEnrollReq * lisDAFEnrollmentStartEnrollReq
const Address & getMyAddress() const
void processStopEnrollmentResponse(DAFEnrollmentStateTableEntry *entry)
const char * DAF_PAR_ISSELFENROL
void signalizeAllocateResponsePositive(Flow *flow)
const char * SIG_FAI_AllocateResponsePositive
const char * SIG_AERIBD_AllocateResponseNegative
const char * SIG_ENROLLMENT_StartOperationResponse
void processStopEnrollmentImmediate(DAFEnrollmentStateTableEntry *entry)
const char * SIG_RIBD_ConnectionRequest
bool getIsImmediateDAFEnrollment()
void setNorthGates(Flow *flow, cGate *nIn, cGate *nOut)
simsignal_t sigDAFEnrollmentFinish
const char * SIG_ENROLLMENT_StopEnrollmentResponse
simsignal_t sigDAFEnrollmentCACESendData
void signalizeStartOperationResponse(DAFOperationObj *obj)
const APN & getApn() const
Getter of unique APN which is initialized during object construction.
void signalizeCACESendData(CDAPMessage *cmsg)
const char * SIG_RIBD_ConnectionResponseNegative
const char * SIG_ENROLLMENT_StopEnrollmentRequest
bool compare(const QoSReq &other) const
const char * SIG_RIBD_StartOperationRequest
virtual object_t & getObjectItem()
LisDAFEnrollmentAllReqFromFai * lisDAFEnrollmentAllReqFromFai
const std::string & getName() const
Gets APN string name representation.
bool receiveAllocationResponsePositiveFromIpc(Flow *flow)
const char * SIG_AEMGMT_ConnectionResponsePositive
void startCACE(Flow *flow)
void startEnrollment(DAFEnrollmentStateTableEntry *entry)
const char * DAF_PAR_AUTH_PASS
const char * SIG_FAI_AllocateRequest
Address class holds IPC Process identification.
const APNamingInfo & getDstApni() const
Gets read-only destination APNamingInfo.
virtual void initialize()
const char * DAF_PAR_CON_RETRIES
const char * MOD_IPCRESMANAGER
virtual object_t & getObjectItem()
DAFEnrollmentStateTableEntry::DAFEnrollmentStatus getDAFEnrollmentStatus() const
static const QoSReq MANAGEMENT