RINASim  October 2016
Documentation of framework for OMNeT++
FANotifier.h
Go to the documentation of this file.
1 //
2 // This program is free software: you can redistribute it and/or modify
3 // it under the terms of the GNU Lesser General Public License as published by
4 // the Free Software Foundation, either version 3 of the License, or
5 // (at your option) any later version.
6 //
7 // This program is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 // GNU Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public License
13 // along with this program. If not, see http://www.gnu.org/licenses/.
14 //
15 
16 #ifndef FANOTIFIER_H_
17 #define FANOTIFIER_H_
18 
19 //Standard libraries
20 #include <omnetpp.h>
21 //RINASim libraries
22 #include "FANotifierBase.h"
23 #include "FANotifierListeners.h"
24 #include "RIBdBase.h"
25 
26 class FANotifier : public FANotifierBase {
27  public:
28 
29  virtual void sendCreateRequestFlow(Flow* flow);
30  virtual void sendCreateResponseNegative(Flow* flow);
31  virtual void sendCreateResponsePostive(Flow* flow);
32  virtual void sendDeleteRequestFlow(Flow* flow);
33  virtual void sendDeleteResponseFlow(Flow* flow);
34  virtual void receiveAllocationRequestFromFai(Flow* flow);
35  virtual void receiveCreateFlowPositiveFromRa(Flow* flow);
36  virtual void receiveCreateFlowNegativeFromRa(Flow* flow);
37 
38  protected:
39  //Signals
40  simsignal_t sigRIBDCreReqFlo;
41  simsignal_t sigRIBDDelReqFlo;
42  simsignal_t sigRIBDDelResFlo;
43  simsignal_t sigRIBDCreResFloPosi;
44  simsignal_t sigRIBDCreResFloNega;
45  simsignal_t sigRIBDAllocResPosi;
46  simsignal_t sigRIBDAllocResNega;
47  simsignal_t sigRIBDCreFlow;
48 
49  //Listeners
61 
62  void signalizeCreateRequestFlow(Flow* flow);
63  void signalizeDeleteRequestFlow(Flow* flow);
67  void signalizeCreateFlow(Flow* flow);
70 
71  void initPointers();
73 
74  //SimpleModule overloads
75  virtual void initialize();
76  virtual void handleMessage(cMessage *msg){};
77 
78  //CDAPProcessingBase overload
79  virtual void signalizeMessage(CDAPMessage* msg);
80 
81  long getNewInvokeId();
82 
83  virtual void processMCreate(CDAP_M_Create* msg);
84  virtual void processMCreateR(CDAP_M_Create_R* msg);
85  virtual void processMDelete(CDAP_M_Delete* msg);
86  virtual void processMDeleteR(CDAP_M_Delete_R* msg);
87 
89 
90 };
91 
92 #endif /* FANOTIFIER_H_ */
Class representing flow object with attributes from specs.
Definition: Flow.h:45
simsignal_t sigRIBDAllocResNega
Definition: FANotifier.h:46
simsignal_t sigRIBDDelReqFlo
Definition: FANotifier.h:41
void initPointers()
Definition: FANotifier.cc:269
LisRIBDCreResPosi * lisRIBDCreResPosi
Definition: FANotifier.h:55
LisRIBDCreReq * lisRIBDCreReq
Definition: FANotifier.h:50
void signalizeAllocateResponseNegative(Flow *flow)
Definition: FANotifier.cc:288
virtual void signalizeMessage(CDAPMessage *msg)
Function asks for notifies about CDAP message ready to be sent.
Definition: FANotifier.cc:359
LisRIBDDelRes * lisRIBDDelRes
Definition: FANotifier.h:58
void initSignalsAndListeners()
Definition: FANotifier.cc:31
LisRIBDAllReqFromFai * lisRIBDAllReqFromFai
Definition: FANotifier.h:52
LisRIBDCreFloNega * lisRIBDCreFloNega
Definition: FANotifier.h:60
LisRIBDCreResNega * lisRIBDCreResNegaFromFa
Definition: FANotifier.h:54
virtual void processMDeleteR(CDAP_M_Delete_R *msg)
Function crunching supported M_DELETE_R message.
Definition: FANotifier.cc:341
RIBdBase * RIBd
Definition: FANotifier.h:88
virtual void processMCreateR(CDAP_M_Create_R *msg)
Function crunching supported M_CREATE_R message.
Definition: FANotifier.cc:311
virtual void sendCreateRequestFlow(Flow *flow)
Definition: FANotifier.cc:95
virtual void sendCreateResponseNegative(Flow *flow)
Definition: FANotifier.cc:155
long getNewInvokeId()
Definition: FANotifier.cc:363
virtual void sendDeleteRequestFlow(Flow *flow)
Definition: FANotifier.cc:125
LisRIBDCreReq * lisRIBDCreReqByForward
Definition: FANotifier.h:51
void signalizeCreateFlow(Flow *flow)
Definition: FANotifier.cc:278
virtual void handleMessage(cMessage *msg)
Definition: FANotifier.h:76
LisRIBDDelReq * lisRIBDDelReq
Definition: FANotifier.h:57
simsignal_t sigRIBDCreReqFlo
Definition: FANotifier.h:40
LisRIBDCreResNega * lisRIBDCreResNega
Definition: FANotifier.h:53
virtual void receiveCreateFlowNegativeFromRa(Flow *flow)
Definition: FANotifier.cc:91
void signalizeDeleteResponseFlow(Flow *flow)
Definition: FANotifier.cc:293
virtual void sendDeleteResponseFlow(Flow *flow)
Definition: FANotifier.cc:221
virtual void sendCreateResponsePostive(Flow *flow)
Definition: FANotifier.cc:188
simsignal_t sigRIBDCreResFloNega
Definition: FANotifier.h:44
LisRIBDCreFloPosi * lisRIBDCreFloPosi
Definition: FANotifier.h:59
virtual void processMDelete(CDAP_M_Delete *msg)
Function crunching supported M_DELETE message.
Definition: FANotifier.cc:329
virtual void receiveCreateFlowPositiveFromRa(Flow *flow)
Definition: FANotifier.cc:87
LisRIBDCreResPosi * lisRIBDCreResPosiForward
Definition: FANotifier.h:56
simsignal_t sigRIBDCreResFloPosi
Definition: FANotifier.h:43
virtual void processMCreate(CDAP_M_Create *msg)
Function crunching supported M_CREATE message.
Definition: FANotifier.cc:298
void signalizeAllocateResponsePositive(Flow *flow)
Definition: FANotifier.cc:254
simsignal_t sigRIBDCreFlow
Definition: FANotifier.h:47
void signalizeCreateResponseFlowNegative(Flow *flow)
Definition: FANotifier.cc:273
void signalizeCreateResponseFlowPositive(Flow *flow)
Definition: FANotifier.cc:264
virtual void receiveAllocationRequestFromFai(Flow *flow)
Definition: FANotifier.cc:75
void signalizeDeleteRequestFlow(Flow *flow)
Definition: FANotifier.cc:283
simsignal_t sigRIBDDelResFlo
Definition: FANotifier.h:42
void signalizeCreateRequestFlow(Flow *flow)
Definition: FANotifier.cc:259
virtual void initialize()
Definition: FANotifier.cc:353
simsignal_t sigRIBDAllocResPosi
Definition: FANotifier.h:45