PacketShaper¶
Package: inet.queueing.shaper
compound module PacketShaper
Combines a packet queue and a packet gate into a packet shaper module. The queue stores the packets sorted according to its ordering and the gate decides when the first packet can be pulled from the queue.
Usage diagram¶
Inheritance diagram¶
Used in compound modules¶
Name |
Type |
Description |
|---|---|---|
compound module |
Combines a classifier, a scheduler, and several traffic shapers into a single packet shaper. Packets are classified into one of the traffic shapers, and the scheduler prioritizes among them. |
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
compound module |
Implements an asynchronous shaper. The queue sorts packets based on the transmission eligibility time (EligibilityTimeTag) attached to each packet. The gate prevents packets from being transmitted earlier than the attached transmission eligibility time. |
|
compound module |
Implements a credit-based shaper using a gate submodule to manage the number of credits. |
|
compound module |
Implements a time-aware shaper using a gate submodule that opens and closes according to a time-based schedule. |
Properties¶
Name |
Value |
Description |
|---|---|---|
display |
i=block/bucket |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
in |
input |
||
out |
output |
Unassigned submodule parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
queue.displayStringTextFormat |
string |
“contains %p pk (%l) pushed %u\npulled %o removed %r dropped %d” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
queue.packetCapacity |
int |
-1 |
Maximum number of packets in the queue, no limit by default |
queue.dataCapacity |
int |
-1b |
Maximum total length of packets in the queue, no limit by default |
queue.dropperClass |
string |
“” |
Determines which packets are dropped when the queue is overloaded, packets are not dropped by default; the parameter must be the name of a C++ class which implements the IPacketDropperFunction C++ interface and is registered via Register_Class |
queue.comparatorClass |
string |
“” |
Determines the order of packets in the queue, insertion order by default; the parameter must be the name of a C++ class which implements the IPacketComparatorFunction C++ interface and is registered via Register_Class |
queue.bufferModule |
string |
“” |
Relative module path to the IPacketBuffer module used by this queue, implicit buffer by default |
Source code¶
//
// Combines a packet queue and a packet gate into a packet shaper
// module. The queue stores the packets sorted according to its ordering and
// the gate decides when the first packet can be pulled from the queue.
//
module PacketShaper like IPacketShaper
{
parameters:
@display("i=block/bucket");
gates:
input in;
output out;
submodules:
queue: <default("PacketQueue")> like IPacketQueue {
@display("p=100,150");
}
gate: <default("")> like IPacketGate {
@display("p=300,150");
}
connections:
in --> queue.in;
queue.out --> gate.in;
gate.out --> out;
}