MultiPacketPolicing¶
Package: inet.queueing.policing
compound module MultiPacketPolicing
Combines multiple packet policing modules into one.
Usage diagram¶
Inheritance diagram¶
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
numPaths |
int |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
in |
input |
||
out |
output |
Unassigned submodule parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
classifier.displayStringTextFormat |
string |
“classified %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
classifier.reverseOrder |
bool |
false |
|
classifier.classifierClass |
string |
Determines the output queue of packets, the parameter must be the name of a C++ class which implements the IPacketClassifierFunction interface and is registered via Register_Class |
|
meter.displayStringTextFormat |
string |
“contains %n tk\nmetered %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
meter.tokenConsumptionPerPacket |
double |
0 |
How many tokens are consumed per packet |
meter.defaultLabel |
string |
“red” |
The label that is attached to packets if there are not enough tokens in the bucket, no label by default |
meter.labelPriority |
object |
colorAware ? [“green”, “yellow”, “red”] : [] |
The list of labels in the order of priority, if specified packets can only be promoted in this order |
meter.committedInformationRate |
double |
Committed information rate |
|
meter.excessInformationRate |
double |
Excess information rate |
|
meter.committedBurstSize |
int |
Committed burst size |
|
meter.excessBurstSize |
int |
Excess burst size |
|
meter.bitsPerToken |
int |
8 |
How many bits are represented by 1 token |
meter.colorAware |
bool |
false |
Enables color-aware mode where packets can only be demoted |
filter.displayStringTextFormat |
string |
“dropped {numDroppedPackets}/{numProcessedPackets} pk ({droppedTotalLength}/{processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
filter.backpressure |
bool |
false |
|
filter.labelFilter |
string |
The label filter as a match expression (e.g. green or red) |
|
multiplexer.displayStringTextFormat |
string |
“passed %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
multiplexer.forwardServiceRegistration |
bool |
true |
|
multiplexer.forwardProtocolRegistration |
bool |
true |
Source code¶
//
// Combines multiple packet policing modules into one.
//
module MultiPacketPolicing like IPacketPolicing
{
parameters:
int numPaths;
gates:
input in @labels(push);
output out @labels(push);
submodules:
classifier: <default("PacketClassifier")> like IPacketClassifier {
parameters:
@display("p=125,120");
}
meter[numPaths]: <default("DualRateThreeColorMeter")> like IPacketMeter {
parameters:
@display("p=325,120");
}
filter[numPaths]: <default("LabelFilter")> like IPacketFilter {
parameters:
@display("p=525,120");
}
multiplexer: PacketMultiplexer {
parameters:
@display("p=725,120");
}
connections:
in --> { @display("m=w"); } --> classifier.in;
for i=0..numPaths-1 {
classifier.out++ --> meter[i].in;
meter[i].out --> filter[i].in;
filter[i].out --> multiplexer.in++;
}
multiplexer.out --> { @display("m=e"); } --> out;
}