TimeAwareShaper¶
Package: inet.queueing.shaper
compound module TimeAwareShaper
Implements a time-aware shaper using a gate submodule that opens and closes according to a time-based schedule.
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
compound module |
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. |
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 |
gate.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 |
gate.bitrate |
double |
nan bps |
|
gate.extraLength |
int |
0b |
|
gate.extraDuration |
double |
0s |
|
gate.clockModule |
string |
“” |
Relative path of a module that implements IClock(1,:ref:2 <neddoc-msg-inet-iclock>); optional |
gate.initiallyOpen |
bool |
true |
Specifies if the gate is initially open or closed |
gate.offset |
double |
0s |
Specifies where the period starts in the list of gate state change durations; where it is in the period at the start |
gate.durations |
object |
[] |
List of time durations within the period that determine if the gate is open or closed; period is the sum of the durations |
gate.scheduleForAbsoluteTime |
bool |
true |
When a clock is used relative means that setting the clock will not affect the simulation time of the event |
gate.openSchedulingPriority |
int |
0 |
FES scheduling priority for the next gate open event |
gate.closeSchedulingPriority |
int |
0 |
FES scheduling priority for the next gate close event |
gate.enableImplicitGuardBand |
bool |
true |
Implicit guard band means that a packet is not allowed to be forwarded if it cannot finish transmission before the end of window. |
Source code¶
//
// Implements a time-aware shaper using a gate submodule that opens
// and closes according to a time-based schedule.
//
module TimeAwareShaper extends PacketShaper
{
parameters:
gate.typename = default("PeriodicGate");
}