ActivePacketSourceBase

Package: inet.queueing.base

simple module ActivePacketSourceBase

Base module for various active packet source modules.

See also: PacketSourceBase

inet.queueing.base.ActivePacketSourceBaseActivePacketSourceBasesimple

Inheritance diagram

Known subclasses

Name

Type

Description

ActivePacketSource

simple module

An active packet source which pushes packets into the connected module. It pushes whole packets through the out gate at every production interval. It pushes the first packet after the initial production offset.

PcapFilePacketProducer

simple module

An active packet source which pushes packets into the connected packet consumer. All pushed packets are read from a PCAP file.

Extends

Name

Type

Description

PacketSourceBase

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

ActivePacketSourceBase

display

i=block/source

Signals

Name

Type

Unit

Description

packetCreated

inet::Packet

packetPushed

inet::Packet

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

dataRate

data rate

throughput(packetPushed)

vector

bps

linear

the statistical value is the data rate of the packets

packetLengths

packet lengths

packetLength(packetPushed)

sum,histogram,vector

b

none

the statistical value is the length of the packet

packets

packets

packetPushed

count

pk

the statistical value is the packet

Source code

//
// Base module for various active packet source modules.
//
// @see ~PacketSourceBase
//
simple ActivePacketSourceBase extends PacketSourceBase
{
    parameters:
        @class(ActivePacketSourceBase);
        @signal[packetPushed](type=inet::Packet);
        // the statistical value is the packet
        @statistic[packets](title="packets"; source=packetPushed; record=count; unit=pk);
        // the statistical value is the length of the packet
        @statistic[packetLengths](title="packet lengths"; source=packetLength(packetPushed); 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(packetPushed); record=vector; unit=bps; interpolationmode=linear);
}

File: src/inet/queueing/base/ActivePacketSourceBase.ned