PassivePacketSourceBase¶
Package: inet.queueing.base
simple module PassivePacketSourceBase
Base module for various active packet source modules.
See also: PacketSourceBase
Inheritance diagram¶
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
simple module |
A passive packet source which can be pulled for packets from the connected packet collector. |
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for various packet source modules. Packets are created randomly with regard to packet length and packet data. The representation of packet data can also be configured. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“created %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
packetNameFormat |
string |
“%a-%c” |
See directives in module documentation |
packetRepresentation |
string |
“byteCount” |
Determines the chunk of the packet data |
packetProtocol |
string |
“unknown” |
|
packetLength |
int |
||
packetData |
int |
-1 |
|
attachCreationTimeTag |
bool |
true |
|
attachIdentityTag |
bool |
true |
|
attachDirectionTag |
bool |
true |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
PassivePacketSourceBase |
|
display |
i=block/source |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
packetCreated |
|||
packetPulled |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
dataRate |
data rate |
throughput(packetPulled) |
vector |
bps |
linear |
the statistical value is the data rate of the packets |
packetLengths |
packet lengths |
packetLength(packetPulled) |
sum,histogram,vector |
b |
none |
the statistical value is the length of the packet |
packets |
packets |
packetPulled |
count |
pk |
the statistical value is the packet |
Source code¶
//
// Base module for various active packet source modules.
//
// @see ~PacketSourceBase
//
simple PassivePacketSourceBase extends PacketSourceBase
{
parameters:
@class(PassivePacketSourceBase);
@signal[packetPulled](type=inet::Packet);
// the statistical value is the packet
@statistic[packets](title="packets"; source=packetPulled; record=count; unit=pk);
// the statistical value is the length of the packet
@statistic[packetLengths](title="packet lengths"; source=packetLength(packetPulled); record=sum,histogram,vector; unit=b; interpolationmode=none);
// the statistical value is the data rate of the packets
@statistic[dataRate](title="data rate"; source=throughput(packetPulled); record=vector; unit=bps; interpolationmode=linear);
}