RINASim  October 2016
Documentation of framework for OMNeT++
RIBd.h
Go to the documentation of this file.
1 //
2 // The MIT License (MIT)
3 //
4 // Copyright (c) 2014-2016 Brno University of Technology, PRISTINE project
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to deal
8 // in the Software without restriction, including without limitation the rights
9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // The above copyright notice and this permission notice shall be included in
14 // all copies or substantial portions of the Software.
15 //
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 // THE SOFTWARE.
31 #ifndef RIBDAEMON_H_
32 #define RIBDAEMON_H_
33 
34 //Standard libraries
35 #include <omnetpp.h>
36 //RINASim libraries
37 #include "Utils.h"
38 #include "CDAPProcessingBase.h"
39 #include "RIBdBase.h"
40 #include "ExternConsts.h"
41 #include "RIBdListeners.h"
42 #include "RINASignals.h"
43 #include "PDU.h"
44 #include "IntRoutingUpdate.h"
45 #include "FANotifier.h"
46 #include "EnrollmentNotifier.h"
47 #include "RoutingNotifier.h"
48 
49 //Constants
50 extern const char* MSG_CONGEST;
51 //extern const char* MSG_ROUTINGUPDATE;
52 //extern const char* MSG_ENROLLMENT;
53 
54 class RIBd : public RIBdBase {
55  public:
56  virtual void receiveData(CDAPMessage* cimsg);
57  /* Handles information coming from PDUFTG module. */
58  //virtual void receiveRoutingUpdateFromRouting(IntRoutingUpdate * update);
59 
60  virtual void sendCongestionNotification(PDU* pdu);
61 
62  virtual void signalizeSendData(CDAPMessage* msg);
63 
65 
66  protected:
70 
74 
75  virtual void initialize();
76  virtual void handleMessage(cMessage *msg);
77 
79  void initPointers();
80 
81  //Signals
82 
83  simsignal_t sigRIBDSendData;
84  simsignal_t sigRIBDCongNotif;
85 
86  /* Emit update received signal. */
87  //simsignal_t sigRIBDFwdUpdateRecv;
88  //simsignal_t sigRIBDRoutingUpdateRecv;
89 
90 
91  //Listeners
94 
95  /* Listen for PDUFTG update messages. */
96  //LisRIBDRoutingUpdate* lisRIBDRoutingUpdate;
97 
98  void processMStart(CDAPMessage* msg);
99 // void processMWrite(CDAPMessage* msg);
100 
101 };
102 
103 #endif /* RIBDAEMON_H_ */
LisRIBDRcvData * lisRIBDRcvData
Definition: RIBd.h:92
Definition: RIBd.h:54
virtual void receiveData(CDAPMessage *cimsg)
Definition: RIBd.cc:301
FANotifierBase * FANotif
Definition: RIBd.h:67
bool useRoutingNotifier
Definition: RIBd.h:73
virtual void signalizeSendData(CDAPMessage *msg)
Definition: RIBd.cc:444
void processMStart(CDAPMessage *msg)
Definition: RIBd.cc:801
bool useFANotifier
Definition: RIBd.h:71
virtual void initialize()
Definition: RIBd.cc:43
const char * MSG_CONGEST
Definition: RIBd.cc:33
Definition: PDU.h:42
virtual void sendCongestionNotification(PDU *pdu)
Definition: RIBd.cc:459
void initSignalsAndListeners()
Definition: RIBd.cc:344
virtual void handleMessage(cMessage *msg)
Definition: RIBd.cc:77
simsignal_t sigRIBDSendData
Definition: RIBd.h:83
EnrollmentNotifierBase * EnrollNotif
Definition: RIBd.h:68
LisRIBDCongesNotif * lisRIBDCongNotif
Definition: RIBd.h:93
void initPointers()
Definition: RIBd.cc:59
RoutingNotifierBase * RoutingNotif
Definition: RIBd.h:69
simsignal_t sigRIBDCongNotif
Definition: RIBd.h:84
bool useEnrollmentNotifier
Definition: RIBd.h:72
void signalizeCongestionNotification(CongestionDescriptor *congDesc)
Definition: RIBd.cc:518