PassivePacketSource

Package: inet.queueing.source

PassivePacketSource

simple module

C++ definition

This module is a passive packet source which can be pulled for packets from the connected packet collector.

PassivePacketSource

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Used in compound modules

Name Type Description
ResponseProducer compound module

This module is capable of generating 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 the corresponding server module. The packet data, packet length, and timing distributions can be configured in the corresponding packet provider.

Used in

Name Type Description
ContentBasedSchedulerTutorialStep network (no description)
DemultiplexerTutorialStep network (no description)
Filter2TutorialStep network (no description)
Gate2TutorialStep network (no description)
GenericSchedulerTutorialStep network (no description)
MarkovSchedulerTutorialStep network (no description)
PacketBasedTokenGeneratorTutorialStep network (no description)
ProviderCollectorTutorialStep network (no description)
QueueBasedTokenGeneratorTutorialStep network (no description)
ServerTutorialStep network (no description)
SignalBasedTokenGeneratorTutorialStep network (no description)
TimeBasedTokenGeneratorTutorialStep network (no description)
TokenBasedServerTutorialStep network (no description)
WrrSchedulerTutorialStep network (no description)

Extends

Name Type Description
PassivePacketSourceBase simple module

This is a 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

packetNameFormat string "%a-%c"

see directives in module documentation

packetRepresentation string "byteCount"

determines the chunk of the packet data

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,2); optional

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
display i=block/source
class PassivePacketSource

Gates

Name Direction Size Description
out output

Signals

Name Type Unit
packetPulled inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
packetLengths packet lengths packetLength(packetPulled) sum, histogram, vector b none
dataRate data rate throughput(packetPulled) vector bps linear
packets packets packetPulled count pk

Source code

//
// This module is 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
        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