RINASim  October 2016
Documentation of framework for OMNeT++
WeightedFairQMonitor.h
Go to the documentation of this file.
1 //
2 // Copyright © 2014 - 2015 PRISTINE Consortium (http://ict-pristine.eu)
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public License
15 // along with this program. If not, see http://www.gnu.org/licenses/.
16 //
17 
18 #ifndef WeightedFairQMonitor_H_
19 #define WeightedFairQMonitor_H_
20 
21 #include <map>
22 
23 #include "RMTQMonitorBase.h"
25 
26 
27 namespace FWQ {
28 
29 using namespace std;
30 
31 typedef map<RMTQueue*, FlowParams> queue2Fp;
32 typedef queue2Fp::iterator queue2FpIt;
33 
35 {
36  public:
37  virtual void onPolicyInit();
38  virtual void postPDUInsertion(RMTQueue* queue);
39  virtual void postPDURelease(RMTQueue* queue);
40  virtual void onMessageDrop(RMTQueue* queue, const cPacket* pdu);
41  virtual void postQueueCreation(RMTQueue* queue);
42  virtual void preQueueRemoval(RMTQueue* queue);
43 
44  virtual RMTQueue * getNextQueue();
45 
46  protected:
47  queue2Fp queueTimes;
48  int defBW;
49  int stopQAt, startQAt;
50 };
51 
52 } /* namespace FWQ */
53 
54 #endif /* SIMPLEMONITOR_H_ */
map< RMTQueue *, FlowParams > queue2Fp
queue2Fp::iterator queue2FpIt