PacketMultiplexer

Package: inet.queueing.common

simple module PacketMultiplexer

Connects multiple packet producers to one packet consumer. When a packet is pushed by one of the connected packet producers, then the multiplexer simply pushes the packet to the connected packet consumer.

inet.queueing.common.PacketMultiplexerPacketMultiplexersimple

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.

DirectionReverserLayer

compound module

Provides a layer that combines the decision for local delivery with the service of reversing the direction of an incoming packet to outgoing for packet forwarding.

EthernetPreemptingMacLayer

compound module

(no description)

MultiDomainGptp

compound module

Combines multiple Gptp modules, one per time domain into a multi time domain time synchronization module. Each gPTP time domain is automatically configured to use the corresponding subclock of the clock passed into this module.

DualIeee8021qFilter

compound module

Combines two meters and their corresponding filters per path. This is primarily useful for combining a token bucket based metering with an asynchronous packet shaper. Note that the asynchronous packet shaper also has parts in the network interface queue module.

Ieee8021qFilter

compound module

Implements the IEEE 802.1Q per-stream filtering and policing. The relationship between streams, gates, and meters is not one-to-one. The number of streams, gates, and meters can be different, and the module will take care of the connections between the submodules based on the streamFilterTable parameter.

SimpleIeee8021qFilter

compound module

Implements a simplified version of the IEEE 802.1Q per-stream filtering and policing. Each filtered stream has its own path where metering and filtering happens independently of any other stream.

Ieee8022LlcLayer

compound module

(no description)

AFxyQueue

compound module

This is an example queue that implements one class of the Assured Forwarding PHB group (RFC 2597).

EthernetPreemptingPhyLayer

compound module

(no description)

InterfaceService

compound module

(no description)

MacService

compound module

(no description)

PeerService

compound module

(no description)

MultiPacketPolicing

compound module

Combines multiple packet policing modules into one.

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

PacketProcessorBase

simple module

Base module for various packet processing modules which maintains a few statistics.

Parameters

Name

Type

Default value

Description

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

forwardServiceRegistration

bool

true

forwardProtocolRegistration

bool

true

Properties

Name

Value

Description

class

PacketMultiplexer

display

i=-;b=10,10,oval,grey,,1

Gates

Name

Direction

Size

Description

in [ ]

input

out

output

Signals

Name

Type

Unit

Description

packetPulled

inet::Packet

packetPushed

inet::Packet

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

dataRate

data rate

throughput(merge(packetPushed, packetPulled))

vector

bps

linear

the statistical value is the data rate of the multiplexed packets

packetLengths

packet lengths

packetLength(merge(packetPushed, packetPulled))

sum,histogram,vector

b

none

the statistical value is the length of the multiplexed packet

packets

packets

merge(packetPushed, packetPulled)

count

pk

the statistical value is the multiplexed packet

Source code

//
// Connects multiple packet producers to one packet consumer. When
// a packet is pushed by one of the connected packet producers, then the multiplexer
// simply pushes the packet to the connected packet consumer.
//
simple PacketMultiplexer extends PacketProcessorBase like IActivePacketSource // TODO IPassivePacketSink // in gate is vector
{
    parameters:
        bool forwardServiceRegistration = default(true);
        bool forwardProtocolRegistration = default(true);
        displayStringTextFormat = default("passed %p pk (%l)"); // %p number of packets, %l total length
        @class(PacketMultiplexer);
        @display("i=-;b=10,10,oval,grey,,1");
        @signal[packetPushed](type=inet::Packet);
        @signal[packetPulled](type=inet::Packet);
        // the statistical value is the multiplexed packet
        @statistic[packets](title="packets"; source=merge(packetPushed, packetPulled); record=count; unit=pk);
        // the statistical value is the length of the multiplexed packet
        @statistic[packetLengths](title="packet lengths"; source=packetLength(merge(packetPushed, packetPulled)); record=sum,histogram,vector; unit=b; interpolationmode=none);
        // the statistical value is the data rate of the multiplexed packets
        @statistic[dataRate](title="data rate"; source=throughput(merge(packetPushed, packetPulled)); record=vector; unit=bps; interpolationmode=linear);
    gates:
        input in[] @labels(push);
        output out @labels(push);
}

File: src/inet/queueing/common/PacketMultiplexer.ned