PassivePacketSource

Package: inet.queueing.source

simple module PassivePacketSource

A passive packet source which can be pulled for packets from the connected packet collector.

inet.queueing.source.PassivePacketSourcePassivePacketSourcesimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

TelnetServerConnection

compound module

Contains a configurable pre-composed telnet traffic source and traffic sink as part of a telnet server application.

QueueFiller

compound module

Produces packets in order to prevent a queue from becoming empty.

ResponseProducer

compound module

Generates several different streams of packets, one after the other. For each traffic category, the packets are produced by a separate token-based server. The traffic stream can be started by adding tokens to the corresponding server module. The packet data, packet length, and timing distributions can be configured in the corresponding packet provider.

Extends

Name

Type

Description

PassivePacketSourceBase

simple module

Base module for various active packet source modules.

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

clockModule

string

“”

Relative path of a module that implements IClock(1,:ref:2 <neddoc-msg-inet-iclock>); optional

initialProvidingOffset

double

0s

Initial duration before which packets are not provided

providingInterval

double

0s

Elapsed time between subsequent packets allowed to be pulled by the connected packet collector, 0 means any number of packets can be pulled at the same simulation time

scheduleForAbsoluteTime

bool

true

When a clock is used, relative means that setting the clock will not affect the simulation time of the event

Properties

Name

Value

Description

class

PassivePacketSource

display

i=block/source

Gates

Name

Direction

Size

Description

out

output

Signals

Name

Type

Unit

Description

packetCreated

inet::Packet

packetPulled

inet::Packet

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

//
// A passive packet source which can be pulled for packets from
// the connected packet collector.
//
simple PassivePacketSource extends PassivePacketSourceBase like IPassivePacketSource
{
    parameters:
        string clockModule = default(""); // Relative path of a module that implements IClock; optional
        double initialProvidingOffset @unit(s) = default(0s); // Initial duration before which packets are not provided
        volatile double providingInterval @unit(s) = default(0s); // Elapsed time between subsequent packets allowed to be pulled by the connected packet collector, 0 means any number of packets can be pulled at the same simulation time
        bool scheduleForAbsoluteTime = default(true); // When a clock is used, relative means that setting the clock will not affect the simulation time of the event
        @class(PassivePacketSource);
    gates:
        output out @labels(pull);
}

File: src/inet/queueing/source/PassivePacketSource.ned