PacketBufferBase¶
Package: inet.queueing.base
simple module PacketBufferBase
Base module for various packet buffer modules which maintains a few statistics.
Available display string format directives:
%p - number of packets
%l - total length
%a - number of added packets
%r - number of removed packets
%d - number of dropped packets
See also: IPacketBuffer
Inheritance diagram¶
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
simple module |
Provides packet storage for sharing and optimizing storage space between multiple packet queues. When a packet buffer becomes overloaded, the packet dropping strategy can drop any number of packets from any number of connected packet queues. |
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for various packet processing modules which maintains a few statistics. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“contains {numPackets} pk ({totalLength})\nadded {numAddedPackets} removed {numRemovedPackets} dropped {numDroppedPackets}” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
PacketProcessorBase |
|
display |
i=block/buffer |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
in |
input |
||
out |
output |
Source code¶
//
// Base module for various packet buffer modules which maintains a few
// statistics.
//
// Available display string format directives:
// - %p - number of packets
// - %l - total length
// - %a - number of added packets
// - %r - number of removed packets
// - %d - number of dropped packets
//
// @see ~IPacketBuffer
//
simple PacketBufferBase extends PacketProcessorBase
{
parameters:
displayStringTextFormat = default("contains {numPackets} pk ({totalLength})\nadded {numAddedPackets} removed {numRemovedPackets} dropped {numDroppedPackets}"); // Determines display string text above the submodule
@display("i=block/buffer");
gates:
input in @loose;
output out @loose;
}