SubpacketLengthHeaderBasedAggregator¶
Package: inet.protocolelement.aggregation
compound module SubpacketLengthHeaderBasedAggregator
Aggregates multiple packets into a single packet by inserting a length field header before each subpacket. This module collects packets according to the aggregation policy and combines them into a single aggregated packet. Each subpacket is preceded by a SubpacketLengthHeader that contains the length of the following subpacket, allowing the receiver to extract individual packets.
Usage diagram¶
Inheritance diagram¶
Used in compound modules¶
Name |
Type |
Description |
|---|---|---|
compound module |
(no description) |
Extends¶
Name |
Type |
Description |
|---|---|---|
compound module |
Base module for packet aggregation. Collects multiple packets and combines them into a single aggregated packet based on a configurable aggregation policy. Aggregation improves network efficiency by reducing header overhead when transmitting multiple small packets. The module delegates the aggregation decision to a policy class or module that determines if a packet can be aggregated with the current set. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
deleteSelf |
bool |
false |
|
aggregatorPolicyClass |
string |
“” |
|
aggregatorPolicyModule |
string |
“.aggregatorPolicy” |
Only used if aggregatorPolicyClass==”” |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
SubpacketLengthHeaderBasedAggregator |
|
display |
i=block/join |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
in |
input |
||
out |
output |
Unassigned submodule parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
aggregatorPolicy.displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
aggregatorPolicy.minNumSubpackets |
int |
0 |
|
aggregatorPolicy.maxNumSubpackets |
int |
||
aggregatorPolicy.minAggregatedLength |
int |
0b |
|
aggregatorPolicy.maxAggregatedLength |
int |
Source code¶
//
// Aggregates multiple packets into a single packet by inserting a length field
// header before each subpacket. This module collects packets according to the
// aggregation policy and combines them into a single aggregated packet. Each
// subpacket is preceded by a SubpacketLengthHeader that contains the length of
// the following subpacket, allowing the receiver to extract individual packets.
//
module SubpacketLengthHeaderBasedAggregator extends AggregatorBase like IPacketAggregator
{
parameters:
@class(SubpacketLengthHeaderBasedAggregator);
}
File: src/inet/protocolelement/aggregation/SubpacketLengthHeaderBasedAggregator.ned