DemultiplexerTutorialStep

Package: inet.tutorials.queueing

DemultiplexerTutorialStep

network

(no description)

provider : PassivePacketSource

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

Source:
provider: PassivePacketSource {
    @display("p=100,100");
} demultiplexer : PacketDemultiplexer

Connects multiple packet collectors to one packet provider.

Source:
demultiplexer: PacketDemultiplexer {
    @display("p=300,100");
} collector[numCollectors] : ActivePacketSink

An active packet sink which pulls packets from the connected module.

Source:
collector[numCollectors]: ActivePacketSink {
    @display("p=500,100,c,100");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Parameters

Name Type Default value Description
numCollectors int

Properties

Name Value Description
isNetwork

Unassigned submodule parameters

Name Type Default value Description
provider.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

provider.packetNameFormat string "%a-%c"

See directives in module documentation

provider.packetRepresentation string "byteCount"

Determines the chunk of the packet data

provider.packetProtocol string "unknown"
provider.packetLength int
provider.packetData int -1
provider.attachCreationTimeTag bool true
provider.attachIdentityTag bool true
provider.attachDirectionTag bool true
provider.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

provider.initialProvidingOffset double 0s

Initial duration before which packets are not provided

provider.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

provider.scheduleForAbsoluteTime bool true

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

demultiplexer.displayStringTextFormat string "passed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

collector.displayStringTextFormat string "received %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

collector.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

collector.initialCollectionOffset double -1s

Initial duration before which packets are not collected, negative value means: try the first collection in initialize()

collector.collectionInterval double

Elapsed time between subsequent packets pulled from the connected packet provider

collector.scheduleForAbsoluteTime bool true

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

Source code

network DemultiplexerTutorialStep
{
    parameters:
        int numCollectors;
    submodules:
        provider: PassivePacketSource {
            @display("p=100,100");
        }
        demultiplexer: PacketDemultiplexer {
            @display("p=300,100");
        }
        collector[numCollectors]: ActivePacketSink {
            @display("p=500,100,c,100");
        }
    connections allowunconnected:
        provider.out --> demultiplexer.in;
        for i=0..numCollectors-1 {
            demultiplexer.out++ --> collector[i].in;
        }
}

//-------------------------------------------------

File: tutorials/queueing/QueueingTutorial.ned