Package: inet.queueing.buffer
PriorityBuffer
simple moduleThis buffer drops packets among the connected packet queues based on their module ID.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Used in
| Name | Type | Description |
|---|---|---|
| PriorityBufferTutorialStep | network | (no description) |
Extends
| Name | Type | Description |
|---|---|---|
| PacketBuffer | 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. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| displayStringTextFormat | string | "contains %p pk (%l)\nadded %a removed %r dropped %d" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| packetCapacity | int | 100 |
Maximum number of packets in the queue, no limit by default |
| dataCapacity | int | -1b |
Maximum total length of packets in the queue, no limit by default |
| dropperClass | string | "inet::queueing::PacketWithHighestOwnerModuleIdDropper" |
Determines which packets are dropped when the buffer 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 |
Properties
| Name | Value | Description |
|---|---|---|
| class | PacketBuffer | |
| display | i=block/buffer |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| in | input | ||
| out | output |
Signals
| Name | Type | Unit | Description |
|---|---|---|---|
| packetRemoved | inet::Packet | ||
| packetDropped | inet::Packet | ||
| packetAdded | inet::Packet |
Statistics
| Name | Title | Source | Record | Unit | Interpolation Mode | Description |
|---|---|---|---|---|---|---|
| droppedPacketsQueueOverflow | dropped packets: queue overflow | packetDropReasonIsQueueOverflow(packetDropped) | count | pk | none |
the statistical value is the packet that is dropped due to queue overflow |
| addedPackets | added packets | packetAdded | count | pk |
the statistical value is the added packet |
|
| removedPackets | removed packets | packetRemoved | count | pk |
the statistical value is the removed packet |
|
| removedPacketLengths | removed packet lengths | packetLength(packetRemoved) | sum, vector | pk | none |
the statistical value is the length of the removed packet |
| bufferLength | buffer length | warmup(count(packetAdded) - count(packetRemoved) - count(packetDropped)) | last, max, timeavg, vector | pk | sample-hold |
the statistical value is the number of packets in the buffer |
| droppedPacketLengthsQueueOverflow | dropped packet lengths: queue overflow | packetLength(packetDropReasonIsQueueOverflow(packetDropped)) | sum, vector | b | none |
the statistical value is the length of the packet that is dropped due to queue overflow |
| addedPacketLengths | added packet lengths | packetLength(packetAdded) | sum, vector | b | none |
the statistical value is the length of the added packet |
| bufferBitLength | buffer bit length | warmup(sum(packetLength(packetAdded)) - sum(packetLength(packetRemoved)) - sum(packetLength(packetDropped))) | last, max, timeavg, vector | b | sample-hold |
the statistical value is the total bit length of all packets in the buffer |
Source code
// // This buffer drops packets among the connected packet queues based on their // module ID. // simple PriorityBuffer extends PacketBuffer { parameters: packetCapacity = default(100); dropperClass = default("inet::queueing::PacketWithHighestOwnerModuleIdDropper"); }File: src/inet/queueing/buffer/PriorityBuffer.ned