RINASim  October 2016
Documentation of framework for OMNeT++
RMTMaxQBase.cc
Go to the documentation of this file.
1 // The MIT License (MIT)
2 //
3 // Copyright (c) 2014-2016 Brno University of Technology, PRISTINE project
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to deal
7 // in the Software without restriction, including without limitation the rights
8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 // copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in
13 // all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 // THE SOFTWARE.
22 
23 #include <RMTMaxQBase.h>
24 
26 
27 
29 {
30  qMonPolicy = getRINAModule<RMTQMonitorBase*>(this, 1, {MOD_POL_RMT_QMONITOR});
31 
32  addrComparator = getRINAModule<AddressComparatorBase*>(this, 2, {MOD_RESALLOC, MOD_POL_RA_ADDRCOMPARATOR});
33 
34  rmtAllocator = getRINAModule<RMTModuleAllocator*>(this, 1, {MOD_RMTALLOC});
35 
36  // register slowdown signal for RA
37  sigRMTSDReq = registerSignal(SIG_RMT_SlowdownRequest);
38 
40  onPolicyInit();
41 }
42 
44 {
45 }
46 
47 void RMTMaxQBase::handleMessage(cMessage *msg)
48 {
49 
50 }
51 
53 {
54  return false;
55 }
56 
58 {
59 }
60 
61 void RMTMaxQBase::notifySenderOfCongestion(const cPacket* pdu)
62 {
63  emit(sigRMTSDReq, pdu);
64 }
RMTQMonitorBase * qMonPolicy
Definition: RMTMaxQBase.h:80
const char * SIG_RMT_SlowdownRequest
Definition: RINASignals.cc:130
const char * MOD_RESALLOC
Definition: ExternConsts.cc:58
Define_Module(RMTMaxQBase)
simsignal_t sigRMTSDReq
Definition: RMTMaxQBase.h:103
const char * MOD_RMTALLOC
Definition: ExternConsts.cc:63
const char * MOD_POL_RMT_QMONITOR
Definition: ExternConsts.cc:74
AddressComparatorBase * addrComparator
Definition: RMTMaxQBase.h:85
void setPolicyDisplayString(cModule *mod, const char *str)
Definition: Utils.cc:69
virtual bool run(RMTQueue *queue)
Definition: RMTMaxQBase.cc:52
void notifySenderOfCongestion(const cPacket *pdu)
Definition: RMTMaxQBase.cc:61
virtual void onQueueLengthDrop(RMTQueue *queue)
Definition: RMTMaxQBase.cc:57
virtual void handleMessage(cMessage *msg)
Definition: RMTMaxQBase.cc:47
void initialize()
Definition: RMTMaxQBase.cc:28
const char * MOD_POL_RA_ADDRCOMPARATOR
Definition: ExternConsts.cc:68
virtual void onPolicyInit()
Definition: RMTMaxQBase.cc:43
RMTModuleAllocator * rmtAllocator
Definition: RMTMaxQBase.h:90