RINASim  October 2016
Documentation of framework for OMNeT++
ModularMonitor.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 #pragma once
18 
19 #include "SmartMonitor.h"
20 #include "Int_MM_Out_Module.h"
21 #include "Int_MM_Drop_Module.h"
22 
23 namespace ModularMonitor {
24 
25 using namespace std;
26 
28 {
29 public:
30  void onPolicyInit();
31  void postPDUInsertion(RMTQueue* queue);
32  void onMessageDrop(RMTQueue* queue, const cPacket* pdu);
33  void prePDURelease(RMTQueue* queue);
34  void postQueueCreation(RMTQueue* queue);
35 
36  double getInDropProb(RMTQueue * queue);
37  double getOutDropProb(RMTQueue * queue);
38 
39  RMTQueue* getNextInput(RMTPort* port);
40  RMTQueue* getNextOutput(RMTPort* port);
41 
42  simtime_t getInNextTime(RMTPort * port);
43  simtime_t getOutNextTime(RMTPort * port);
44 
45 protected:
50 
52  simsignal_t signal;
53  map<const cPacket *, simtime_t> inTime;
54  map<const cPacket *, int> inPos;
55  map<RMTPort *, int> portServed;
56 };
57 
58 }
map< RMTPort *, int > portServed
Int_MM_Drop_Module * outDropModule
map< const cPacket *, simtime_t > inTime
map< const cPacket *, int > inPos
Int_MM_Drop_Module * inDropModule
Int_MM_Out_Module * inOutModule
Int_MM_Out_Module * outOutModule