RINASim
October 2016
Documentation of framework for OMNeT++
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
RINASim
RINA Simulator
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
MM_PDQ_Drop.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
#pragma once
19
20
#include "
Int_MM_Drop_Module.h
"
21
22
#include <string>
23
#include <map>
24
#include <vector>
25
#include <list>
26
27
namespace
MM_PDQ_Drop
{
28
29
using namespace
std
;
30
31
32
struct
Threshold
{
33
int
limit
;
34
double
prob
;
35
36
Threshold
(
int
,
double
);
37
};
38
39
struct
QueueConfig
{
40
string
id
;
41
int
absThreshold
;
42
vector<Threshold>
thresholdList
;
43
44
QueueConfig
();
45
QueueConfig
(
string
,
int
);
46
};
47
48
class
MM_PDQ_Drop
:
public
Int_MM_Drop_Module
49
{
50
public
:
51
~
MM_PDQ_Drop
();
52
53
void
pduInsertered(
RMTQueue
*,
RMTPort
*);
54
void
pduDropped(
RMTQueue
*,
const
cPacket *,
RMTPort
*);
55
void
pduReleased(
RMTQueue
*,
RMTPort
*);
56
void
queueCreated(
RMTQueue
*,
RMTPort
*);
57
58
double
getDropProbability(
RMTQueue
*,
RMTPort
*);
59
60
void
finish();
61
protected
:
62
map<string, QueueConfig>
queuesConf
;
63
map<RMTQueue *, QueueConfig *>
queueConf
;
64
65
map<RMTPort* , set<RMTQueue*> >
portQueues
;
66
map<RMTPort * , int>
portCount
;
67
68
int
defaultThreshold
;
69
70
void
initialize();
71
};
72
73
}
MM_PDQ_Drop::MM_PDQ_Drop::portQueues
map< RMTPort *, set< RMTQueue * > > portQueues
Definition:
MM_PDQ_Drop.h:65
MM_PDQ_Drop::Threshold
Definition:
MM_PDQ_Drop.h:32
MM_PDQ_Drop::MM_PDQ_Drop::queuesConf
map< string, QueueConfig > queuesConf
Definition:
MM_PDQ_Drop.h:62
MM_PDQ_Drop::Threshold::prob
double prob
Definition:
MM_PDQ_Drop.h:34
std
MM_PDQ_Drop::MM_PDQ_Drop::queueConf
map< RMTQueue *, QueueConfig * > queueConf
Definition:
MM_PDQ_Drop.h:63
MM_PDQ_Drop::MM_PDQ_Drop::defaultThreshold
int defaultThreshold
Definition:
MM_PDQ_Drop.h:68
MM_PDQ_Drop::Threshold::limit
int limit
Definition:
MM_PDQ_Drop.h:33
Int_MM_Drop_Module
Definition:
Int_MM_Drop_Module.h:7
MM_PDQ_Drop
Definition:
MM_PDQ_Drop.cc:22
MM_PDQ_Drop::QueueConfig
Definition:
MM_PDQ_Drop.h:39
MM_PDQ_Drop::MM_PDQ_Drop::portCount
map< RMTPort *, int > portCount
Definition:
MM_PDQ_Drop.h:66
MM_PDQ_Drop::QueueConfig::thresholdList
vector< Threshold > thresholdList
Definition:
MM_PDQ_Drop.h:42
MM_PDQ_Drop::QueueConfig::absThreshold
int absThreshold
Definition:
MM_PDQ_Drop.h:41
MM_PDQ_Drop::QueueConfig::id
string id
Definition:
MM_PDQ_Drop.h:40
RMTPort
Definition:
RMTPort.h:36
RMTQueue
Definition:
RMTQueue.h:34
Int_MM_Drop_Module.h
policies
DIF
RMT
Monitor
ModularMonitor
MM_PDQ_Drop
MM_PDQ_Drop.h
Generated on Tue Oct 25 2016 21:08:54 for RINASim by
1.8.10